]> git.mjollnir.org Git - moodle.git/commitdiff
Merged from 1.7.
authorvyshane <vyshane>
Thu, 16 Nov 2006 05:30:28 +0000 (05:30 +0000)
committervyshane <vyshane>
Thu, 16 Nov 2006 05:30:28 +0000 (05:30 +0000)
lib/ajax/block_classes.js
lib/ajax/section_classes.js

index 55a76a27190659044eec4c994eea4e3c85e29525..a94aae48c8bcfbb1efb87482492638762ee68813 100644 (file)
@@ -226,7 +226,7 @@ block_class.prototype.toggle_hide = function(e, target, isCosmetic) {
         this.viewbutton.childNodes[0].src = this.viewbutton.childNodes[0].src.replace(/show.gif/i, 'hide.gif');
 
         if (!isCosmetic) {
-                       main.connect('post', 'class=block&field=visible', null,
+                       main.connect('POST', 'class=block&field=visible', null,
                                                 'value=1&instanceId='+this.instanceId);
                }
     } else {
@@ -235,7 +235,7 @@ block_class.prototype.toggle_hide = function(e, target, isCosmetic) {
         this.viewbutton.childNodes[0].src = this.viewbutton.childNodes[0].src.replace(/hide.gif/i,'show.gif');
 
         if (!isCosmetic) {
-                       main.connect('post', 'class=block&field=visible', null,
+                       main.connect('POST', 'class=block&field=visible', null,
                                                 'value=0&instanceId='+this.instanceId);
         }
     }
@@ -251,7 +251,7 @@ block_class.prototype.delete_button = function() {
         main.leftcolumn.remove_block(this);
        }
     //remove from remote model
-    main.connect('delete','class=block&instanceId='+this.instanceId);
+    main.connect('DELETE','class=block&instanceId='+this.instanceId);
         
     //remove from view
     main.blocks[main.get_block_index(this)] = null;
@@ -265,7 +265,7 @@ block_class.prototype.delete_button = function() {
 
 block_class.prototype.updatePosition = function(index, columnId) {
        //update the db for the position
-    main.connectQueue_add('post', 'class=block&field=position', null,
+    main.connectQueue_add('POST', 'class=block&field=position', null,
                        'value='+index+'&column='+columnId+'&instanceId='+this.instanceId);
 
     if (this.debug) {
index 7e6efaa593520743d833e4b9adfd7b560f1d68c3..18f8e3630f1328a539208e03c0a18ecd3117ce88 100755 (executable)
@@ -211,7 +211,7 @@ section_class.prototype.move_to_section = function(target) {
     }
 
     //move on backend
-    main.connect('post','class=section&field=move',null,'id='+this.sectionId+'&value='
+    main.connect('POST','class=section&field=move',null,'id='+this.sectionId+'&value='
                                        +(target.sectionId - this.sectionId));
 
     //move on front end
@@ -264,7 +264,7 @@ section_class.prototype.toggle_hide = function(e,target,superficial) {
         this.hidden = false;
 
         if (!superficial) {
-            main.connect('post', 'class=section&field=visible', null, 'value=1&id='+this.sectionId);
+            main.connect('POST', 'class=section&field=visible', null, 'value=1&id='+this.sectionId);
             for (var x=0; x<this.resources.length; x++) {                                
                 this.resources[x].toggle_hide(null, null, true, this.resources[x].hiddenStored);
                 this.resources[x].hiddenStored = null;
@@ -277,7 +277,7 @@ section_class.prototype.toggle_hide = function(e,target,superficial) {
         this.hidden = true;
 
         if (!superficial) {
-            main.connect('post', 'class=section&field=visible', null, 'value=0&id='+this.sectionId);
+            main.connect('POST', 'class=section&field=visible', null, 'value=0&id='+this.sectionId);
             for (var x=0; x<this.resources.length; x++) {
                 this.resources[x].hiddenStored = this.resources[x].hidden;                                
                 this.resources[x].toggle_hide(null, null, true, true);
@@ -303,7 +303,7 @@ section_class.prototype.mk_marker = function() {
     } else {//if currently the marker
         main.marker = null;
 
-        main.connect('post', 'class=course&field=marker', null, 'value=0');
+        main.connect('POST', 'class=course&field=marker', null, 'value=0');
         this.toggle_highlight();
     }
 }    
@@ -312,7 +312,7 @@ section_class.prototype.changeId = function(newId) {
     this.sectionId = newId;       
     this.numberDisplay.firstChild.data = newId;                      
 
-    //main.connectQueue_add('post','class=section&field=all',null,'id='+newId+"&summary="+main.mk_safe_for_transport(this.summary)+"&sequence="+this.write_sequence_list(true)+'&visible='+(this.hidden?0:1))           
+    //main.connectQueue_add('POST','class=section&field=all',null,'id='+newId+"&summary="+main.mk_safe_for_transport(this.summary)+"&sequence="+this.write_sequence_list(true)+'&visible='+(this.hidden?0:1))           
 
     if (main.marker == this) {
         main.update_marker(this);                   
@@ -382,7 +382,7 @@ section_class.prototype.insert_resource = function(el, targetel) {
        if (this.debug) {
                YAHOO.log('id='+el.id+', beforeId='+targetId+', sectionId='+this.sectionId);
        }
-       main.connect('post', 'class=resource&field=move', null,
+       main.connect('POST', 'class=resource&field=move', null,
                        'id='+el.id+'&beforeId='+targetId+'&sectionId='+this.sectionId);
 
     //if inserting into a hidden resource hide
@@ -557,7 +557,7 @@ resource_class.prototype.toggle_hide = function(target, e, superficial, force) {
         this.hidden = false;  
 
         if (!superficial) {
-            main.connect('post', 'class=resource&field=visible', null, 'value=1&id='+this.id);
+            main.connect('POST', 'class=resource&field=visible', null, 'value=1&id='+this.id);
         }
     } else {
         YAHOO.util.Dom.addClass(this.linkContainer, 'dimmed');
@@ -565,7 +565,7 @@ resource_class.prototype.toggle_hide = function(target, e, superficial, force) {
         this.hidden = true;
 
         if (!superficial) {
-            main.connect('post', 'class=resource&field=visible', null, 'value=0&id='+this.id);
+            main.connect('POST', 'class=resource&field=visible', null, 'value=0&id='+this.id);
         }
     }
 }
@@ -580,7 +580,7 @@ resource_class.prototype.delete_button = function() {
     this.getEl().parentNode.removeChild(this.getEl());
     this.parentObj.remove_resource(this);
 
-    main.connect('delete', 'class=resource&id='+this.id);
+    main.connect('DELETE', 'class=resource&id='+this.id);
 }  
 
 resource_class.prototype.update_index = function(index) {
@@ -724,5 +724,5 @@ activity_class.prototype.toggle_group = function() {
        }
     this.groupButton.getElementsByTagName('img')[0].src = main.portal.wwwroot + this.groupImages[this.currentGroup];
 
-    main.connect('post', 'class=resource&field=groupmode', null, 'value='+this.currentGroup+'&id='+this.id);
+    main.connect('POST', 'class=resource&field=groupmode', null, 'value='+this.currentGroup+'&id='+this.id);
 }