- */
- actionOk: function () {
- this.modal.find('#rollback-form').validation({
- submitHandler: jQuery.proxy(this.submitRollback, this)
- });
- this.modal.find('#rollback-form').submit();
- },
-
- /**
- * Opened.
- */
- opened: function () {
- this.toggleFtpCredentialsForm();
- }
- }
- },
-
- /**
- * @param {*} divId
- */
- showPopup: function (divId) {
- var self = this;
-
- this.modal = jQuery('<div/>').attr({
- id: divId
- }).html(this.backupConfig[divId].content()).modal({
- modalClass: 'magento',
- title: this.backupConfig[divId].title,
- type: 'slide',
-
- /**
- * @param {juery.Event} e
- * @param {Object} modal
- */
- closed: function (e, modal) {
- modal.modal.remove();
- },
-
- /**
- * Opened.
- */
- opened: function () {
- if (self.backupConfig[divId].opened) {
- self.backupConfig[divId].opened.call(self);
- }
- },
- buttons: [{
- text: jQuery.mage.__('Cancel'),
- 'class': 'action cancel',
-
- /**
- * Click action.
- */
- click: function () {
- this.closeModal();
- }
- }, {
- text: jQuery.mage.__('Ok'),
- 'class': 'action primary',
-
- /**
- * Click action.
- */
- click: function () {
- self.backupConfig[divId].actionOk.call(self);
- }
- }]
- });
- this.modal.modal('openModal');
- },