diff --git a/apps/common/main/lib/controller/ReviewChanges.js b/apps/common/main/lib/controller/ReviewChanges.js index aab8177c2..64386ade3 100644 --- a/apps/common/main/lib/controller/ReviewChanges.js +++ b/apps/common/main/lib/controller/ReviewChanges.js @@ -287,6 +287,9 @@ define([ this.popover = Common.Views.ReviewPopover.prototype.getPopover({ reviewStore : this.popoverChanges, renderTo : this.sdkViewName, + canRequestUsers: (this.appConfig) ? this.appConfig.canRequestUsers : undefined, + canRequestSendNotify: (this.appConfig) ? this.appConfig.canRequestSendNotify : undefined, + mentionShare: (this.appConfig) ? this.appConfig.mentionShare : true, api: this.api }); this.popover.setReviewStore(this.popoverChanges); diff --git a/apps/documenteditor/main/app/controller/ViewTab.js b/apps/documenteditor/main/app/controller/ViewTab.js index 31dfecc38..07567b2a5 100644 --- a/apps/documenteditor/main/app/controller/ViewTab.js +++ b/apps/documenteditor/main/app/controller/ViewTab.js @@ -82,7 +82,6 @@ define([ mode: mode, compactToolbar: this.toolbar.toolbar.isCompactView }); - this.addListeners({ 'ViewTab': { 'zoom:topage': _.bind(this.onBtnZoomTo, this, 'topage'), @@ -128,6 +127,10 @@ define([ })).then(function(){ me.view.setEvents(); + if (!Common.UI.Themes.available()) { + me.view.btnInterfaceTheme.$el.closest('.group').remove(); + me.view.$el.find('.separator-theme').remove(); + } if (config.canBrandingExt && config.customization && config.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar')) { me.view.chStatusbar.$el.remove(); var slotChkRulers = me.view.chRulers.$el, @@ -153,30 +156,32 @@ define([ me.view.turnNavigation(state); }); - var menuItems = [], - currentTheme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(); - for (var t in Common.UI.Themes.map()) { - menuItems.push({ - value: t, - caption: Common.UI.Themes.get(t).text, - checked: t === currentTheme, - checkable: true, - toggleGroup: 'interface-theme' - }); - } + if (Common.UI.Themes.available()) { + var menuItems = [], + currentTheme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(); + for (var t in Common.UI.Themes.map()) { + menuItems.push({ + value: t, + caption: Common.UI.Themes.get(t).text, + checked: t === currentTheme, + checkable: true, + toggleGroup: 'interface-theme' + }); + } - if (menuItems.length) { - me.view.btnInterfaceTheme.setMenu(new Common.UI.Menu({items: menuItems})); - me.view.btnInterfaceTheme.menu.on('item:click', _.bind(function (menu, item) { - var value = item.value; - Common.UI.Themes.setTheme(value); - Common.Utils.lockControls(Common.enumLock.inLightTheme, !Common.UI.Themes.isDarkTheme(), {array: [me.view.btnDarkDocument]}); - }, me)); + if (menuItems.length) { + me.view.btnInterfaceTheme.setMenu(new Common.UI.Menu({items: menuItems})); + me.view.btnInterfaceTheme.menu.on('item:click', _.bind(function (menu, item) { + var value = item.value; + Common.UI.Themes.setTheme(value); + Common.Utils.lockControls(Common.enumLock.inLightTheme, !Common.UI.Themes.isDarkTheme(), {array: [me.view.btnDarkDocument]}); + }, me)); - setTimeout(function () { - me.onContentThemeChangedToDark(Common.UI.Themes.isContentThemeDark()); - Common.Utils.lockControls(Common.enumLock.inLightTheme, !Common.UI.Themes.isDarkTheme(), {array: [me.view.btnDarkDocument]}); - }, 0); + setTimeout(function () { + me.onContentThemeChangedToDark(Common.UI.Themes.isContentThemeDark()); + Common.Utils.lockControls(Common.enumLock.inLightTheme, !Common.UI.Themes.isDarkTheme(), {array: [me.view.btnDarkDocument]}); + }, 0); + } } }); } @@ -255,7 +260,7 @@ define([ }, onThemeChanged: function () { - if (this.view) { + if (this.view && Common.UI.Themes.available()) { var current_theme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(), menu_item = _.findWhere(this.view.btnInterfaceTheme.menu.items, {value: current_theme}); if ( menu_item ) { diff --git a/apps/documenteditor/main/app/view/ViewTab.js b/apps/documenteditor/main/app/view/ViewTab.js index b1ce0ad59..407388c79 100644 --- a/apps/documenteditor/main/app/view/ViewTab.js +++ b/apps/documenteditor/main/app/view/ViewTab.js @@ -73,7 +73,7 @@ define([ '' + '' + '' + - '
' + + '' + '