empty mask on tables
[roojs1] / Roo / Element.js
index 77d6108..a8e9cd8 100644 (file)
@@ -89,6 +89,9 @@ if(opt.anim.isAnimated()){
     {
         var dom = typeof element == "string" ?
                 document.getElementById(element) : element;
+        
+        this.listeners = {};
+        
         if(!dom){ // invalid id/element
             return null;
         }
@@ -109,7 +112,7 @@ if(opt.anim.isAnimated()){
          */
         this.id = id || Roo.id(dom);
         
-        this.listeners = {};
+        return this; // assumed for cctor?
     };
 
     var El = Roo.Element;
@@ -1230,7 +1233,7 @@ if(opt.anim.isAnimated()){
             //action on double tap goes below
              
         }, 
-
         /**
          * Removes an event handler from this element
          * @param {String} eventName the type of event to remove
@@ -1240,7 +1243,7 @@ if(opt.anim.isAnimated()){
          */
         removeListener : function(eventName, fn, scope){
             Roo.EventManager.removeListener(this.dom,  eventName, fn);
-            if (typeof(this.listeners[eventName]) == 'undefined') {
+            if (typeof(this.listeners) == 'undefined'  || typeof(this.listeners[eventName]) == 'undefined') {
                 return this;
             }
             this.listeners[eventName].removeListener(fn, scope);
@@ -2168,7 +2171,7 @@ if(opt.anim.isAnimated()){
          * Puts a mask over this element to disable user interaction. Requires core.css.
          * This method can only be applied to elements which accept child nodes.
          * @param {String} msg (optional) A message to display in the mask
-         * @param {String} msgCls (optional) A css class to apply to the msg element
+         * @param {String} msgCls (optional) A css class to apply to the msg element - use no-spinner to hide the spinner on bootstrap
          * @return {Element} The mask  element
          */
         mask : function(msg, msgCls)
@@ -2381,7 +2384,7 @@ if(opt.anim.isAnimated()){
           Roo.EventManager.removeResizeListener(this.fitToParentDelegate); // always remove previous fitToParent delegate from onWindowResize
           this.fitToParentDelegate = Roo.emptyFn; // remove reference to previous delegate
           if (monitorResize === true && !this.dom.parentNode) { // check if this Element still exists
-            return;
+            return this;
           }
           var p = Roo.get(targetParent || this.dom.parentNode);
           this.setSize(p.getComputedWidth() - p.getFrameWidth('lr'), p.getComputedHeight() - p.getFrameWidth('tb'));