[DE] Fix Bug 55351

This commit is contained in:
Julia Radzhabova 2022-04-15 16:37:38 +03:00
parent 7c8aa8c28c
commit db07317d29
3 changed files with 8 additions and 4 deletions

View file

@ -1224,7 +1224,7 @@ define([
leftmenuController.getView('LeftMenu').getMenu('file').loadDocument({doc:me.document});
leftmenuController.setMode(me.appOptions).createDelayedElements().setApi(me.api);
navigationController.setApi(me.api).setMode(this.appOptions);
navigationController.setMode(me.appOptions).setApi(me.api);
chatController.setApi(this.api).setMode(this.appOptions);
application.getController('Common.Controllers.ExternalDiagramEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization});

View file

@ -65,6 +65,8 @@ define([
if (me.panelNavigation && me.panelNavigation.viewNavigationList && me.panelNavigation.viewNavigationList.scroller)
me.panelNavigation.viewNavigationList.scroller.update({alwaysVisibleY: true});
}
if (!me.mode.isEdit && !me.mode.isRestrictedEdit)
me.panelNavigation.viewNavigationList.focus();
},
'hide': function() {
if (!this.canUseViwerNavigation) {
@ -103,8 +105,10 @@ define([
setMode: function(mode) {
this.mode = mode;
this.canUseViwerNavigation = this.mode.canUseViwerNavigation;
if (this.panelNavigation && this.panelNavigation.viewNavigationList)
if (this.panelNavigation && this.panelNavigation.viewNavigationList) {
this.panelNavigation.viewNavigationList.setEmptyText(this.mode.isEdit ? this.panelNavigation.txtEmpty : this.panelNavigation.txtEmptyViewer);
this.panelNavigation.viewNavigationList.enableKeyEvents = !this.mode.isEdit && !this.mode.isRestrictedEdit;
}
return this;
},
@ -232,7 +236,7 @@ define([
} else if (this._viewerNavigationObject) {
this.api.asc_viewerNavigateTo(record.get('index'));
}
Common.NotificationCenter.trigger('edit:complete', this.panelNavigation);
(this.mode.isEdit || this.mode.isRestrictedEdit) && Common.NotificationCenter.trigger('edit:complete', this.panelNavigation);
},
onItemAdd: function(picker, item, record, e){

View file

@ -68,7 +68,7 @@ define([
this.viewNavigationList = new Common.UI.TreeView({
el: $('#navigation-list'),
store: this.storeNavigation,
enableKeyEvents: true,
enableKeyEvents: false,
emptyText: this.txtEmpty,
emptyItemText: this.txtEmptyItem,
style: 'border: none;',