Only load css and js in header

This commit is contained in:
Ruud
2012-01-14 15:02:00 +01:00
parent 17149a58f1
commit bc4a965528
+3 -1
View File
@@ -61,7 +61,9 @@ class Plugin(object):
if add_to_head:
for f in glob.glob(os.path.join(self.plugin_path, 'static', '*')):
fireEvent('register_%s' % ('script' if getExt(f) in 'js' else 'style'), path + os.path.basename(f))
ext = getExt(f)
if ext in ['js', 'css']:
fireEvent('register_%s' % ('script' if ext in 'js' else 'style'), path + os.path.basename(f))
def showStatic(self, filename):
d = os.path.join(self.plugin_path, 'static')