diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 781643ba9..120b90a87 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -896,10 +896,6 @@ define([ button = makeButton('print', 'cp-toolbar-icon-print', Messages.printButtonTitle2, Messages.printText); break; case 'history': - if (!AppConfig.enableHistory) { - button = $(''); - break; - } button = makeButton('history', 'cp-toolbar-icon-history', Messages.historyButton, Messages.historyText, Messages.historyButton); if (data.histConfig) { button.click(common.prepareFeedback(type)).on('click', function () { @@ -907,6 +903,9 @@ define([ UI.clearTooltipsDelay(); }); } + if (!AppConfig.enableHistory) { + button.css('display', 'none'); + } break; case 'mediatag': button = $(h('button.cp-toolbar-mediatag', { diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 6a043057f..6adfde21a 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -15,6 +15,7 @@ define([ '/common/common-feedback.js', '/common/hyperscript.js', '/api/config', + '/customize/application_config.js', '/customize/messages.js', '/components/chainpad/chainpad.dist.js', '/file/file-crypto.js', @@ -44,6 +45,7 @@ define([ Feedback, h, ApiConfig, + AppConfig, Messages, ChainPad, FileCrypto, @@ -3220,6 +3222,9 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null text: Messages.historyText, tippy: Messages.historyButton }); + if (!AppConfig.enableHistory) { + $historyButton.css('display', 'none'); + } $historyButton.click(function () { ooChannel.historyLastHash = ooChannel.lastHash;