mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
25 lines
730 B
JavaScript
25 lines
730 B
JavaScript
(function () {
|
|
var ns = $.namespace('pskl.controller.dialogs');
|
|
|
|
ns.AbstractDialogController = function () {};
|
|
|
|
ns.AbstractDialogController.prototype.init = function () {
|
|
this.closeButton = document.querySelector('.dialog-close');
|
|
this.closeButton.addEventListener('click', this.closeDialog.bind(this));
|
|
};
|
|
|
|
ns.AbstractDialogController.prototype.destroy = function () {};
|
|
|
|
ns.AbstractDialogController.prototype.closeDialog = function () {
|
|
this.destroy();
|
|
$.publish(Events.DIALOG_HIDE);
|
|
};
|
|
|
|
ns.AbstractDialogController.prototype.setTitle = function (title) {
|
|
var dialogTitle = document.querySelector('.dialog-title');
|
|
if (dialogTitle) {
|
|
dialogTitle.innerText = title;
|
|
}
|
|
};
|
|
})();
|