diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-11-25 17:44:05 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-12-16 10:15:17 +0000 |
commit | fddf7f9585e50a60acca01b84bc8f9cfc267dd0b (patch) | |
tree | c7b6d9e7bc457d8ff4b0883dd62ef9e2876b7f6c /templates/web/base/common_scripts.html | |
parent | e1f11deee821dd6540a76966731c94d31effa826 (diff) |
Add offline support of static files/fallback page.
Use a list to store JavaScript files, so it can be shared
between the HTML footer and the appcache manifest.
Diffstat (limited to 'templates/web/base/common_scripts.html')
-rw-r--r-- | templates/web/base/common_scripts.html | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/templates/web/base/common_scripts.html b/templates/web/base/common_scripts.html new file mode 100644 index 000000000..1d53f1d51 --- /dev/null +++ b/templates/web/base/common_scripts.html @@ -0,0 +1,44 @@ +[% + +USE date; +USE Math; + +scripts = []; + +scripts.push( + start _ "/js/translation_strings." _ lang_code _ ".js?" _ Math.int( date.now / 3600 ), + version('/jslib/jquery-1.7.2.min.js'), + version('/js/validation_rules.js'), + version('/js/jquery.validate.min.js'), + version('/js/dropzone.min.js'), + version('/js/jquery.multi-select.js'), + version('/js/geo.min.js'), + version('/cobrands/fixmystreet/fixmystreet.js'), +); + +FOR script IN map_js; + scripts.push(script); +END; + +scripts.push( + version('/cobrands/fixmystreet/map.js'), + version('/cobrands/fixmystreet/offline.js'), +); + +IF admin; + scripts.push( + version('/js/jquery-ui/js/jquery-ui-1.10.3.custom.min.js'), + version('/js/fixmystreet-admin.js'), + ); +END; + +FOR script IN extra_js; + scripts.push(script); +END; + +TRY; + PROCESS 'footer_extra_js.html'; +CATCH file; +END; + +~%] |