From 68e45180a2bea42f6fe80077f7618b322acfc06b Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Wed, 27 Oct 2021 18:50:12 +0300 Subject: [PATCH] [DE] fix bug 52950 --- apps/common/main/lib/view/Header.js | 16 ---------------- .../main/app/controller/Viewport.js | 1 - 2 files changed, 17 deletions(-) diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index 47b26e003..62f41c7e8 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -351,10 +351,6 @@ define([ if ( me.btnOptions ) me.btnOptions.updateHint(me.tipViewSettings); - - if ( me.btnContentMode ) { - me.btnContentMode.on('click', function (e) { Common.UI.Themes.toggleContentTheme(); }); - } } function onDocNameKeyDown(e) { @@ -392,9 +388,6 @@ define([ } function onContentThemeChangedToDark(isdark) { - if ( this.btnContentMode ) { - this.btnContentMode.changeIcon(!isdark ? {curr: 'btn-mode-light', next: 'btn-mode-dark'} : {curr: 'btn-mode-dark', next: 'btn-mode-light'}); - } } return { @@ -561,15 +554,6 @@ define([ $btnUsers = $html.find('.btn-users'); $panelUsers.hide(); - - if ( !!window.DE ) { - var mode_cls = Common.UI.Themes.isContentThemeDark() ? 'btn-mode-light' : 'btn-mode-dark'; - me.btnContentMode = createTitleButton('toolbar__icon icon--inverse ' + mode_cls, $html.findById('#slot-btn-mode'), undefined, 'bottom', 'big'); - - var document = window.DE.getController('Main').document; - me.btnContentMode.setVisible(Common.UI.Themes.isDarkTheme() && !/^pdf|djvu|xps|oxps$/.test(document.fileType)); - } - return $html; } else if ( role == 'title' ) { diff --git a/apps/documenteditor/main/app/controller/Viewport.js b/apps/documenteditor/main/app/controller/Viewport.js index 0d7ea6770..62cebe316 100644 --- a/apps/documenteditor/main/app/controller/Viewport.js +++ b/apps/documenteditor/main/app/controller/Viewport.js @@ -379,7 +379,6 @@ define([ menuItem.$el.prev('.divider')[current_dark ? 'show' : 'hide'](); menuItem.setChecked(current_dark); - this.header.btnContentMode.setVisible(current_dark); } },