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();
-
},
/**
*/
show : function()
{
- if(!this.getEl()){
+ if(!this.getVisibilityEl()){
return;
}
+
+ this.getVisibilityEl().removeClass(['hidden','d-none']);
- this.getEl().removeClass('hidden');
- this.getVisibilityEl().removeClass('hidden');
+ this.fireEvent('show', this);
},
*/
hide: function()
{
- if(!this.getEl() || this.getEl().hasClass('hidden')){
+ if(!this.getVisibilityEl()){
return;
}
- this.getEl().addClass('hidden');
-
- if(!this.hideParent){
- return;
- }
+ this.getVisibilityEl().addClass(['hidden','d-none']);
- this.parent().getEl().addClass('hidden');
+ this.fireEvent('hide', this);
}
});