mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-12 02:21:09 +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;
|
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
|
// Load default styles. These styles hide the popup while real styles
|
||||||
// are loading.
|
// are loading.
|
||||||
this.attachDefaultStyles();
|
this.attachDefaultStyles();
|
||||||
@ -403,6 +409,14 @@ var Mibew = Mibew || {};
|
|||||||
Mibew.Utils.deleteCookie('mibew-chat-frame-' + this.id);
|
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.
|
* Constructs Window popup.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user