2014-07-12 17:34:50 +04:00
|
|
|
(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 () {
|
2014-09-07 14:22:44 +04:00
|
|
|
this.destroy();
|
2014-07-12 17:34:50 +04:00
|
|
|
$.publish(Events.DIALOG_HIDE);
|
|
|
|
};
|
|
|
|
|
2014-09-18 09:18:07 +04:00
|
|
|
ns.AbstractDialogController.prototype.setTitle = function (title) {
|
2014-09-20 11:14:21 +04:00
|
|
|
var dialogTitle = document.querySelector('.dialog-title');
|
|
|
|
if (dialogTitle) {
|
|
|
|
dialogTitle.innerText = title;
|
2014-09-18 09:18:07 +04:00
|
|
|
}
|
|
|
|
};
|
2015-04-14 19:02:33 +03:00
|
|
|
})();
|