[SSE] Fix named ranges for slicer
This commit is contained in:
parent
7c2fc19882
commit
a9850f64b3
|
@ -2146,10 +2146,22 @@ define([
|
||||||
var type = menuItem.asc_getType(),
|
var type = menuItem.asc_getType(),
|
||||||
name = menuItem.asc_getName(true),
|
name = menuItem.asc_getName(true),
|
||||||
origname = me.api.asc_getFormulaNameByLocale(name),
|
origname = me.api.asc_getFormulaNameByLocale(name),
|
||||||
mnu = new Common.UI.MenuItem({
|
iconCls = 'btn-named-range';
|
||||||
iconCls: 'menu__icon ' + ((type==Asc.c_oAscPopUpSelectorType.Func) ? 'btn-function': ((type==Asc.c_oAscPopUpSelectorType.Table) ? 'btn-menu-table' : 'btn-named-range')) ,
|
switch (type) {
|
||||||
caption: name,
|
case Asc.c_oAscPopUpSelectorType.Func:
|
||||||
hint : (funcdesc && funcdesc[origname]) ? funcdesc[origname].d : ''
|
iconCls = 'btn-function';
|
||||||
|
break;
|
||||||
|
case Asc.c_oAscPopUpSelectorType.Table:
|
||||||
|
iconCls = 'btn-menu-table';
|
||||||
|
break;
|
||||||
|
case Asc.c_oAscPopUpSelectorType.Slicer:
|
||||||
|
iconCls = 'btn-slicer';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var mnu = new Common.UI.MenuItem({
|
||||||
|
iconCls: 'menu__icon ' + iconCls ,
|
||||||
|
caption: name,
|
||||||
|
hint : (funcdesc && funcdesc[origname]) ? funcdesc[origname].d : ''
|
||||||
}).on('click', function(item, e) {
|
}).on('click', function(item, e) {
|
||||||
setTimeout(function(){ me.api.asc_insertInCell(item.caption, type, false ); }, 10);
|
setTimeout(function(){ me.api.asc_insertInCell(item.caption, type, false ); }, 10);
|
||||||
});
|
});
|
||||||
|
|
|
@ -195,7 +195,7 @@ define([ 'text!spreadsheeteditor/main/app/template/NameManagerDlg.template',
|
||||||
name: this.ranges[i].asc_getName(true),
|
name: this.ranges[i].asc_getName(true),
|
||||||
scope: scope,
|
scope: scope,
|
||||||
scopeName: (scope===null) ? this.textWorkbook: this.sheetNames[scope],
|
scopeName: (scope===null) ? this.textWorkbook: this.sheetNames[scope],
|
||||||
range: this.ranges[i].asc_getRef(),
|
range: (type===Asc.c_oAscDefNameType.slicer) ? '' : this.ranges[i].asc_getRef(),
|
||||||
lock: (id!==null && id!==undefined),
|
lock: (id!==null && id!==undefined),
|
||||||
lockuser: (id) ? this.getUserName(id) : this.guestText,
|
lockuser: (id) ? this.getUserName(id) : this.guestText,
|
||||||
type: type,
|
type: type,
|
||||||
|
|
Loading…
Reference in a new issue