Commit Graph

12 Commits

Author SHA1 Message Date
tjhunt b2330db606 ajaxlib: MDL-16695 New page_requirements_manager class. Soon to replace require_js.
This 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:

    * Links to JS files
    * Links to CSS files
    * Links to YUI libraries (this class knows about the dependancies between the different libs).
    * Skip links that go from the top of <body> to various places in the content.
    * Calls to JavaScript functions (for example to initialise things)
    * Bits of data from PHP that need to be available to JavaScript
    * As a special case of that, an easy way to pass language strings to JS.

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, and hopefully the PHP doc comments are
clear enough that it is easy to understand.
2009-06-12 03:13:29 +00:00
dongsheng 771dc7b298 "MDL-14129, fix error() in moodle2" 2008-12-12 05:45:43 +00:00
nfreear c076f4beef Fixes reopened MDL-7493 "Make sure standard themes are visible under "Windows High Contrast Black" mode" - foreground show/hide block icon/ALT text switched with Javscript. 2007-12-18 17:18:19 +00:00
nfreear 5c3550191a Partial fix for reopened bug MDL-7878, "Link identification and skipping" - affects all course formats + other files. 2007-10-22 06:43:00 +00:00
nfreear 07916f13cc Follow-up for MDL-1149 Accessibility: Current week/topic is NOT indicated non-visually, only in styling. Prefer "This week" to "Current week" 2007-09-26 10:57:46 +00:00
nfreear e9b9c1d810 MDL-1149 Accessibility: Current week is NOT indicated non-visually, only in styling. 2007-09-25 12:00:51 +00:00
moodler 304d08f0c4 Merged tidy-ups from stable 2006-11-01 09:44:01 +00:00
nfreear 57100a9098 Fixes bug MDL-6360 "Resizable image in breadcrumb trail..."
- files block_search_forums.php, calendar/lib.php, lang/en_utf8/access.php, weblib.php, theme/standard/config.php, styles_color.css
2006-09-19 11:36:21 +00:00
nfreear d65611c3fe Fix bug 5611 (Skip block), across 4 files. Extra parameter $title in weblib.php: print_side_block, edits to moodleblock.class.php, Standard style, en_utf8 language pack. 2006-06-09 14:21:25 +00:00
nfreear 11a0b96a4b Accessibility: fix, removed string 'today', which duplicates the calendar string. 2006-03-14 09:54:49 +00:00
nfreear 2eff1f87ef Accesibility: added 'breadcrumb' strings. 2006-03-08 14:12:04 +00:00
nfreear f6c9cf917e Accessibility: the general accessibility, usability and navigation language file. 2006-03-06 12:28:06 +00:00