remove debugging code
[roojs1] / Roo / bootstrap / Component.js
index 26a4ce3..01b90dc 100644 (file)
@@ -366,19 +366,28 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
         return cn;
     },
     
+    /**
+     * Set the element that will be used to show or hide
+     */
+    setVisibilityEl : function(el)
+    {
+       this.visibilityEl = el;
+    },
+    
+     /**
+     * Get the element that will be used to show or hide
+     */
     getVisibilityEl : function()
     {
-       
        if (typeof(this.visibilityEl) == 'object') {
-           return this.visibilityEl.getEl();
+           return this.visibilityEl;
        }
+       
        if (typeof(this.visibilityEl) == 'string') {
            return this.visibilityEl == 'parent' ? this.parent().getEl() : this.getEl();
        }
        
-       
        return this.getEl();
-       
     },
     
     /**
@@ -386,11 +395,13 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
      */
     show : function()
     {
-        if(!this.getEl()){
+        if(!this.getVisibilityEl()){
             return;
         }
          
-        this.getVisibilityEl().removeClass('hidden');
+        this.getVisibilityEl().removeClass(['hidden','d-none']);
+        
+        this.fireEvent('show', this);
         
         
     },
@@ -399,11 +410,13 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
      */
     hide: function()
     {
-        if(!this.getEl() || this.getEl().hasClass('hidden')){
+        if(!this.getVisibilityEl()){
             return;
         }
         
-        this.getVisibilityEl().removeClass('hidden');
+        this.getVisibilityEl().addClass(['hidden','d-none']);
+        
+        this.fireEvent('hide', this);
         
     }
 });