]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14909 Preventing the border from being assigned to label list elements. Merged...
authornicolasconnault <nicolasconnault>
Wed, 29 Apr 2009 09:31:24 +0000 (09:31 +0000)
committernicolasconnault <nicolasconnault>
Wed, 29 Apr 2009 09:31:24 +0000 (09:31 +0000)
lib/ajax/section_classes.js

index 68588fa10a71614ab33271825c2b2d8b6168fae8..c86260358d376264855cafe4522a4d23d85f6904 100755 (executable)
@@ -849,7 +849,9 @@ resource_class.prototype.clear_move_markers = function(target) {
         resources = target.parentObj.resources;
     }
     for (var i=0; i<resources.length; i++) {
-        YAHOO.util.Dom.setStyle(resources[i].getEl().id, 'border', 'none');
+        if (resources[i].getEl() != null) {
+            YAHOO.util.Dom.setStyle(resources[i].getEl().id, 'border', 'none');
+        }
     }
 }
 
@@ -865,8 +867,10 @@ resource_class.prototype.onDragOver = function(e, ids) {
     } else if (target.is == 'section' && target.resources.length > 0) {
         // We need to have a border at the bottom of the last activity in
         // that section.
-        YAHOO.util.Dom.setStyle(target.resources[target.resources.length - 1].getEl().id,
+        if (target.resources[target.resources.length - 1].getEl() != null) {
+            YAHOO.util.Dom.setStyle(target.resources[target.resources.length - 1].getEl().id,
                 'border-bottom', '1px solid #BBB');
+        }
     }
 }