Use identify() when appropriate
authorMichael M Slusarz <slusarz@curecanti.org>
Sun, 18 Jan 2009 02:46:58 +0000 (19:46 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Sun, 18 Jan 2009 08:55:36 +0000 (01:55 -0700)
imp/js/src/DimpBase.js
imp/js/src/dragdrop.js

index 1d80395..c93c3e6 100644 (file)
@@ -690,7 +690,7 @@ var DimpBase = {
         if (!elt) {
             return;
         }
-        this.msgSelect(elt.readAttribute('id'), { ctrl: true, right: true });
+        this.msgSelect(elt.identify(), { ctrl: true, right: true });
         e.stop();
     },
 
@@ -1642,7 +1642,7 @@ var DimpBase = {
                     tmp.up('LI.custom');
                 }
                 if (tmp) {
-                    this.go('app:' + tmp.down('A').readAttribute('id').substring(3));
+                    this.go('app:' + tmp.down('A').identify().substring(3));
                     e.stop();
                     return;
                 }
@@ -1650,7 +1650,7 @@ var DimpBase = {
 
             case 'tabbar':
                 if (e.element().hasClassName('applicationtab')) {
-                    this.go('app:' + e.element().readAttribute('id').substring(6));
+                    this.go('app:' + e.element().identify().substring(6));
                     e.stop();
                     return;
                 }
@@ -2242,7 +2242,7 @@ var DimpBase = {
     // c = (element) Child element
     isSubfolder: function(p, c)
     {
-        var sf = $(this.getSubFolderId(p.readAttribute('id')));
+        var sf = $(this.getSubFolderId(p.identify()));
         return sf && c.descendantOf(sf);
     },
 
index 3060640..2d683e5 100644 (file)
@@ -79,7 +79,7 @@ var DragDrop = {
                 $(document.body).insert(this.div);
             }
 
-            this.drags.set(obj.element.readAttribute('id'), obj);
+            this.drags.set(obj.element.identify(), obj);
         },
 
         unregister: function(obj)
@@ -88,7 +88,7 @@ var DragDrop = {
                 this.drag.deactivate();
             }
 
-            this.drags.unset(obj.element.readAttribute('id'));
+            this.drags.unset(obj.element.identify());
 
             if (!this.drags.size() && this.div) {
                 this.div.remove();
@@ -97,7 +97,7 @@ var DragDrop = {
 
         get_drag: function(el)
         {
-            return this.drags.get(Object.isElement(el) ? $(el).readAttribute('id') : el);
+            return this.drags.get(Object.isElement(el) ? $(el).identify() : el);
         },
 
         activate: function(drag)
@@ -127,7 +127,7 @@ var DragDrop = {
 
         register: function(obj)
         {
-            this.drops.set(obj.element.readAttribute('id'), obj);
+            this.drops.set(obj.element.identify(), obj);
         },
 
         unregister: function(obj)
@@ -136,12 +136,12 @@ var DragDrop = {
                 this.drop = null;
             }
 
-            this.drops.unset(obj.element.readAttribute('id'));
+            this.drops.unset(obj.element.identify());
         },
 
         get_drop: function(el)
         {
-            return this.drops.get(Object.isElement(el) ? $(el).readAttribute('id') : el);
+            return this.drops.get(Object.isElement(el) ? $(el).identify() : el);
         }
     },