diff --git a/apps/common/main/lib/controller/Themes.js b/apps/common/main/lib/controller/Themes.js
index 722f42cf77..1f09cb8a13 100644
--- a/apps/common/main/lib/controller/Themes.js
+++ b/apps/common/main/lib/controller/Themes.js
@@ -39,6 +39,10 @@ define([
// getComputedStyle(document.documentElement).getPropertyValue('--background-normal');
},
+ available: function () {
+ return !Common.Utils.isIE;
+ },
+
current: function () {
return Common.localStorage.getItem('ui-theme', 'theme-light');
},
diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js
index bd3df33b7a..e2a67324f6 100644
--- a/apps/documenteditor/main/app/controller/Main.js
+++ b/apps/documenteditor/main/app/controller/Main.js
@@ -387,7 +387,6 @@ define([
this.appOptions.canFeatureComparison = !!this.api.asc_isSupportFeature("comparison");
this.appOptions.canFeatureContentControl = !!this.api.asc_isSupportFeature("content-controls");
this.appOptions.mentionShare = !((typeof (this.appOptions.customization) == 'object') && (this.appOptions.customization.mentionShare==false));
- this.appOptions.canChangeUITheme = true;
this.appOptions.user.guest && this.appOptions.canRenameAnonymous && Common.NotificationCenter.on('user:rename', _.bind(this.showRenameUserDialog, this));
diff --git a/apps/documenteditor/main/app/controller/Viewport.js b/apps/documenteditor/main/app/controller/Viewport.js
index e3728a8898..4262f468da 100644
--- a/apps/documenteditor/main/app/controller/Viewport.js
+++ b/apps/documenteditor/main/app/controller/Viewport.js
@@ -313,7 +313,7 @@ define([
cls : 'btn-toolbar'
})).on('click', _on_btn_zoom.bind(me, 'up'));
- if ( config.canChangeUITheme ) {
+ if ( Common.UI.Themes.available() ) {
var mnuitemDarkTheme = new Common.UI.MenuItem({
caption: me.header.textDarkTheme,
checked: Common.UI.Themes.isDarkTheme(),
diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js
index 15a47b721d..757772616e 100644
--- a/apps/documenteditor/main/app/view/FileMenuPanels.js
+++ b/apps/documenteditor/main/app/view/FileMenuPanels.js
@@ -244,7 +244,7 @@ define([
'
| ',
'','
',
/** coauthoring end **/
- '',
+ '
',
' | ',
' | ',
'
','
',
@@ -535,6 +535,9 @@ define([
/** coauthoring end **/
$('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show']();
+ if ( !Common.UI.Themes.available() ) {
+ $('tr.themes, tr.themes + tr.divider', this.el).hide();
+ }
},
setApi: function(o) {
diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js
index c005f1997a..ef200e2b04 100644
--- a/apps/presentationeditor/main/app/controller/Main.js
+++ b/apps/presentationeditor/main/app/controller/Main.js
@@ -345,7 +345,6 @@ define([
this.appOptions.compatibleFeatures = (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compatibleFeatures;
this.appOptions.canRequestSharingSettings = this.editorConfig.canRequestSharingSettings;
this.appOptions.mentionShare = !((typeof (this.appOptions.customization) == 'object') && (this.appOptions.customization.mentionShare==false));
- this.appOptions.canChangeUITheme = true;
this.appOptions.user.guest && this.appOptions.canRenameAnonymous && Common.NotificationCenter.on('user:rename', _.bind(this.showRenameUserDialog, this));
diff --git a/apps/presentationeditor/main/app/controller/Viewport.js b/apps/presentationeditor/main/app/controller/Viewport.js
index 1627ca6986..57d6e7337e 100644
--- a/apps/presentationeditor/main/app/controller/Viewport.js
+++ b/apps/presentationeditor/main/app/controller/Viewport.js
@@ -316,7 +316,7 @@ define([
cls : 'btn-toolbar'
})).on('click', _on_btn_zoom.bind(me, 'up'));
- if ( config.canChangeUITheme ) {
+ if ( Common.UI.Themes.available() ) {
var mnuitemDarkTheme = new Common.UI.MenuItem({
caption: me.header.textDarkTheme,
checked: Common.UI.Themes.isDarkTheme(),
diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js
index 6b6a3fbce8..d11a5047d0 100644
--- a/apps/presentationeditor/main/app/view/FileMenuPanels.js
+++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js
@@ -214,7 +214,7 @@ define([
'',
'','
',
/** coauthoring end **/
- '',
+ '
',
' | ',
' | ',
'
','
',
@@ -471,6 +471,10 @@ define([
$('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring ? 'show' : 'hide']();
/** coauthoring end **/
$('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show']();
+
+ if ( !Common.UI.Themes.available() ) {
+ $('tr.themes, tr.themes + tr.divider', this.el).hide();
+ }
},
setApi: function(o) {
diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js
index d1e10747d2..9303a01b3c 100644
--- a/apps/spreadsheeteditor/main/app/controller/Main.js
+++ b/apps/spreadsheeteditor/main/app/controller/Main.js
@@ -374,7 +374,6 @@ define([
this.appOptions.canMakeActionLink = this.editorConfig.canMakeActionLink;
this.appOptions.canFeaturePivot = true;
this.appOptions.canFeatureViews = !!this.api.asc_isSupportFeature("sheet-views");
- this.appOptions.canChangeUITheme = true;
if (this.appOptions.user.guest && this.appOptions.canRenameAnonymous && !this.appOptions.isEditDiagram && !this.appOptions.isEditMailMerge)
Common.NotificationCenter.on('user:rename', _.bind(this.showRenameUserDialog, this));
diff --git a/apps/spreadsheeteditor/main/app/controller/Viewport.js b/apps/spreadsheeteditor/main/app/controller/Viewport.js
index 3d20427541..e4fda19c3a 100644
--- a/apps/spreadsheeteditor/main/app/controller/Viewport.js
+++ b/apps/spreadsheeteditor/main/app/controller/Viewport.js
@@ -327,7 +327,7 @@ define([
cls : 'btn-toolbar'
})).on('click', _on_btn_zoom.bind(me, 'up'));
- if ( config.canChangeUITheme ) {
+ if ( Common.UI.Themes.available() ) {
var mnuitemDarkTheme = new Common.UI.MenuItem({
caption: me.header.textDarkTheme,
checked: Common.UI.Themes.isDarkTheme(),
diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
index 91306012c7..6223b070f2 100644
--- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
+++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
@@ -691,7 +691,7 @@ define([
'',
'','
',
/** coauthoring end **/
- '',
+ '
',
' | ',
' | ',
'
','
',
@@ -1080,6 +1080,10 @@ define([
$('tr.comments', this.el)[mode.canCoAuthoring ? 'show' : 'hide']();
$('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring? 'show' : 'hide']();
$('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show']();
+
+ if ( !Common.UI.Themes.available() ) {
+ $('tr.themes, tr.themes + tr.divider', this.el).hide();
+ }
},
setApi: function(api) {