From d8158863706f77f7b042bcffbbf564565a0e3489 Mon Sep 17 00:00:00 2001 From: vyshane Date: Tue, 14 Nov 2006 03:07:18 +0000 Subject: [PATCH] Merged from 1.7 --- lib/ajax/ajaxcourse.js | 3 ++- lib/ajax/ajaxlib.php | 1 + lib/ajax/block_classes.js | 4 ++-- lib/ajax/section_classes.js | 18 +++++++++--------- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/lib/ajax/ajaxcourse.js b/lib/ajax/ajaxcourse.js index d0d18c6d4a..3346e6a563 100644 --- a/lib/ajax/ajaxcourse.js +++ b/lib/ajax/ajaxcourse.js @@ -150,7 +150,8 @@ main_class.prototype.mk_button = function(tag, imgSrc, attributes, imgAttributes var container = document.createElement(tag); container.style.cursor = 'pointer'; var image = document.createElement('img'); - image.setAttribute('src', main.portal.strings['wwwroot']+imgSrc); + + image.setAttribute('src', main.portal.strings['pixpath']+imgSrc); container.appendChild(image); if (attributes != null) { diff --git a/lib/ajax/ajaxlib.php b/lib/ajax/ajaxlib.php index ccef0a8e79..bf376ce209 100644 --- a/lib/ajax/ajaxlib.php +++ b/lib/ajax/ajaxlib.php @@ -86,6 +86,7 @@ class jsportal { $output .= " main.portal.id = ".$courseid.";\n"; $output .= " main.portal.blocks = new Array(".$blocksoutput.");\n"; $output .= " main.portal.strings['wwwroot']='".$CFG->wwwroot."';\n"; + $output .= " main.portal.strings['pixpath']='".$CFG->pixpath."';\n"; $output .= " main.portal.strings['update']='".get_string('update')."';\n"; $output .= " main.portal.strings['deletecheck']='".get_string('deletecheck','','_var_')."';\n"; $output .= " main.portal.strings['resource']='".get_string('resource')."';\n"; diff --git a/lib/ajax/block_classes.js b/lib/ajax/block_classes.js index 74ae6c88a5..1ce3181740 100644 --- a/lib/ajax/block_classes.js +++ b/lib/ajax/block_classes.js @@ -197,10 +197,10 @@ block_class.prototype.reset_regions = function(){ block_class.prototype.init_buttons = function(){ - var viewbutton = main.mk_button('a','/pix/t/hide.gif',[['class','icon hide']]); + var viewbutton = main.mk_button('a', '/t/hide.gif',[['class','icon hide']]); YAHOO.util.Event.addListener(viewbutton,'click',this.toggle_hide,this,true); - var deletebutton = main.mk_button('a','/pix/t/delete.gif',[['class','icon delete']]); + var deletebutton = main.mk_button('a', '/t/delete.gif',[['class','icon delete']]); YAHOO.util.Event.addListener(deletebutton,'click',this.delete_button,this,true); diff --git a/lib/ajax/section_classes.js b/lib/ajax/section_classes.js index 252eb971c6..7e6efaa593 100755 --- a/lib/ajax/section_classes.js +++ b/lib/ajax/section_classes.js @@ -87,19 +87,19 @@ section_class.prototype.init_buttons = function() { } if (!this.isWeekFormat) { - var highlightbutton = main.mk_button('div', '/pix/i/marker.gif'); + var highlightbutton = main.mk_button('div', '/i/marker.gif'); YAHOO.util.Event.addListener(highlightbutton, 'click', this.mk_marker, this, true); commandContainer.appendChild(highlightbutton); this.highlightButton = highlightbutton; } - var viewbutton = main.mk_button('div', '/pix/i/hide.gif'); + var viewbutton = main.mk_button('div', '/i/hide.gif'); YAHOO.util.Event.addListener(viewbutton, 'click', this.toggle_hide, this,true); commandContainer.appendChild(viewbutton); this.viewButton = viewbutton; } section_class.prototype.add_handle = function() { - var handleRef = main.mk_button('a', '/pix/i/move_2d.gif', [['style','cursor:move']]); + var handleRef = main.mk_button('a', '/i/move_2d.gif', [['style','cursor:move']]); YAHOO.util.Dom.generateId(handleRef, 'sectionHandle'); this.handle = handleRef; @@ -516,7 +516,7 @@ resource_class.prototype.init_buttons = function() { commandContainer.innerHTML = ''; //add move-handle - var handleRef = main.mk_button('a', '/pix/i/move_2d.gif', + var handleRef = main.mk_button('a', '/i/move_2d.gif', [['style', 'cursor:move']], [['height', '11'], ['width', '11'], ['hspace', '2'], ['border', '0']]); @@ -529,14 +529,14 @@ resource_class.prototype.init_buttons = function() { commandContainer.appendChild(updateButton); //add rest - var button = main.mk_button('a', '/pix/t/delete.gif'); + var button = main.mk_button('a', '/t/delete.gif'); YAHOO.util.Event.addListener(button, 'click', this.delete_button, this, true); commandContainer.appendChild(button); if (this.hidden) { - var button = main.mk_button('a', '/pix/t/show.gif'); + var button = main.mk_button('a', '/t/show.gif'); } else { - var button = main.mk_button('a', '/pix/t/hide.gif'); + var button = main.mk_button('a', '/t/hide.gif'); } YAHOO.util.Event.addListener(button, 'click', this.toggle_hide, this, true); commandContainer.appendChild(button); @@ -693,10 +693,10 @@ activity_class.prototype.init_activity = function(id, group, config, parentObj) } } -activity_class.prototype.groupImages = ['/pix/t/groupn.gif', '/pix/t/groups.gif', '/pix/t/groupv.gif']; +activity_class.prototype.groupImages = ['/t/groupn.gif', '/t/groups.gif', '/t/groupv.gif']; activity_class.prototype.init_activity_button = function() { - var button = main.mk_button('a',this.groupImages[this.currentGroup]); + var button = main.mk_button('a', this.groupImages[this.currentGroup]); YAHOO.util.Event.addListener(button,'click',this.toggle_group,this,true); this.commandContainer.appendChild(button); this.groupButton = button; -- 2.39.5