skodak [Fri, 19 Jun 2009 14:25:56 +0000 (14:25 +0000)]
MDL-16438 centralise information about plugins to avoid duplication, includes local customisation conversion to standard plugin structure + fixes for some recent regressions; see tracker for more details and links to docs and forums discussions
tjhunt [Thu, 18 Jun 2009 10:43:13 +0000 (10:43 +0000)]
themes: MDL-19077 implement the renderer_factory instrastructure.
This is part of http://docs.moodle.org/en/Development:Theme_engines_for_Moodle%3F
The concept is that all the print_... functions in weblib get replaced by methods
on a moodle_core_renderer class. Then, the theme can choose whether to
use the standard moodle_core_renderer class, or another implemenatation of
its own choosing, to generate different HTML.
Also, becuase Moodle is modular, we may need a moodle_mod_forum_renderer
and so on.
In order for the theme to be able to choose which renderers get created, we
introduce the concept of a renderer factory, as in the factory design pattern.
The theme will choose which factory should be used, and that then creates
the renderer objects based on the module name.
This commit includes 4 types of factory:
* standard_renderer_factory
* custom_corners_renderer_factory
* theme_overridden_renderer_factory
* template_renderer_factory
All this with unit tests and PHP doc comments.
Note, this new code is not actually used yet. Still todo:
1. actually define the moodle_core_renderer class, and deprecate a lot of weblib functions.
2. make theme_setup initialise everything, so it is used.
tjhunt [Tue, 16 Jun 2009 10:23:56 +0000 (10:23 +0000)]
blocks upgrade: MDL-19511 put back important code that Petr commented out!
The actual mistake was the name of the previous column, which is totally irrelevant, but which XMLDB had filled in incorrectly. Grrr!
dongsheng [Tue, 16 Jun 2009 02:42:32 +0000 (02:42 +0000)]
"MDL-13766, use new API to load javascript files, fix xhtml strict issues in javascript, but YUI cannot work in xml strict mode, so do not true on xml strict option in moodle if you want to use file picker"
tjhunt [Fri, 12 Jun 2009 12:13:07 +0000 (12:13 +0000)]
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.)
tjhunt [Fri, 12 Jun 2009 12:01:16 +0000 (12:01 +0000)]
Fix whitespace, and a minor problem, in javascript-static.
Also, new, more efficient, variant of the select all checkboxes function,
for when they are all in a container with an id.
tjhunt [Fri, 12 Jun 2009 03:13:29 +0000 (03:13 +0000)]
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.