Commit 1824834c authored by Julia Radzhabova's avatar Julia Radzhabova

[SSE] Add "Select from drop-down list" item to cell context menu.

parent 05431979
......@@ -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);
......
......@@ -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
......@@ -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",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment