rev 286
* Split $context['footer'] into $context['footer'] (regular HTML) and $context['footer_js'] (postponed Javascript). (Load.php, index.template.php, etc.)
- Removed SCRIPT_HEADER/SCRIPT_FOOTER because of the better implementation. (index.php, etc.)
+ Added new Javascript encapsulator. add_js() (temp name) will add your postponed Javascript to $context['footer_js'] and deal with the layout for you. You can still manually add to $context['footer_js'], for instead if you need to manipulate the JS buffer or add characters without newlines. The main benefit is that you can call add_js('hello', $world) and it will behave the same as add_js('hello' . $world'), which makes it easy to convert older templates. (BoardIndex.php, Class-Editor.php, Load.php, ManageBoards.php, ManageMail.php, ManageNews.php, ManagePaid.php, ManageRegistration.php, ManageSearchEngines.php, ManageSettings.php, QueryString.php, Subs.php, TEMPLATES: Admin, Calendar, Display, GenericMenu, MessageIndex, Packages, Post, Register, Stats)
+ Also added add_js_file() function, to specify a JS file to load later, or a list of files. Warning: doing add_js_file($scripturl, '?something') will consider $scripturl as a standalone script. I could improve the behavior but I don't know if it's worth it. (Class-Editor.php, QueryString.php, TEMPLATES: Admin, Display, MessageIndex, Register, Stats)
Now, finishing inline JS should be a piece of cake... :)
Will still need to finish the data-* fixes (has to be done manually because of the hitme complexity + some onclick calls don't require postponing). And I'll be done...