From d2696ce618348d137314a7e333fc72f978c3895d Mon Sep 17 00:00:00 2001 From: OVSharova Date: Fri, 22 Apr 2022 19:52:40 +0300 Subject: [PATCH] fix bugs --- apps/documenteditor/main/app/controller/LeftMenu.js | 5 +++++ apps/documenteditor/main/app/controller/Navigation.js | 4 ++++ apps/documenteditor/main/app/view/LeftMenu.js | 3 ++- apps/documenteditor/main/app/view/Navigation.js | 9 ++++++--- apps/documenteditor/main/app/view/ViewTab.js | 3 ++- apps/documenteditor/main/locale/en.json | 4 ++++ 6 files changed, 23 insertions(+), 5 deletions(-) diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index 3bcb075ad..09b126555 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -816,6 +816,11 @@ define([ this.leftMenu.panelThumbnails.hide(); this.leftMenu.onBtnMenuClick(this.leftMenu.btnThumbnails); } + else if (this.leftMenu.btnNavigation.isActive()) { + this.leftMenu.btnNavigation.toggle(false); + this.leftMenu.panelNavigation.hide(); + this.leftMenu.onBtnMenuClick(this.leftMenu.btnNavigation); + } } } }, diff --git a/apps/documenteditor/main/app/controller/Navigation.js b/apps/documenteditor/main/app/controller/Navigation.js index 0fc01e300..424457630 100644 --- a/apps/documenteditor/main/app/controller/Navigation.js +++ b/apps/documenteditor/main/app/controller/Navigation.js @@ -117,6 +117,7 @@ define([ panelNavigation.btnSettingsMenu.on('item:click', _.bind(this.onMenuSettingsItemClick, this)); panelNavigation.btnSettingsMenu.items[2].menu.on('item:click', _.bind(this.onMenuLevelsItemClick, this)); panelNavigation.btnSettingsMenu.items[4].menu.on('item:click', _.bind(this.onMenuFontSizeClick, this)); + panelNavigation.btnClose.on('click', _.bind(this.onClickClosePanel, this)); var viewport = this.getApplication().getController('Viewport').getView('Viewport'); viewport.hlayout.on('layout:resizedrag', function () { @@ -263,6 +264,9 @@ define([ this.panelNavigation.viewNavigationList.collapseAll(); } }, + onClickClosePanel: function() { + Common.NotificationCenter.trigger('leftmenu:change', 'hide'); + }, onMenuSettingsItemClick: function (menu, item){ switch (item.value){ diff --git a/apps/documenteditor/main/app/view/LeftMenu.js b/apps/documenteditor/main/app/view/LeftMenu.js index a6ad60492..e6d9e53e4 100644 --- a/apps/documenteditor/main/app/view/LeftMenu.js +++ b/apps/documenteditor/main/app/view/LeftMenu.js @@ -154,7 +154,7 @@ define([ this.btnNavigation = new Common.UI.Button({ el: $markup.elementById('#left-btn-navigation'), - hint: this.tipNavigation, + hint: this.tipOutline, enableToggle: true, disabled: true, toggleGroup: 'leftMenuGroup' @@ -501,6 +501,7 @@ define([ txtTrial: 'TRIAL MODE', txtTrialDev: 'Trial Developer Mode', tipNavigation: 'Navigation', + tipOutline: 'Outline', txtLimit: 'Limit Access' }, DE.Views.LeftMenu || {})); }); diff --git a/apps/documenteditor/main/app/view/Navigation.js b/apps/documenteditor/main/app/view/Navigation.js index be4cdc719..c87f3a7ab 100644 --- a/apps/documenteditor/main/app/view/Navigation.js +++ b/apps/documenteditor/main/app/view/Navigation.js @@ -76,14 +76,14 @@ define([ parentEl: $('#navigation-btn-close', this.$el), cls: 'btn-toolbar', iconCls: 'toolbar__icon btn-close', - hint: this.textClosePanel + hint: this.txtClosePanel, }); this.btnSettings = new Common.UI.Button({ parentEl: $('#navigation-btn-settings', this.$el), cls: 'btn-toolbar', iconCls: 'toolbar__icon btn-settings', - hint: this.textSort, + hint: this.txtSettings, menu: new Common.UI.Menu({ menuAlign: 'tr-br', style: 'min-width: auto;', @@ -282,6 +282,9 @@ define([ txtFontSize: "Font size", txtSmall: "Small", txtMedium: "Medium", - txtLarge:"Large" + txtLarge:"Large", + txtClosePanel: "Close outline", + txtSettings: "Outline settings" + }, DE.Views.Navigation || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/main/app/view/ViewTab.js b/apps/documenteditor/main/app/view/ViewTab.js index 76f3a51c1..b260ffa95 100644 --- a/apps/documenteditor/main/app/view/ViewTab.js +++ b/apps/documenteditor/main/app/view/ViewTab.js @@ -135,7 +135,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', iconCls: 'toolbar__icon btn-menu-navigation', lock: [_set.lostConnect, _set.disableOnStart], - caption: this.textNavigation, + caption: this.textOutline, enableToggle: true, dataHint: '1', dataHintDirection: 'bottom', @@ -305,6 +305,7 @@ define([ }, textNavigation: 'Navigation', + textOutline: 'Outline', textZoom: 'Zoom', textFitToPage: 'Fit To Page', textFitToWidth: 'Fit To Width', diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 534e09cf9..9400c91ac 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -2017,6 +2017,7 @@ "DE.Views.LeftMenu.tipChat": "Chat", "DE.Views.LeftMenu.tipComments": "Comments", "DE.Views.LeftMenu.tipNavigation": "Navigation", + "DE.Views.LeftMenu.tipOutline": "Outline", "DE.Views.LeftMenu.tipPlugins": "Plugins", "DE.Views.LeftMenu.tipSearch": "Search", "DE.Views.LeftMenu.tipSupport": "Feedback & Support", @@ -2142,6 +2143,7 @@ "DE.Views.MailMergeSettings.txtUntitled": "Untitled", "DE.Views.MailMergeSettings.warnProcessMailMerge": "Starting merge failed", "DE.Views.Navigation.strNavigate": "Outline", + "DE.Views.Navigation.txtClosePanel": "Close outline", "DE.Views.Navigation.txtCollapse": "Collapse all", "DE.Views.Navigation.txtDemote": "Demote", "DE.Views.Navigation.txtEmpty": "There are no headings in the document.
Apply a heading style to the text so that it appears in the table of contents.", @@ -2157,6 +2159,7 @@ "DE.Views.Navigation.txtNewHeading": "New subheading", "DE.Views.Navigation.txtPromote": "Promote", "DE.Views.Navigation.txtSelect": "Select content", + "DE.Views.Navigation.txtSettings": "Outline settings", "DE.Views.Navigation.txtSmall": "Small", "DE.Views.Navigation.txtWrapHeadings": "Wrap long headings", "DE.Views.NoteSettingsDialog.textApply": "Apply", @@ -2852,6 +2855,7 @@ "DE.Views.ViewTab.textFitToWidth": "Fit To Width", "DE.Views.ViewTab.textInterfaceTheme": "Interface theme", "DE.Views.ViewTab.textNavigation": "Navigation", + "DE.Views.ViewTab.textOutline": "Outline", "DE.Views.ViewTab.textRulers": "Rulers", "DE.Views.ViewTab.textStatusBar": "Status Bar", "DE.Views.ViewTab.textZoom": "Zoom",