diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 5b9efc60e..b6b1bf63d 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -2813,14 +2813,21 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null }); }; - var importFile = function(content) { - // Abort if there is another real user in the channel (history keeper excluded) + // Abort if there is another real user in the channel (history keeper excluded) + var checkChannelUsers = function () { var m = metadataMgr.getChannelMembers().slice().filter(function (nId) { return nId.length === 32; }); if (m.length > 1) { UI.removeModals(); - return void UI.alert(Messages.oo_cantUpload); + UI.alert(Messages.oo_cantUpload); + return true; + } + }; + + var importFile = function(content) { + if (checkChannelUsers()) { + return; } if (!content) { UI.removeModals(); @@ -2862,6 +2869,10 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null if (!supportsXLSX()) { return void UI.alert(Messages.oo_invalidFormat); } + if (checkChannelUsers()) { + return; + } + var div = h('div.cp-oo-x2tXls', [ Icons.get('loading'), h('span', Messages.oo_importInProgress)