Open the access modal in the secure iframe

This commit is contained in:
yflory
2020-04-07 15:24:12 +02:00
parent 19a0dafbe1
commit 2aec7c2569
6 changed files with 30 additions and 6 deletions

View File

@@ -196,6 +196,7 @@ define([
]);
var $frame = $(frame);
frame.closeModal = function (cb) {
frame.closeModal = function () {}; // Prevent further calls
$frame.fadeOut(150, function () {
$frame.detach();
if (typeof(cb) === "function") { cb(); }

View File

@@ -1592,11 +1592,7 @@ define([
.text(Messages.accessButton))
.click(common.prepareFeedback(type))
.click(function () {
require(['/common/inner/access.js'], function (Access) {
Access.getAccessModal(common, {}, function (e) {
if (e) { console.error(e); }
});
});
sframeChan.event('EV_ACCESS_OPEN');
});
break;
case 'properties':

View File

@@ -129,7 +129,10 @@ define([
tabs[i] = {
content: c && UI.dialog.customModal(node, {
buttons: obj.buttons || button,
onClose: function () { blocked = false; }
onClose: function () {
blocked = false;
if (typeof(opts.onClose) === "function") { opts.onClose(); }
}
}),
disabled: !c,
title: obj.title,

View File

@@ -1020,6 +1020,10 @@ define([
initSecureModal('filepicker', data || {}, cb);
});
sframeChan.on('EV_ACCESS_OPEN', function (data) {
initSecureModal('access', data || {}, null);
});
sframeChan.on('EV_SHARE_OPEN', function (data) {
initSecureModal('share', data || {}, null);
});