Commit Graph

174 Commits

Author SHA1 Message Date
tjhunt
ac63efae6d ajaxlib: MDL-19915 skip links need to be in a div for XHTML strict.
Refine Sam's solution.
2009-07-23 05:39:41 +00:00
samhemelryk
f0b529e0a9 ajaxlib MDL-19915 Squashed minor XHTML compliance issue, wrapped an 🅰️ in a :div: 2009-07-23 05:09:29 +00:00
nicolasconnault
1a504c8996 MDL-19077 Added requires->yui_lib('event') to required_event_handler constructor 2009-07-22 04:02:54 +00:00
nicolasconnault
647df7e372 MDL-19077 Added the required_event_handler class and event_handler method 2009-07-22 03:54:13 +00:00
tjhunt
9e43d2b395 ajaxlib: fix variable name typo. 2009-07-22 03:44:14 +00:00
tjhunt
d4a03c00ea themes & blocks - MDL-19077 & MDL-19010 blocks are now printed by the theme
The code to print blocks in now in theme layout.php files. (Or in
moodle_core_renderer::handle_legacy_theme)

Code for printing blocks everywhere else has been stripped out.
(Total diffstat 1225 insertions, 2019 deletions)

The way the HTML for a block instance is generated has been cleaned
up a lot. Now, the block_instance generates a block_contents
object which gives a structured representation of the block,
and then $OUTPUT->block builds all the HTML from that.

How theme config.php files specify the layout template and block
regions by page general type has been changed to be even more flexible.

Further refinement for how the theme and block code gets initialised.

Ability for scrits to add 'pretend blocks' to the page. That is,
things that look like blocks, but are not normal block_instances.
(Like the add a new block UI.)

Things that are still broken:
 * some pages in lesson, quiz and resource. I'm working on it.
 * lots of developer debug notices pointing out things that
   need to be updated.
2009-07-09 07:35:03 +00:00
samhemelryk
803dc07443 ajaxlib MDL-19690 Fixed minor bug because of missing global 2009-07-08 01:56:15 +00:00
tjhunt
641e6ecd58 Typo fix. 2009-07-07 03:49:46 +00:00
tjhunt
ddedf979b4 MDL-19690 - more $CFG->pixpath to $OUTPUT->old_icon_url 2009-07-03 06:19:25 +00:00
tjhunt
5ef444007d MDL-19690 - Eliminate all remaining $CFG->modpixpath apart from mod/scorm 2009-07-02 12:25:19 +00:00
samhemelryk
747b85cb00 ajaxlib MDL-19077 Added strings_for_js method 2009-07-02 04:07:53 +00:00
tjhunt
bfbbfdebb8 Typo fixes. 2009-06-25 06:48:25 +00:00
skodak
ff5fe31160 MDL-19580 cleanup of require css and js filepicker code 2009-06-24 22:34:29 +00:00
samhemelryk
d76b8a2068 ajaxlib MDL-16693 Fixed fringe condition in ajaxlib and added test 2009-06-22 02:59:02 +00:00
tjhunt
8a0cb3a16d Javadoc comment syntax. 2009-06-17 05:34:10 +00:00
dongsheng
424362f3b5 "MDL-16695, fixed yui js files path" 2009-06-15 05:06:34 +00:00
tjhunt
5c5418fe9d Further fixes to PHPdoc comments. 2009-06-15 04:03:59 +00:00
tjhunt
2c144fc308 Further fixes to PHPdoc comments. 2009-06-15 03:54:00 +00:00
tjhunt
9ca1395054 Try to improve formatting of PHPdoc. 2009-06-15 02:48:40 +00:00
tjhunt
cf6155226c ajaxlib/require_js: MDL-16693 $PAGE->requires->... deprecates require_js etc.
There is a new implementation of require_js in lib/deprecatedlib.php,
based on $PAGE->requires.

There were a few other recently introduced functions in lib/weblib.php,
namely print_js_call, print_delayed_js_call, print_js_config and
standard_js_config. These have been removed, since they were never in
a stable branch, and all the places that used them have been changed
to use the newer $PAGE->requires->... methods.

get_require_js_code is also gone, and the evil places that were calling
it, even though it is an internal function, have been fixed.

Also, I made some minor improvements to the code I committed yesterday
for MDL-16695.

All that remains is to update all the places in core code that are
still using require_js.

(This commit also fixes the problem where the admin tree would not
start with the right categories expanded.)
2009-06-12 12:13:07 +00:00
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
skodak
fbaa7b88db MDL-19162 updated links for elements no longer beta and experiment 2009-05-14 09:18:11 +00:00
skodak
d4a1fcaf11 MDL-16613 sesskey cleanup 2009-01-02 10:36:25 +00:00
tjhunt
f2eb500238 weblib: MDL-17085 a function to print a collapsible region of the UI, with the collapsed state stored in a user_perference. 2008-11-03 05:04:23 +00:00
nicolasconnault
25e3d9f289 MDL-16784 Updating ajaxlib.php Merging from 1.9 stable 2008-10-08 08:21:46 +00:00
skodak
1f3ffe3308 MDL-16819 fixed regression in last commit, sorry 2008-10-07 23:05:09 +00:00
skodak
b7658fa0de MDL-15800 merged changes from MOODLE_19_STABLE 2008-10-07 22:09:33 +00:00
tjhunt
e874af28ce MDL-16583 Make require_js accept library names like lib/javascript-static.js without the caller having to fiddle around with $CFG->wwwroot themselves. 2008-09-25 06:29:28 +00:00
nicolasconnault
b958e94122 MDL-14731 Improved Bryce's patch and applied. YUI version number is kept in a simple version.php file, to be updated manually when updating the YUI libraries. 2008-07-24 13:37:05 +00:00
nicolasconnault
483f306734 Updating the translate_list for YUI components. 2008-05-13 07:24:43 +00:00
nicolasconnault
b244b9b776 MDL-14163 YUI implementation complete, new grader_report preference and admin setting for enabling ajax. 2008-04-18 19:30:28 +00:00
dongsheng
5a2a53316f MDL-14129, remove all the other error() call 2008-04-04 02:54:20 +00:00
sam_marshall
ca70075a39 MDL-12284 Moved require_js to weblib and improved it so that it works if called during header (also tidied up code) 2007-11-20 18:04:03 +00:00
nfreear
f8eaeffa21 Fixes for bug MDL-12256, "Course AJAX has very poor accessibility - ALT text" (includes white-space cleanup). 2007-11-19 17:22:04 +00:00
poltawski
72d2845296 MDL-9742 Converting tabs to spaces 2007-05-09 01:11:45 +00:00
sam_marshall
0e9d0c0b85 Made it so you can call require_js after header printed (bug 8823) 2007-03-09 12:52:35 +00:00
nicolasconnault
c2a9fc9166 Issue 8417:
Added support for array of tested browsers to be passed to ajaxenabled()
Merged in from MOODLE_18_STABLE
2007-03-01 02:08:06 +00:00
nicolasconnault
d499142e5a Safari 2.0 and Opera 9.0 are now detected and supported for YUI. However, preliminary tests show that drag&drop behaviour is very slow on Opera and user-unfriendly on both browsers. A YUI debug window also pops up on Safari.
I added a unit test for ajaxlib.php

Issue MDL-8417
Merged from MOODLE_18_STABLE
2007-03-01 01:31:37 +00:00
vyshane
604c634179 Reverted require_js() in lib/ajax/ajaxlib.php. Last changes broke backwards compatibility with the way the function worked in Moodle 1.7.
Small change in lib/weblib.php to allow require_js() to be used from themes. To use it, just call the function from themedir/meta.php.
2007-02-12 06:01:49 +00:00
urs_hunkler
c630701958 'add a second parameter to enable YUI loading from header.html in the themes - MDL-8374' 2007-02-09 13:25:48 +00:00
vyshane
f72f94a257 Reworked require_js() so that it will not load libraries more than once.
Related to MDL-7682 and MDL-8374.
2007-02-02 06:35:25 +00:00
vyshane
446d6e7dd0 *** empty log message *** 2007-01-30 04:55:59 +00:00
vyshane
15c331b2e8 Merged from 1.7. 2007-01-29 07:58:47 +00:00
vyshane
c4ca9cb3b2 Merged from 1.7. 2007-01-29 02:22:18 +00:00
skodak
32f0b38a4a MDL-8049 Remove all language=Javascript from javascript includes 2007-01-03 19:33:44 +00:00
vyshane
67c0e16eed Merged from 1.7. 2006-12-14 08:10:41 +00:00
vyshane
e9880ed208 Merged from 1.7. 2006-12-14 04:47:29 +00:00
vyshane
4a5548f928 Merged from 1.7. 2006-12-01 03:46:55 +00:00
vyshane
2f11bfc0a4 Merged from 1.7. 2006-11-27 03:22:28 +00:00
vyshane
d2a11d460a Merged from 1.7. 2006-11-20 09:21:27 +00:00