diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index fb864f1e5..1432decb3 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -2200,6 +2200,7 @@ define([ config.onInit = function (info) { var privateData = metadataMgr.getPrivateData(); + metadataMgr.setDegraded(false); // FIXME degraded moded unsupported (no cursor channel) readOnly = privateData.readOnly; diff --git a/www/common/sframe-app-framework.js b/www/common/sframe-app-framework.js index 802bdc341..20d57fd07 100644 --- a/www/common/sframe-app-framework.js +++ b/www/common/sframe-app-framework.js @@ -585,6 +585,8 @@ define([ var hjson = normalize(JSON.parse(newContentStr)); evCursorUpdate.fire(data, hjson); }); + } else { + common.getMetadataMgr().setDegraded(false); } UI.removeLoadingScreen(emitResize); diff --git a/www/common/toolbar.js b/www/common/toolbar.js index ccb82a2d8..dd79f24a9 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -216,11 +216,11 @@ MessengerUI, Messages) { $('').text(Messages.userlist_offline).appendTo($editUsersList); numberOfEditUsers = '?'; numberOfViewUsers = '?'; - } - - if (metadataMgr.isDegraded()) { + } else if (metadataMgr.isDegraded()) { numberOfEditUsers = Math.max(metadataMgr.getChannelMembers().length - 1, 0); numberOfViewUsers = ''; + Messages.toolbar_degraded = "Too many editors are present in the pad. The userlist has been disabled to improve performances"; // XXX + $('').text(Messages.toolbar_degraded).appendTo($editUsersList); } // Update the buttons @@ -231,11 +231,7 @@ MessengerUI, Messages) { if (!online) { return; } - if (metadataMgr.isDegraded()) { - Messages.toolbar_degraded = "Too many editors are present in the pad. The userlist has been disabled to improve performances"; // XXX - $('').text(Messages.toolbar_degraded).appendTo($editUsersList); - return; - } + if (metadataMgr.isDegraded()) { return; } // Display the userlist diff --git a/www/poll/inner.js b/www/poll/inner.js index 101c89e7e..5d31d917d 100644 --- a/www/poll/inner.js +++ b/www/poll/inner.js @@ -1313,6 +1313,7 @@ define([ }).nThen(function (/* waitFor */) { Test.registerInner(common.getSframeChannel()); var metadataMgr = common.getMetadataMgr(); + metadataMgr.setDegraded(false); // FIXME degarded mode unsupported (no cursor channel) APP.locked = APP.readOnly = metadataMgr.getPrivateData().readOnly; APP.loggedIn = common.isLoggedIn();