diff --git a/apps/common/main/lib/component/TreeView.js b/apps/common/main/lib/component/TreeView.js index 2b2ac7add..8d6224ae8 100644 --- a/apps/common/main/lib/component/TreeView.js +++ b/apps/common/main/lib/component/TreeView.js @@ -164,7 +164,7 @@ define([ }, template: _.template([ - '
' + '' ].join('')), initialize : function(options) { diff --git a/apps/common/main/lib/controller/HintManager.js b/apps/common/main/lib/controller/HintManager.js index a946ad0f4..6abc28e77 100644 --- a/apps/common/main/lib/controller/HintManager.js +++ b/apps/common/main/lib/controller/HintManager.js @@ -543,6 +543,13 @@ Common.UI.HintManager = new(function() { _hideHints(); curr.focus(); _resetToDefault(); + } else if (curr.hasClass('treeview')) { + _hideHints(); + _resetToDefault(); + curr.trigger('hint:focus'); + setTimeout(function () { + curr.focus(); + }, 10); } else { _isComplete = false; _hideHints(); diff --git a/apps/documenteditor/main/app/controller/Navigation.js b/apps/documenteditor/main/app/controller/Navigation.js index fb97d8707..2e335fa89 100644 --- a/apps/documenteditor/main/app/controller/Navigation.js +++ b/apps/documenteditor/main/app/controller/Navigation.js @@ -110,6 +110,12 @@ define([ }, onAfterRender: function(panelNavigation) { + panelNavigation.viewNavigationList.cmpEl.on('hint:focus', '.treeview', _.bind(function (e) { + this.api.asc_enableKeyEvents(false); + $(e.currentTarget).on('keydown', _.bind(function (e) { + console.log('keydown'); + }, this)); + }, this)); panelNavigation.viewNavigationList.on('item:click', _.bind(this.onSelectItem, this)); panelNavigation.viewNavigationList.on('item:contextmenu', _.bind(this.onItemContextMenu, this)); panelNavigation.viewNavigationList.on('item:add', _.bind(this.onItemAdd, this)); diff --git a/apps/documenteditor/main/app/template/LeftMenu.template b/apps/documenteditor/main/app/template/LeftMenu.template index 1867ae481..6a695306f 100644 --- a/apps/documenteditor/main/app/template/LeftMenu.template +++ b/apps/documenteditor/main/app/template/LeftMenu.template @@ -6,7 +6,7 @@ - + diff --git a/apps/documenteditor/main/app/view/Navigation.js b/apps/documenteditor/main/app/view/Navigation.js index 3fec05e5f..893f68ceb 100644 --- a/apps/documenteditor/main/app/view/Navigation.js +++ b/apps/documenteditor/main/app/view/Navigation.js @@ -77,6 +77,8 @@ define([ cls: 'btn-toolbar', iconCls: 'toolbar__icon btn-close', hint: this.txtClosePanel, + dataHint: '1', + dataHintDirection: 'bottom' }); this.btnSettings = new Common.UI.Button({ @@ -155,7 +157,9 @@ define([ value: 'wrap' } ] - }) + }), + dataHint: '1', + dataHintDirection: 'bottom' }); this.btnSettingsMenu = this.btnSettings.menu; @@ -167,7 +171,8 @@ define([ emptyItemText: this.txtEmptyItem, style: 'border: none;', delayRenderTips: true, - minScrollbarLength: 25 + minScrollbarLength: 25, + dataHint: '1' }); this.viewNavigationList.cmpEl.off('click');