Commit Graph

137 Commits

Author SHA1 Message Date
skodak ba33919185 MDL-20169 reverting my incorrect patch - sorrry 2009-08-31 20:46:11 +00:00
samhemelryk 7d2a049292 navigation MDL-14632 Very significant navigation commit
This patch introduces two new blocks global_navigation_tree and settings_navigation_tree
both of which have been designed to make full use of the new navigation objects available through
the $PAGE object.
Bulk of this code is within lib/navigationlib.php
2009-08-28 08:47:31 +00:00
skodak d4b5bd4393 MDL-20169 fixed coding style, parameter type required 2009-08-27 19:20:03 +00:00
poltawski 5f56f0a856 ajaxlib: MDL-19756 Use 'confirmation' string which exists in confirm_dialogue 2009-07-30 13:44:26 +00:00
nicolasconnault f8065dd287 MDL-19756 Migrated the following functions from weblib to outputlib:
1. button_to_popup_window
2. link_to_popup_window
3. print_single_button
4. print_spacer
5. print_file_picture (deprecated)
6. print_user_picture
7. print_png (deprecated)
8. helpbutton
9. doclink
10. print_paging_bar
11. notice_yesno
2009-07-27 10:33:00 +00:00
tjhunt 4262a2f806 lesson: MDL-19890 Fix block-printing code in lesson (I hope)
This got broken by one of the commits for MDL-19077 & MDL-19010
2009-07-23 10:01:19 +00:00
tjhunt c966c8a27b ajaxlib MDL-19077 required_js_code::now, for those cases when you really want inline JS, and you may be building HTML before print_header
Both quiz and lesson need this.
2009-07-23 05:55:03 +00:00
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
stronk7 d47cf63dec MDL-19579 code coverage - add initial $includecoverage attributes 2009-06-26 17:21:36 +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 32941d74c8 Move extra ajaxlib unit tests to the right place. 2009-06-17 07:35:33 +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
nicolasconnault 9810d8a08c MDL-14909 Preventing the border from being assigned to label list elements. Merged from MOODLE_19_STABLE 2009-04-29 09:31:24 +00:00
nicolasconnault 472a4b92c8 MDL-9306 Converting tabs to spaces. Merged from MOODLE_19_STABLE 2009-04-23 07:22:27 +00:00
tjhunt 3744f3770c ajaxlib: fix unit tests. 2009-03-10 07:48:29 +00:00
skodak cc4245a3cd MDL-16483 - stopped using MoodleUnitTestCase in tests where $DB not needed 2009-01-10 13:23:37 +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
tjhunt bd1884fe6b ajax: MDL-17084 provide a way for JavaScript to update user preferences. 2008-10-31 08:25:19 +00:00
nicolasconnault ca255392e2 MDL-12198 Fixed ordering of sections, Merging from MOODLE_19_STABLE 2008-10-08 12:22:04 +00:00
nicolasconnault fcc286a4e9 MDL-10201 Merged from MOODLE_19_STABLE 2008-10-08 09:10:05 +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 3440ec1234 MDL-12198 2008-08-08 05:25:54 +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
moodler 9aa82ed6d4 MDL-14399 Merged RTL fixes from 1.9 2008-04-17 08:50:56 +00:00
dongsheng 5a2a53316f MDL-14129, remove all the other error() call 2008-04-04 02:54:20 +00:00