Fix broken share modal

pull/1/head
yflory 5 years ago
parent f2641bc0ee
commit 22a2b85fae

@ -1001,7 +1001,6 @@ define([
config.onAction = function (data) { config.onAction = function (data) {
if (typeof(SecureModal.cb) !== "function") { return; } if (typeof(SecureModal.cb) !== "function") { return; }
SecureModal.cb(data); SecureModal.cb(data);
SecureModal.$iframe.hide();
}; };
config.onClose = function () { config.onClose = function () {
SecureModal.$iframe.hide(); SecureModal.$iframe.hide();

@ -35,6 +35,7 @@ define([
var $body = $('body'); var $body = $('body');
var hideIframe = function () { var hideIframe = function () {
if (!displayed) { return; }
sframeChan.event('EV_SECURE_IFRAME_CLOSE'); sframeChan.event('EV_SECURE_IFRAME_CLOSE');
}; };
@ -68,7 +69,6 @@ define([
password: priv.password password: priv.password
} }
}); });
$('button.cancel').click(); // Close any existing alertify
_modal = UI.openCustomModal(modal); _modal = UI.openCustomModal(modal);
displayed = modal; displayed = modal;
}; };
@ -237,6 +237,7 @@ define([
if (!create[type]) { return; } if (!create[type]) { return; }
if (displayed && displayed.close) { displayed.close(); } if (displayed && displayed.close) { displayed.close(); }
else if (displayed && displayed.hide) { displayed.hide(); } else if (displayed && displayed.hide) { displayed.hide(); }
$('button.cancel').click(); // Close any existing alertify
displayed = undefined; displayed = undefined;
create[type](data); create[type](data);
}); });

Loading…
Cancel
Save