[SSE] Change rules in the toolbar
This commit is contained in:
parent
efd6886abc
commit
06291bb30d
|
@ -1750,6 +1750,7 @@ define([
|
|||
props : null,
|
||||
type : item.options.type,
|
||||
subtype : item.value,
|
||||
percent : item.options.percent,
|
||||
isEdit : false,
|
||||
langId : value,
|
||||
handler : function(result, settings) {
|
||||
|
|
|
@ -74,7 +74,8 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
|||
this.props = options.props;
|
||||
this.type = options.type; // rule category
|
||||
this.subtype = options.subtype; // rule
|
||||
this.langId = options.langId; // rule
|
||||
this.percent = options.percent; //
|
||||
this.langId = options.langId; //
|
||||
|
||||
Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options);
|
||||
},
|
||||
|
@ -1048,7 +1049,8 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
|||
this._originalProps = props;
|
||||
var type = props ? props.asc_getType() : this.type,
|
||||
ruleType,
|
||||
subtype = this.subtype;
|
||||
subtype = this.subtype,
|
||||
isPercent = !!this.percent;
|
||||
|
||||
if (props) {
|
||||
var value;
|
||||
|
@ -1076,7 +1078,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
|||
break;
|
||||
case Asc.c_oAscCFType.top10:
|
||||
subtype = props.asc_getBottom() ? 1 : 0;
|
||||
this.cmbPercent.setValue(props.asc_getPercent() ? 1 : 0);
|
||||
isPercent = props.asc_getPercent();
|
||||
this.numRank.setValue(props.asc_getRank() ? props.asc_getRank() : 10);
|
||||
break;
|
||||
case Asc.c_oAscCFType.cellIs:
|
||||
|
@ -1197,6 +1199,9 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
|||
if (rec) {
|
||||
this.cmbCategory.setValue(rec.get('index'));
|
||||
this.refreshRules(rec.get('index'), ruleType);
|
||||
if (type === Asc.c_oAscCFType.top10) {
|
||||
this.cmbPercent.setValue(isPercent ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
rec = this.cmbFormats.getSelectedRecord();
|
||||
|
|
|
@ -1966,8 +1966,10 @@ define([
|
|||
menu : new Common.UI.Menu({
|
||||
menuAlign : 'tl-tr',
|
||||
items: [
|
||||
{ caption: Common.define.conditionalData.textTop + ' 10', type: Asc.c_oAscCFType.top10, value: 0 },
|
||||
{ caption: Common.define.conditionalData.textBottom + ' 10', type: Asc.c_oAscCFType.top10, value: 1 }
|
||||
{ caption: Common.define.conditionalData.textTop + ' 10 ' + this.textItems, type: Asc.c_oAscCFType.top10, value: 0, percent: false },
|
||||
{ caption: Common.define.conditionalData.textTop + ' 10%', type: Asc.c_oAscCFType.top10, value: 0, percent: true },
|
||||
{ caption: Common.define.conditionalData.textBottom + ' 10 ' + this.textItems, type: Asc.c_oAscCFType.top10, value: 1, percent: false },
|
||||
{ caption: Common.define.conditionalData.textBottom + ' 10%', type: Asc.c_oAscCFType.top10, value: 1, percent: true }
|
||||
]
|
||||
})
|
||||
},
|
||||
|
@ -2645,6 +2647,7 @@ define([
|
|||
textTabView: 'View',
|
||||
tipEditChartData: 'Select Data',
|
||||
tipEditChartType: 'Change Chart Type',
|
||||
textAutoColor: 'Automatic'
|
||||
textAutoColor: 'Automatic',
|
||||
textItems: 'Items'
|
||||
}, SSE.Views.Toolbar || {}));
|
||||
});
|
|
@ -3243,6 +3243,7 @@
|
|||
"SSE.Views.Toolbar.txtTime": "Time",
|
||||
"SSE.Views.Toolbar.txtUnmerge": "Unmerge Cells",
|
||||
"SSE.Views.Toolbar.txtYen": "¥ Yen",
|
||||
"SSE.Views.Toolbar.textItems": "Items",
|
||||
"SSE.Views.Top10FilterDialog.textType": "Show",
|
||||
"SSE.Views.Top10FilterDialog.txtBottom": "Bottom",
|
||||
"SSE.Views.Top10FilterDialog.txtBy": "by",
|
||||
|
|
Loading…
Reference in a new issue