diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index 2735950b0..fb964e18f 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -169,6 +169,7 @@ define([ view.pmiEntireHide.on('click', _.bind(me.onEntireHide, me)); view.pmiEntireShow.on('click', _.bind(me.onEntireShow, me)); view.pmiFreezePanes.on('click', _.bind(me.onFreezePanes, me)); + view.pmiEntriesList.on('click', _.bind(me.onEntriesList, me)); /** coauthoring begin **/ view.pmiAddComment.on('click', _.bind(me.onAddComment, me)); /** coauthoring end **/ @@ -249,7 +250,7 @@ define([ this.api.asc_registerCallback('asc_onEditCell', _.bind(this.onApiEditCell, this)); this.api.asc_registerCallback('asc_onLockDefNameManager', _.bind(this.onLockDefNameManager, this)); this.api.asc_registerCallback('asc_onSelectionChanged', _.bind(this.onSelectionChanged, this)); - this.api.asc_registerCallback('asc_onEntriesListMenu', _.bind(this.onEntriesListMenu, this)); + this.api.asc_registerCallback('asc_onEntriesListMenu', _.bind(this.onEntriesListMenu, this)); // Alt + Down this.api.asc_registerCallback('asc_onFormulaCompleteMenu', _.bind(this.onFormulaCompleteMenu, this)); return this; @@ -517,6 +518,15 @@ define([ this.api.asc_freezePane(); }, + onEntriesList: function(item) { + if (this.api) { + var me = this; + setTimeout(function() { + me.api.asc_showAutoComplete(); + }, 10); + } + }, + onAddComment: function(item) { if (this.api && this.permissions.canCoAuthoring && this.permissions.isEdit && this.permissions.canComments) { @@ -1296,6 +1306,7 @@ define([ documentHolder.pmiEntireShow.setVisible(iscolmenu||isrowmenu); documentHolder.pmiFreezePanes.setVisible(!iscelledit); documentHolder.pmiFreezePanes.setCaption(this.api.asc_getSheetViewSettings().asc_getIsFreezePane() ? documentHolder.textUnFreezePanes : documentHolder.textFreezePanes); + documentHolder.pmiEntriesList.setVisible(!iscelledit); /** coauthoring begin **/ documentHolder.ssMenu.items[16].setVisible(iscellmenu && !iscelledit && this.permissions.canCoAuthoring && this.permissions.canComments); diff --git a/apps/spreadsheeteditor/main/app/view/DocumentHolder.js b/apps/spreadsheeteditor/main/app/view/DocumentHolder.js index c2df2c638..8d2efff01 100644 --- a/apps/spreadsheeteditor/main/app/view/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/view/DocumentHolder.js @@ -345,6 +345,10 @@ define([ caption : me.textFreezePanes }); + me.pmiEntriesList = new Common.UI.MenuItem({ + caption : me.textEntriesList + }); + me.ssMenu = new Common.UI.Menu({ id : 'id-context-menu-cell', items : [ @@ -367,6 +371,7 @@ define([ {caption: '--'}, me.pmiAddComment, me.pmiCellMenuSeparator, + me.pmiEntriesList, me.pmiAddNamedRange, me.pmiInsFunction, me.menuAddHyperlink, @@ -578,7 +583,6 @@ define([ cyclic: false, items: [] }).on('render:after', function(mnu) { - mnu.cmpEl.removeAttr('oo_editor_input').attr('oo_editor_keyboard', true); this.scroller = new Common.UI.Scroller({ el: $(this.el).find('.dropdown-menu '), useKeyboard: this.enableKeyEvents && !this.handleSelect, @@ -686,7 +690,8 @@ define([ txtAutoColumnWidth: 'Auto Fit Column Width', txtAutoRowHeight: 'Auto Fit Row Height', txtCustomColumnWidth: 'Custom Column Width', - txtCustomRowHeight: 'Custom Row Height' + txtCustomRowHeight: 'Custom Row Height', + textEntriesList: 'Select from drop-down list' }, SSE.Views.DocumentHolder || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 9304abbe5..e4fdef9b4 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -926,6 +926,7 @@ "SSE.Views.DocumentHolder.txtUngroup": "Ungroup", "SSE.Views.DocumentHolder.txtWidth": "Width", "SSE.Views.DocumentHolder.vertAlignText": "Vertical Alignment", + "SSE.Views.DocumentHolder.textEntriesList": "Select from drop-down list", "SSE.Views.FileMenu.btnBackCaption": "Go to Documents", "SSE.Views.FileMenu.btnCloseMenuCaption": "Close Menu", "SSE.Views.FileMenu.btnCreateNewCaption": "Create New",