]> git.mjollnir.org Git - moodle.git/commitdiff
Merged from 1.7
authorvyshane <vyshane>
Tue, 14 Nov 2006 03:07:18 +0000 (03:07 +0000)
committervyshane <vyshane>
Tue, 14 Nov 2006 03:07:18 +0000 (03:07 +0000)
lib/ajax/ajaxcourse.js
lib/ajax/ajaxlib.php
lib/ajax/block_classes.js
lib/ajax/section_classes.js

index d0d18c6d4a24d5ab31b90d28858dc8c1874a0957..3346e6a56369158835ddf17fa291c09a77cdcec4 100644 (file)
@@ -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) {
index ccef0a8e799ed5719d5c8dcb429c205ac2708d11..bf376ce20941ea1d0cd5bfe47ad4fdf3dd8db839 100644 (file)
@@ -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";
index 74ae6c88a545a7e2be46584f7a23d376fec33230..1ce31817404b67c1ff026e5e80eceee887d4356b 100644 (file)
@@ -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);       
        
        
index 252eb971c6df057faabf9ae1d740ab8397a3f137..7e6efaa593520743d833e4b9adfd7b560f1d68c3 100755 (executable)
@@ -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;