mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-07 08:14:42 +03:00
Implement toggle method for iframe-based chat popup
This commit is contained in:
parent
bc16b7c25f
commit
d0f1c50f51
@ -304,6 +304,12 @@ var Mibew = Mibew || {};
|
||||
*/
|
||||
this.isOpened = false;
|
||||
|
||||
/**
|
||||
* Indicates if the popup is minified.
|
||||
* @type {Boolean}
|
||||
*/
|
||||
this.isMinified = false;
|
||||
|
||||
// Load default styles. These styles hide the popup while real styles
|
||||
// are loading.
|
||||
this.attachDefaultStyles();
|
||||
@ -403,6 +409,14 @@ var Mibew = Mibew || {};
|
||||
Mibew.Utils.deleteCookie('mibew-chat-frame-' + this.id);
|
||||
};
|
||||
|
||||
/**
|
||||
* Toggles the popup.
|
||||
*/
|
||||
Mibew.ChatPopup.IFrame.prototype.toggle = function() {
|
||||
this.iframe.style.display = this.isMinified ? "block" : "none";
|
||||
this.isMinified = !this.isMinified;
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructs Window popup.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user