Changeset 3493fe in indico
- Timestamp:
- 04/13/12 10:13:39 (14 months ago)
- Branches:
- master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.99, b8c30da8ebdbdcbd675a873997cc3e95f567de49, 4287315ec967a3da168d83963c14001db8487d53
- Children:
- a7600a
- Parents:
- 677f2a
- git-author:
- Pedro Ferreira <jose.pedro.ferreira@…> (04/04/12 11:44:49)
- git-committer:
- Pedro Ferreira <jose.pedro.ferreira@…> (04/13/12 10:13:39)
- File:
-
- 1 edited
-
indico/MaKaC/webinterface/pages/base.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/webinterface/pages/base.py
r1fe078 r3493fe 49 49 def _includeJSPackage(self, packageName, module = 'indico', path=None): 50 50 info = HelperMaKaCInfo().getMaKaCInfoInstance() 51 config = Config.getInstance() 51 52 52 53 if info.isDebugActive(): 53 return ['js/%s/%s/Loader.js?%d' % (module, packageName, os.stat('%s/js/%s/%s/Loader.js'%( Config().getHtdocsDir(), module, packageName)).st_mtime )]54 else: 55 return ['js/%s/pack/%s.js.pack?%d' % (module, packageName, os.stat('%s/js/%s/pack/%s.js.pack'%( Config().getHtdocsDir(),module, packageName)).st_mtime )]54 return ['js/%s/%s/Loader.js?%d' % (module, packageName, os.stat('%s/js/%s/%s/Loader.js'%(config.getHtdocsDir(), module, packageName)).st_mtime )] 55 else: 56 return ['js/%s/pack/%s.js.pack?%d' % (module, packageName, os.stat('%s/js/%s/pack/%s.js.pack'%(config.getHtdocsDir(),module, packageName)).st_mtime )] 56 57 57 58 def _includeJQuery(self): 58 59 # TODO: rename this to _includeJSLibs or something similar 59 60 info = HelperMaKaCInfo().getMaKaCInfoInstance() 61 config = Config.getInstance() 60 62 61 63 files = ['underscore', 'jquery', 'jquery-ui', 'jquery.form', 'jquery.custom', … … 64 66 if info.isDebugActive(): 65 67 # We can't use Loader.js as jQuery is included before any indico js 66 return ['js/jquery/%s.js?%d' % (f, os.stat('%s/js/jquery/%s.js' %(Config().getHtdocsDir(), f)).st_mtime) for f in files]67 else: 68 return ['js/jquery/pack/jquery.js.pack?%d' % os.stat('%s/js/jquery/pack/jquery.js.pack' %Config().getHtdocsDir()).st_mtime]68 return ['js/jquery/%s.js?%d' % (f, os.stat('%s/js/jquery/%s.js' % (config.getHtdocsDir(), f)).st_mtime) for f in files] 69 else: 70 return ['js/jquery/pack/jquery.js.pack?%d' % os.stat('%s/js/jquery/pack/jquery.js.pack' % config.getHtdocsDir()).st_mtime] 69 71 70 72 def _includeJSFile(self, path, filename): 71 73 info = HelperMaKaCInfo().getMaKaCInfoInstance() 74 config = Config.getInstance() 72 75 73 76 if info.isDebugActive(): 74 return ['%s/%s.js?%d' % (path, filename, os.stat('%s/%s/%s.js' %(Config().getHtdocsDir(), path, filename)).st_mtime)]75 else: 76 return ['%s/%s.js.pack?%d' % (path, filename, os.stat('%s/%s/%s.js.pack' %(Config().getHtdocsDir(),path, filename)).st_mtime)]77 return ['%s/%s.js?%d' % (path, filename, os.stat('%s/%s/%s.js' % (config.getHtdocsDir(), path, filename)).st_mtime)] 78 else: 79 return ['%s/%s.js.pack?%d' % (path, filename, os.stat('%s/%s/%s.js.pack' % (config.getHtdocsDir(),path, filename)).st_mtime)] 77 80 78 81 def _includePresentationFiles(self): 79 82 info = HelperMaKaCInfo().getMaKaCInfoInstance() 83 config = Config.getInstance() 80 84 81 85 if info.isDebugActive(): 82 return ['%s?%d' % (f, os.stat('%s/%s' %(Config().getHtdocsDir(), f)).st_mtime) for f in ['js/presentation/Loader.js', 'js/indico/jquery/defaults.js', 'js/indico/jquery/global.js']]83 else: 84 return ['%s?%d' % (f, os.stat('%s/%s' %(Config().getHtdocsDir(), f)).st_mtime) for f in ['js/presentation/pack/Presentation.js.pack', 'js/indico/jquery/defaults.js', 'js/indico/jquery/global.js']]86 return ['%s?%d' % (f, os.stat('%s/%s' % (config.getHtdocsDir(), f)).st_mtime) for f in ['js/presentation/Loader.js', 'js/indico/jquery/defaults.js', 'js/indico/jquery/global.js']] 87 else: 88 return ['%s?%d' % (f, os.stat('%s/%s' % (config.getHtdocsDir(), f)).st_mtime) for f in ['js/presentation/pack/Presentation.js.pack', 'js/indico/jquery/defaults.js', 'js/indico/jquery/global.js']] 85 89 86 90 def _getBaseURL( self ):
Note: See TracChangeset
for help on using the changeset viewer.
