[SSE] Remove unused buttons
This commit is contained in:
parent
18d37fc50a
commit
065a1943c0
|
@ -314,12 +314,8 @@ define([
|
|||
toolbar.btnInsertEquation.on('click', _.bind(this.onInsertEquationClick, this));
|
||||
toolbar.btnSortDown.on('click', _.bind(this.onSortType, this, Asc.c_oAscSortOptions.Ascending));
|
||||
toolbar.btnSortUp.on('click', _.bind(this.onSortType, this, Asc.c_oAscSortOptions.Descending));
|
||||
toolbar.mnuitemSortAZ.on('click', _.bind(this.onSortType, this, Asc.c_oAscSortOptions.Ascending));
|
||||
toolbar.mnuitemSortZA.on('click', _.bind(this.onSortType, this, Asc.c_oAscSortOptions.Descending));
|
||||
toolbar.btnSetAutofilter.on('click', _.bind(this.onAutoFilter, this));
|
||||
toolbar.mnuitemAutoFilter.on('click', _.bind(this.onAutoFilter, this));
|
||||
toolbar.btnClearAutofilter.on('click', _.bind(this.onClearFilter, this));
|
||||
toolbar.mnuitemClearFilter.on('click', _.bind(this.onClearFilter, this));
|
||||
toolbar.btnTableTemplate.menu.on('show:after', _.bind(this.onTableTplMenuOpen, this));
|
||||
toolbar.btnPercentStyle.on('click', _.bind(this.onNumberFormat, this));
|
||||
toolbar.btnCurrencyStyle.on('click', _.bind(this.onNumberFormat, this));
|
||||
|
@ -1679,7 +1675,6 @@ define([
|
|||
toolbar.btnClearStyle.menu.items[2],
|
||||
toolbar.btnClearStyle.menu.items[3],
|
||||
toolbar.btnClearStyle.menu.items[4],
|
||||
toolbar.mnuitemClearFilter,
|
||||
toolbar.btnNamedRange.menu.items[0],
|
||||
toolbar.btnNamedRange.menu.items[1]
|
||||
],
|
||||
|
@ -2193,13 +2188,11 @@ define([
|
|||
val = (filterInfo) ? filterInfo.asc_getIsAutoFilter() : null;
|
||||
if (this._state.filter !== val) {
|
||||
toolbar.btnSetAutofilter.toggle(val===true, true);
|
||||
toolbar.mnuitemAutoFilter.setChecked(val===true, true);
|
||||
this._state.filter = val;
|
||||
}
|
||||
need_disable = this._state.controlsdisabled.filters || (val===null);
|
||||
toolbar.lockToolbar(SSE.enumLock.ruleFilter, need_disable,
|
||||
{ array: [toolbar.btnSortDown, toolbar.btnSortUp, toolbar.mnuitemSortAZ, toolbar.mnuitemSortZA,
|
||||
toolbar.btnTableTemplate,toolbar.btnSetAutofilter,toolbar.mnuitemAutoFilter,toolbar.btnAutofilter] });
|
||||
{ array: [toolbar.btnSortDown, toolbar.btnSortUp, toolbar.btnTableTemplate,toolbar.btnSetAutofilter] });
|
||||
|
||||
val = (formatTableInfo) ? formatTableInfo.asc_getTableStyleName() : null;
|
||||
if (this._state.tablestylename !== val && this.toolbar.mnuTableTemplatePicker) {
|
||||
|
@ -2214,7 +2207,7 @@ define([
|
|||
}
|
||||
|
||||
need_disable = this._state.controlsdisabled.filters || !filterInfo || (filterInfo.asc_getIsApplyAutoFilter()!==true);
|
||||
toolbar.lockToolbar(SSE.enumLock.ruleDelFilter, need_disable, {array:[toolbar.btnClearAutofilter,toolbar.mnuitemClearFilter]});
|
||||
toolbar.lockToolbar(SSE.enumLock.ruleDelFilter, need_disable, {array:[toolbar.btnClearAutofilter]});
|
||||
|
||||
var old_name = this._state.tablename;
|
||||
this._state.tablename = (formatTableInfo) ? formatTableInfo.asc_getTableName() : undefined;
|
||||
|
@ -2229,11 +2222,11 @@ define([
|
|||
toolbar.lockToolbar(SSE.enumLock.multiselect, this._state.multiselect, { array: [toolbar.btnTableTemplate, toolbar.btnInsertHyperlink]});
|
||||
|
||||
this._state.inpivot = !!info.asc_getPivotTableInfo();
|
||||
toolbar.lockToolbar(SSE.enumLock.editPivot, this._state.inpivot, { array: [toolbar.btnMerge, toolbar.btnInsertHyperlink, toolbar.btnSetAutofilter, toolbar.btnClearAutofilter, toolbar.btnSortDown, toolbar.btnSortUp, toolbar.btnAutofilter]});
|
||||
toolbar.lockToolbar(SSE.enumLock.editPivot, this._state.inpivot, { array: [toolbar.btnMerge, toolbar.btnInsertHyperlink, toolbar.btnSetAutofilter, toolbar.btnClearAutofilter, toolbar.btnSortDown, toolbar.btnSortUp]});
|
||||
|
||||
need_disable = !this.appConfig.canModifyFilter;
|
||||
toolbar.lockToolbar(SSE.enumLock.cantModifyFilter, need_disable, { array: [toolbar.btnSortDown, toolbar.btnSortUp, toolbar.mnuitemSortAZ, toolbar.mnuitemSortZA, toolbar.btnSetAutofilter,
|
||||
toolbar.btnAutofilter, toolbar.btnTableTemplate, toolbar.btnClearStyle.menu.items[0], toolbar.btnClearStyle.menu.items[2] ]});
|
||||
toolbar.lockToolbar(SSE.enumLock.cantModifyFilter, need_disable, { array: [toolbar.btnSortDown, toolbar.btnSortUp, toolbar.btnSetAutofilter,
|
||||
toolbar.btnTableTemplate, toolbar.btnClearStyle.menu.items[0], toolbar.btnClearStyle.menu.items[2] ]});
|
||||
|
||||
}
|
||||
|
||||
|
@ -2424,7 +2417,6 @@ define([
|
|||
val = filterInfo ? filterInfo.asc_getIsAutoFilter() : null;
|
||||
if ( this._state.filter !== val ) {
|
||||
me.toolbar.btnSetAutofilter.toggle(val===true, true);
|
||||
// toolbar.mnuitemAutoFilter.setChecked(val===true, true);
|
||||
this._state.filter = val;
|
||||
}
|
||||
|
||||
|
@ -2882,11 +2874,7 @@ define([
|
|||
toolbar.btnClearStyle.menu.items[1],
|
||||
toolbar.btnClearStyle.menu.items[2],
|
||||
toolbar.btnClearStyle.menu.items[3],
|
||||
toolbar.btnClearStyle.menu.items[4],
|
||||
toolbar.mnuitemSortAZ,
|
||||
toolbar.mnuitemSortZA,
|
||||
toolbar.mnuitemAutoFilter,
|
||||
toolbar.mnuitemClearFilter
|
||||
toolbar.btnClearStyle.menu.items[4]
|
||||
],
|
||||
merge: true,
|
||||
clear: [_set.selImage, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.coAuth]
|
||||
|
|
|
@ -1131,52 +1131,6 @@ define([
|
|||
})
|
||||
});
|
||||
|
||||
me.btnAutofilter = new Common.UI.Button({
|
||||
id : 'id-toolbar-btn-autofilter',
|
||||
cls : 'btn-toolbar',
|
||||
iconCls : 'btn-autofilter',
|
||||
lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter, _set.editPivot],
|
||||
menu : new Common.UI.Menu({
|
||||
items : [
|
||||
me.mnuitemSortAZ = new Common.UI.MenuItem({
|
||||
caption : me.txtSortAZ,
|
||||
iconCls : 'mnu-sort-asc',
|
||||
lock : [_set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth, _set.ruleFilter, _set.cantModifyFilter],
|
||||
value : Asc.c_oAscSortOptions.Ascending
|
||||
}),
|
||||
me.mnuitemSortZA = new Common.UI.MenuItem({
|
||||
caption : me.txtSortZA,
|
||||
iconCls : 'mnu-sort-desc',
|
||||
lock : [_set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth, _set.ruleFilter, _set.cantModifyFilter],
|
||||
value : Asc.c_oAscSortOptions.Descending
|
||||
}),
|
||||
me.mnuitemAutoFilter = new Common.UI.MenuItem({
|
||||
caption : me.txtFilter,
|
||||
iconCls : 'mnu-filter-add',
|
||||
checkable: true,
|
||||
lock : [_set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth, _set.ruleFilter],
|
||||
value : 'set-filter'
|
||||
}),
|
||||
me.mnuitemClearFilter = new Common.UI.MenuItem({
|
||||
caption : me.txtClearFilter,
|
||||
iconCls : 'mnu-filter-clear',
|
||||
lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth, _set.ruleDelFilter],
|
||||
value : 'clear-filter'
|
||||
})
|
||||
/*,{
|
||||
caption : me.txtTableTemplate,
|
||||
iconCls : 'mnu-filter-clear',
|
||||
menu : new Common.UI.Menu({
|
||||
menuAlign: 'tl-tr',
|
||||
items: [
|
||||
{ template: _.template('<div id="id-toolbar-short-menu-table-templates" style="width: 288px; height: 300px; margin: 0px 4px;"></div>') }
|
||||
]
|
||||
})
|
||||
} */
|
||||
]
|
||||
})
|
||||
});
|
||||
|
||||
var hidetip = Common.localStorage.getItem("sse-hide-synch");
|
||||
me.showSynchTip = !(hidetip && parseInt(hidetip) == 1);
|
||||
// me.needShowSynchTip = false;
|
||||
|
@ -1467,7 +1421,7 @@ define([
|
|||
me.btnTableTemplate, me.btnPercentStyle, me.btnCurrencyStyle, me.btnDecDecimal, me.btnAddCell, me.btnDeleteCell,
|
||||
me.cmbNumberFormat, me.btnBorders, me.btnInsertImage, me.btnInsertHyperlink,
|
||||
me.btnInsertChart, me.btnColorSchemas,
|
||||
me.btnAutofilter, me.btnCopy, me.btnPaste, me.listStyles, me.btnPrint,
|
||||
me.btnCopy, me.btnPaste, me.listStyles, me.btnPrint,
|
||||
/*me.btnSave,*/ me.btnClearStyle, me.btnCopyStyle,
|
||||
me.btnPageMargins, me.btnPageSize, me.btnPageOrient, me.btnPrintArea, me.btnImgAlign, me.btnImgBackward, me.btnImgForward, me.btnImgGroup, me.btnEditHeader
|
||||
];
|
||||
|
@ -1638,7 +1592,6 @@ define([
|
|||
|
||||
// replacePlacholder('#id-toolbar-short-placeholder-btn-halign', this.btnHorizontalAlign);
|
||||
// replacePlacholder('#id-toolbar-short-placeholder-btn-valign', this.btnVerticalAlign);
|
||||
// replacePlacholder('#id-toolbar-short-placeholder-btn-filter', this.btnAutofilter);
|
||||
|
||||
return $host;
|
||||
},
|
||||
|
@ -1703,7 +1656,6 @@ define([
|
|||
_updateHint(this.btnColorSchemas, this.tipColorSchemas);
|
||||
_updateHint(this.btnHorizontalAlign, this.tipHAligh);
|
||||
_updateHint(this.btnVerticalAlign, this.tipVAligh);
|
||||
_updateHint(this.btnAutofilter, this.tipAutofilter);
|
||||
_updateHint(this.btnPageOrient, this.tipPageOrient);
|
||||
_updateHint(this.btnPageSize, this.tipPageSize);
|
||||
_updateHint(this.btnPageMargins, this.tipPageMargins);
|
||||
|
|
Loading…
Reference in a new issue