Fix secure iframe conflict with cba button
This commit is contained in:
parent
49eacf752b
commit
c6cb9876a7
@ -1621,11 +1621,13 @@ define([
|
|||||||
if (!data) {
|
if (!data) {
|
||||||
return void UI.alert(Messages.autostore_notAvailable);
|
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 || !data.cmd) { return; }
|
||||||
if (data.cmd === "UPDATE_METADATA") {
|
if (data.cmd === "UPDATE_METADATA") {
|
||||||
if (!data.key) { return; }
|
if (!data.key) { return; }
|
||||||
var metadataMgr = common.getMetadataMgr();
|
|
||||||
var md = Util.clone(metadataMgr.getMetadata());
|
var md = Util.clone(metadataMgr.getMetadata());
|
||||||
md[data.key] = data.value;
|
md[data.key] = data.value;
|
||||||
if (!data.value) { delete md[data.key]; }
|
if (!data.value) { delete md[data.key]; }
|
||||||
|
|||||||
@ -59,7 +59,7 @@ define([
|
|||||||
if (owned && priv.app === 'code') {
|
if (owned && priv.app === 'code') {
|
||||||
(function () {
|
(function () {
|
||||||
var sframeChan = common.getSframeChannel();
|
var sframeChan = common.getSframeChannel();
|
||||||
var md = metadataMgr.getMetadata();
|
var md = (opts.data && opts.data.metadata) || {};
|
||||||
var div = h('div');
|
var div = h('div');
|
||||||
var hint = h('div.cp-app-prop-hint', Messages.cba_hint);
|
var hint = h('div.cp-app-prop-hint', Messages.cba_hint);
|
||||||
var $div = $(div);
|
var $div = $(div);
|
||||||
|
|||||||
@ -1020,12 +1020,12 @@ define([
|
|||||||
};
|
};
|
||||||
SecureModal.$iframe = $('<iframe>', {id: 'sbox-secure-iframe'}).appendTo($('body'));
|
SecureModal.$iframe = $('<iframe>', {id: 'sbox-secure-iframe'}).appendTo($('body'));
|
||||||
SecureModal.modal = SecureIframe.create(config);
|
SecureModal.modal = SecureIframe.create(config);
|
||||||
} else if (!cfg.hidden) {
|
}
|
||||||
|
if (!cfg.hidden) {
|
||||||
SecureModal.modal.refresh(cfg, function () {
|
SecureModal.modal.refresh(cfg, function () {
|
||||||
SecureModal.$iframe.show();
|
SecureModal.$iframe.show();
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
if (cfg.hidden) {
|
|
||||||
SecureModal.$iframe.hide();
|
SecureModal.$iframe.hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,9 +74,10 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Properties modal
|
// Properties modal
|
||||||
create['properties'] = function () {
|
create['properties'] = function (data) {
|
||||||
require(['/common/inner/properties.js'], function (Properties) {
|
require(['/common/inner/properties.js'], function (Properties) {
|
||||||
Properties.getPropertiesModal(common, {
|
Properties.getPropertiesModal(common, {
|
||||||
|
data: data,
|
||||||
onClose: function () {
|
onClose: function () {
|
||||||
hideIframe();
|
hideIframe();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user