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([ '' + '' + '' + - '
' + + '
' + '
' + '
' + '' + diff --git a/apps/documenteditor/main/index.html b/apps/documenteditor/main/index.html index f20c40c65..d5d34d2b4 100644 --- a/apps/documenteditor/main/index.html +++ b/apps/documenteditor/main/index.html @@ -255,8 +255,10 @@ window.frameEditorId = params["frameEditorId"]; window.parentOrigin = params["parentOrigin"]; - if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) + if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) { document.write(' diff --git a/apps/presentationeditor/main/app/controller/ViewTab.js b/apps/presentationeditor/main/app/controller/ViewTab.js index 04e6e4469..4e2249cf4 100644 --- a/apps/presentationeditor/main/app/controller/ViewTab.js +++ b/apps/presentationeditor/main/app/controller/ViewTab.js @@ -85,7 +85,6 @@ define([ mode: mode, compactToolbar: this.toolbar.toolbar.isCompactView }); - this.addListeners({ 'ViewTab': { 'zoom:toslide': _.bind(this.onBtnZoomTo, this, 'toslide'), @@ -152,6 +151,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(); @@ -173,24 +176,26 @@ define([ .on('combo:blur', _.bind(me.onComboBlur, me, false)); }); - 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) { - this.view.btnInterfaceTheme.setMenu(new Common.UI.Menu({items: menuItems})); - this.view.btnInterfaceTheme.menu.on('item:click', _.bind(function (menu, item) { - var value = item.value; - Common.UI.Themes.setTheme(value); - }, this)); + if (menuItems.length) { + this.view.btnInterfaceTheme.setMenu(new Common.UI.Menu({items: menuItems})); + this.view.btnInterfaceTheme.menu.on('item:click', _.bind(function (menu, item) { + var value = item.value; + Common.UI.Themes.setTheme(value); + }, this)); + } } } }, @@ -220,7 +225,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/presentationeditor/main/app/view/ViewTab.js b/apps/presentationeditor/main/app/view/ViewTab.js index eb85507a4..45ea8deae 100644 --- a/apps/presentationeditor/main/app/view/ViewTab.js +++ b/apps/presentationeditor/main/app/view/ViewTab.js @@ -68,7 +68,7 @@ define([ '
' + '' + '
' + - '
' + + '
' + '
' + '
' + '' + diff --git a/apps/presentationeditor/main/index.html b/apps/presentationeditor/main/index.html index ee876897f..9011ca82b 100644 --- a/apps/presentationeditor/main/index.html +++ b/apps/presentationeditor/main/index.html @@ -270,8 +270,10 @@ window.frameEditorId = params["frameEditorId"]; window.parentOrigin = params["parentOrigin"]; - if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) + if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) { document.write(' diff --git a/apps/presentationeditor/main/resources/less/leftmenu.less b/apps/presentationeditor/main/resources/less/leftmenu.less index c17b701a1..900f7ceb6 100644 --- a/apps/presentationeditor/main/resources/less/leftmenu.less +++ b/apps/presentationeditor/main/resources/less/leftmenu.less @@ -123,6 +123,7 @@ background-color: @highlight-button-pressed; > a { + color: @text-normal-pressed-ie; color: @text-normal-pressed; } } diff --git a/apps/spreadsheeteditor/main/app/controller/ViewTab.js b/apps/spreadsheeteditor/main/app/controller/ViewTab.js index 66637dbd8..1260ac14e 100644 --- a/apps/spreadsheeteditor/main/app/controller/ViewTab.js +++ b/apps/spreadsheeteditor/main/app/controller/ViewTab.js @@ -84,7 +84,6 @@ define([ mode: mode, compactToolbar: this.toolbar.toolbar.isCompactView }); - this.addListeners({ 'ViewTab': { 'zoom:selected': _.bind(this.onSelectedZoomValue, this), @@ -276,7 +275,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/spreadsheeteditor/main/app/view/ViewTab.js b/apps/spreadsheeteditor/main/app/view/ViewTab.js index 768cba77c..b095bf02c 100644 --- a/apps/spreadsheeteditor/main/app/view/ViewTab.js +++ b/apps/spreadsheeteditor/main/app/view/ViewTab.js @@ -71,7 +71,7 @@ define([ '
' + '' + '
' + - '
' + + '
' + '
' + '' + '
' + @@ -307,7 +307,6 @@ define([ dataHintOffset: 'small' }); this.lockedControls.push(this.chToolbar); - Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this)); }, @@ -385,6 +384,11 @@ define([ me.toolbar && me.toolbar.$el.find('.group.sheet-gridlines').hide(); } + if (!Common.UI.Themes.available()) { + me.btnInterfaceTheme.$el.closest('.group').remove(); + me.$el.find('.separator-theme').remove(); + } + if (config.canBrandingExt && config.customization && config.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar')) { me.chStatusbar.$el.remove(); if (!config.isEdit) { @@ -396,26 +400,26 @@ define([ me.$el.find('.separator-formula').remove(); } } - 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.btnInterfaceTheme.setMenu(new Common.UI.Menu({items: menuItems})); + me.btnInterfaceTheme.menu.on('item:click', _.bind(function (menu, item) { + var value = item.value; + Common.UI.Themes.setTheme(value); + }, me)); + } } - - if (menuItems.length) { - me.btnInterfaceTheme.setMenu(new Common.UI.Menu({items: menuItems})); - me.btnInterfaceTheme.menu.on('item:click', _.bind(function (menu, item) { - var value = item.value; - Common.UI.Themes.setTheme(value); - }, me)); - } - setEvents.call(me); }); }, diff --git a/apps/spreadsheeteditor/main/index.html b/apps/spreadsheeteditor/main/index.html index e091cc9f8..f5a3aeb1d 100644 --- a/apps/spreadsheeteditor/main/index.html +++ b/apps/spreadsheeteditor/main/index.html @@ -278,8 +278,10 @@ window.frameEditorId = params["frameEditorId"]; window.parentOrigin = params["parentOrigin"]; - if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) + if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) { document.write(' diff --git a/apps/spreadsheeteditor/main/resources/less/leftmenu.less b/apps/spreadsheeteditor/main/resources/less/leftmenu.less index 33c621b7e..e27c5b3eb 100644 --- a/apps/spreadsheeteditor/main/resources/less/leftmenu.less +++ b/apps/spreadsheeteditor/main/resources/less/leftmenu.less @@ -117,6 +117,7 @@ background-color: @highlight-button-pressed; > a { + color: @text-normal-pressed-ie; color: @text-normal-pressed; } }