lib/ajax/ MDL-25675 Use className instead of classList.toString()
authorAndrew Robert Nicols <andrew.nicols@luns.net.uk>
Tue, 14 Dec 2010 16:49:57 +0000 (16:49 +0000)
committerDan Poltawski <dan.poltawski@luns.net.uk>
Wed, 5 Jan 2011 23:26:28 +0000 (23:26 +0000)
Signed-off-by: Andrew Robert Nicols <andrew.nicols@luns.net.uk>
Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
lib/ajax/section_classes.js

index 9acf607..bc52f95 100755 (executable)
@@ -736,7 +736,7 @@ resource_class.prototype.indent_left = function() {
         }
         return false;
     }
-    var oldindent = indentdiv.classList.toString().match(/mod-indent-(\d{1,})/);
+    var oldindent = indentdiv.className.match(/mod-indent-(\d{1,})/);
     if (oldindent && oldindent[1] > 0) {
         oldindent = oldindent[1];
     } else {
@@ -767,7 +767,7 @@ resource_class.prototype.indent_right = function() {
         }
         return false;
     }
-    var oldindent = indentdiv.classList.toString().match(/mod-indent-(\d{1,})/);
+    var oldindent = indentdiv.className.match(/mod-indent-(\d{1,})/);
     if (oldindent && oldindent[1] >= 0) {
         oldindent = oldindent[1];
         var newindent = parseFloat(oldindent) + 1;