Difference between revisions of "Web2.0 Javascript use and maintenance"
From WormBaseWiki
Jump to navigationJump to search (Created page with 'Javascript functions are splited into separate files and located under: /root/js/ eg: *ajax.js *effect.js *jquery.tablescroll.js (this one is going to move/change in future) *…') |
|||
Line 1: | Line 1: | ||
+ | = Layout = | ||
Javascript functions are splited into separate files and located under: /root/js/ eg: | Javascript functions are splited into separate files and located under: /root/js/ eg: | ||
*ajax.js | *ajax.js | ||
Line 13: | Line 14: | ||
[% END %] | [% END %] | ||
− | + | = Future Note = | |
− | 2. consider namespace | + | *1. In the future we could use a deployment script to combine+minify them into one file (eg. cat + YUI compressor) |
− | 3. probably move all under root/js/jquery ? | + | *2. consider namespace |
+ | *3. probably move all under root/js/jquery ? |
Revision as of 20:30, 27 July 2010
Layout
Javascript functions are splited into separate files and located under: /root/js/ eg:
- ajax.js
- effect.js
- jquery.tablescroll.js (this one is going to move/change in future)
- log.js
- search.js
- style.js
- miscellaneous.js
At the beginning of template/boilerplate/html, included them as following.
[% FOREACH item IN JavaScripts %] <script type="text/javascript" src="[% '/js/' _ item _ '.js' %]" ></script> [% END %]
Future Note
- 1. In the future we could use a deployment script to combine+minify them into one file (eg. cat + YUI compressor)
- 2. consider namespace
- 3. probably move all under root/js/jquery ?