diff --git a/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js b/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js
index 7d22463b2..9dd6878b5 100644
--- a/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js
+++ b/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js
@@ -209,59 +209,65 @@ define([
'',
'',
'
',
- '| ',
- '',
- '',
- '',
- '',
- '',
- ' | ',
+ '',
+ '',
+ '',
+ '',
+ '',
+ '',
+ ' ',
+ ' ',
+ ' ',
+ ' ',
+ ' | ',
+ ' ',
+ '',
+ '| ',
+ '',
+ '',
+ '',
+ '',
+ '',
+ ' | ',
+ ' ',
+ '',
+ '| ',
+ '',
+ '',
+ '',
+ '',
+ '',
+ ' | ',
+ ' ',
+ '',
+ '| ',
+ '',
+ '',
+ '',
+ '',
+ '',
+ ' | ',
+ ' ',
+ '',
+ '| ',
+ '',
+ '',
+ '',
+ '',
+ '',
+ ' | ',
+ ' ',
+ '',
+ '| ',
+ '',
+ '',
+ '',
+ '',
+ '',
+ ' | ',
+ ' ',
+ ' ',
+ ' | ',
'
',
'',
'',
@@ -1107,19 +1113,23 @@ define([
}).on('selected', function(combo, record) {
me.fillIconsControls(record.value, record.data.values);
});
+ this.cmbIconsPresets.setValue(3);
+ this.iconsProps = {iconsSet: 3};
- this.chFill = new Common.UI.CheckBox({
+ this.chIconShow = new Common.UI.CheckBox({
el: $('#format-rules-edit-chk-icon-show'),
labelText: this.textShowIcon
});
- this.chFill.on('change', function(field, newValue, oldValue, eOpts){
-
+ this.chIconShow.on('change', function(field, newValue, oldValue, eOpts){
});
this.btnReverse = new Common.UI.Button({
el: $('#format-rules-edit-btn-icon-reverse')
});
- // this.btnReverse.on('click', _.bind(this.reverseIcons, this));
+ this.btnReverse.on('click', function() {
+ me.iconsProps.isReverse = !me.iconsProps.isReverse;
+ me.reverseIconsControls();
+ });
var icons = [];
collectionIcons.each(function(icon, index){
@@ -1162,6 +1172,7 @@ define([
picker.on('item:click', _.bind(this.onSelectIcon, this, combo));
// this.selectIconItem();
this.iconsControls[i].cmbIcons = combo;
+ this.iconsControls[i].pickerIcons = picker;
combo = new Common.UI.ComboBox({
el : $('#format-rules-edit-combo-type-' + (i+1)),
@@ -1182,9 +1193,10 @@ define([
menuStyle : 'min-width: 100%;',
editable : false,
cls : 'input-group-nr',
- data : [{value: 0, displayValue: '>='}, {value: 1, displayValue: '>'}],
+ data : [{value: 0, displayValue: '>=', prevOp: '<'}, {value: 1, displayValue: '>', prevOp: '<='}],
type : i
}).on('selected', function(combo, record) {
+ me.fillIconsLabels();
});
combo.setValue(0);
this.iconsControls[i].cmbOperator = combo;
@@ -1197,6 +1209,8 @@ define([
btnHint : this.textSelectData,
validateOnChange: false,
type : i
+ }).on('changed:after', function(input, newValue, oldValue, e) {
+ me.fillIconsLabels();
});
range.setValue('');
this.iconsControls[i].value = range;
@@ -1205,6 +1219,9 @@ define([
this.iconsControls[i].label = $('#format-rules-txt-icon-' + (i+1));
}
+ var rec = this.cmbIconsPresets.getSelectedRecord();
+ rec && this.fillIconsControls(rec.value, rec.data.values);
+
this.afterRender();
},
@@ -1346,6 +1363,8 @@ define([
break;
case Asc.c_oAscCFType.iconSet:
value = props.asc_getColorScaleOrDataBarOrIconSetRule();
+ this.chIconShow.setValue(!value.asc_getShowValue());
+ this.iconsProps.isReverse = value.asc_getReverse();
this.fillIconsControls(value.asc_getIconSet(), value.asc_getCFVOs(), value.asc_getIconSets());
break;
}
@@ -1521,7 +1540,28 @@ define([
props.asc_setColorScaleOrDataBarOrIconSetRule(barProps);
break;
case Asc.c_oAscCFType.iconSet:
- // value = props.asc_getColorScaleOrDataBarOrIconSetRule();
+ var iconsProps = new AscCommonExcel.CIconSet();
+ iconsProps.asc_setShowValue(this.chIconShow.getValue()!=='checked');
+ iconsProps.asc_setReverse(!!this.iconsProps.isReverse);
+ iconsProps.asc_setIconSet(this.iconsProps.iconsSet);
+
+ var arr = this.iconsControls,
+ len = this.iconsProps.iconsLength,
+ icons = (!this.cmbIconsPresets.getSelectedRecord()) ? [] : null,
+ values = [];
+ for (var i=0; i