|
Tim Hunt made changes - 10/Apr/09 01:19 PM
Tim Hunt made changes - 11/Jun/09 05:11 PM
we had a long conversation about this in jabber, but to make it official (other than all my tiny nitpicking):
Well Done Tim, Excellent Work Tim. Gold Star.
Tim Hunt made changes - 11/Jun/09 06:49 PM
Tim Hunt made changes - 11/Jun/09 06:54 PM
Tim Hunt made changes - 11/Jun/09 07:06 PM
tjhunt committed 4 files to 'Moodle CVS' - 12/Jun/09 11:13 AM
Tim Hunt made changes - 12/Jun/09 11:14 AM
tjhunt committed 36 files to 'Moodle CVS' - 12/Jun/09 08:13 PM
Mitsuhiro Yoshida committed 17 files to 'Lang CVS' - 13/Jun/09 01:44 AM
Dongsheng Cai committed 1 file to 'Moodle CVS' - 15/Jun/09 01:06 PM
tjhunt committed 1 file to 'Moodle CVS' - 17/Jun/09 06:29 PM
tjhunt committed 1 file to 'Moodle CVS' - 19/Jun/09 04:02 PM
martignoni committed 1 file to 'Lang CVS' - 26/Jun/09 03:27 AM
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I have not yet rewritten require_js and friends to use it, and then deprecated them. Nor have I changed print_header and friends to get the data from the class. I first want to know that the way I have made this class and its API is sensible.
Draft commit comment:
ajaxlib:
MDL-16695New page_requirements_manager class, soon to replace require_jsThis new class does the work that require_js used to do, and more.
It can track a number of different things that may be required to
be output somewhere on the page, including:
The new API looks like
$PAGE->requires->css('mod/mymod/styles.css');
$PAGE->requires->js('mod/mymod/script.js');
$PAGE->requires->js('mod/mymod/small_but_urgent.js')->in_head();
$PAGE->requires->js_function_call('init_mymod', array($data))->on_dom_ready();
$PAGE->requires is the canonical instances of this new class.
The commit also includes unit tests.