MDL-19690 - more $CFG->pixpath to $OUTPUT->old_icon_url

This commit is contained in:
tjhunt
2009-07-03 06:38:41 +00:00
parent 0f171ca620
commit a28c92539e
8 changed files with 37 additions and 33 deletions
+7 -5
View File
@@ -876,9 +876,11 @@ function moodle_initialise_body() {
* @param String userpref the user preference that records the state of this box. false if none.
* @param Boolean startcollapsed whether the box should start collapsed.
*/
function collapsible_region(id, userpref, strtooltip) {
function collapsible_region(id, userpref, strtooltip, collapsedicon, expandedicon) {
// Record the pref name
this.userpref = userpref;
this.collapsedicon = collapsedicon;
this.expandedicon = expandedicon;
// Find the divs in the document.
this.div = document.getElementById(id);
@@ -912,9 +914,9 @@ function collapsible_region(id, userpref, strtooltip) {
this.icon.id = id + '_icon';
this.icon.alt = '';
if (this.collapsed) {
this.icon.src = moodle_cfg.pixpath + '/t/collapsed.png';
this.icon.src = this.collapsedicon;
} else {
this.icon.src = moodle_cfg.pixpath + '/t/expanded.png';
this.icon.src = this.expandedicon;
}
a.appendChild(this.icon);
@@ -987,9 +989,9 @@ collapsible_region.prototype.handle_click = function(e) {
// Set the appropriate icon.
if (this.collapsed) {
this.icon.src = moodle_cfg.pixpath + '/t/collapsed.png';
this.icon.src =this.collapsedicon;
} else {
this.icon.src = moodle_cfg.pixpath + '/t/expanded.png';
this.icon.src = this.expandedicon;
}
// Update the user preference.