Fix secure iframe conflict with cba button

pull/1/head
yflory 5 years ago
parent 49eacf752b
commit c6cb9876a7

@ -1621,11 +1621,13 @@ define([
if (!data) {
return void UI.alert(Messages.autostore_notAvailable);
}
sframeChan.query('Q_PROPERTIES_OPEN', null, function (err, data) {
var metadataMgr = common.getMetadataMgr();
sframeChan.query('Q_PROPERTIES_OPEN', {
metadata: metadataMgr.getMetadata()
}, function (err, data) {
if (!data || !data.cmd) { return; }
if (data.cmd === "UPDATE_METADATA") {
if (!data.key) { return; }
var metadataMgr = common.getMetadataMgr();
var md = Util.clone(metadataMgr.getMetadata());
md[data.key] = data.value;
if (!data.value) { delete md[data.key]; }

@ -59,7 +59,7 @@ define([
if (owned && priv.app === 'code') {
(function () {
var sframeChan = common.getSframeChannel();
var md = metadataMgr.getMetadata();
var md = (opts.data && opts.data.metadata) || {};
var div = h('div');
var hint = h('div.cp-app-prop-hint', Messages.cba_hint);
var $div = $(div);

@ -1020,12 +1020,12 @@ define([
};
SecureModal.$iframe = $('<iframe>', {id: 'sbox-secure-iframe'}).appendTo($('body'));
SecureModal.modal = SecureIframe.create(config);
} else if (!cfg.hidden) {
}
if (!cfg.hidden) {
SecureModal.modal.refresh(cfg, function () {
SecureModal.$iframe.show();
});
}
if (cfg.hidden) {
} else {
SecureModal.$iframe.hide();
return;
}

@ -74,9 +74,10 @@ define([
};
// Properties modal
create['properties'] = function () {
create['properties'] = function (data) {
require(['/common/inner/properties.js'], function (Properties) {
Properties.getPropertiesModal(common, {
data: data,
onClose: function () {
hideIframe();
}

Loading…
Cancel
Save