diff --git a/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js b/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js
index af9717f83..a0c20fa44 100644
--- a/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js
+++ b/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js
@@ -160,48 +160,52 @@ define([
'
',
'',
'',
- ' ',
+ ' ',
' ',
' ',
- ' ',
+ ' ',
' ',
' ',
' ',
- ' ',
+ ' ',
' ',
' ',
' ',
' ',
'',
- ' ',
+ ' ',
' ',
' ',
- ' ',
+ ' ',
' ',
' ',
' ',
- ' ',
+ ' ',
' ',
' ',
' ',
' ',
'',
- ' ',
+ ' ',
' ',
' ',
' ',
' | ',
'
',
'',
- '',
- '',
- '',
- '',
+ ' | ',
+ '',
+ '',
+ ' ',
+ ' ',
+ ' ',
+ ' ',
+ '',
' | ',
'
',
'',
@@ -877,6 +881,10 @@ define([
{value: true, displayValue: this.textGradient}
]
}).on('selected', function(combo, record) {
+ if (me.barProps) {
+ me.barProps.asc_setGradient(record.value);
+ me.previewFormat();
+ }
});
this.cmbFill.setValue(false);
@@ -896,7 +904,7 @@ define([
this.chFill = new Common.UI.CheckBox({
el: $('#format-rules-edit-chk-fill'),
- labelText: 'Same as positive'
+ labelText: this.textSameAs
});
this.chFill.on('change', function(field, newValue, oldValue, eOpts){
me.btnNegFill.setDisabled(field.getValue()=='checked');
@@ -914,9 +922,17 @@ define([
{value: true, displayValue: this.textNone}
]
}).on('selected', function(combo, record) {
- me.btnPosBorder.setDisabled(record.value);
- me.btnNegBorder.setDisabled(record.value || me.chBorder.getValue()=='checked');
- me.chBorder.setDisabled(record.value);
+ var hasBorder = !record.value;
+ me.btnPosBorder.setDisabled(!hasBorder);
+ me.btnNegBorder.setDisabled(!hasBorder || me.chBorder.getValue()=='checked');
+ me.chBorder.setDisabled(!hasBorder);
+ if (me.barProps) {
+ if (hasBorder) {
+ me.barProps.asc_setBorderColor(Common.Utils.ThemeColor.getRgbColor(me.btnPosBorder.colorPicker.currentColor));
+ } else
+ me.barProps.asc_setBorderColor(null);
+ me.previewFormat();
+ }
});
this.cmbBorder.setValue(false);
@@ -936,7 +952,7 @@ define([
this.chBorder = new Common.UI.CheckBox({
el: $('#format-rules-edit-chk-border'),
- labelText: 'Same as positive'
+ labelText: this.textSameAs
});
this.chBorder.on('change', function(field, newValue, oldValue, eOpts){
me.btnNegBorder.setDisabled(field.getValue()=='checked');
@@ -955,14 +971,17 @@ define([
{value: Asc.c_oAscDataBarDirection.rightToLeft, displayValue: this.textRight2Left}
]
}).on('selected', function(combo, record) {
+ if (me.barProps) {
+ me.barProps.asc_setDirection(record.value);
+ me.previewFormat();
+ }
});
this.cmbBarDirection.setValue(Asc.c_oAscDataBarDirection.context);
this.chShowBar = new Common.UI.CheckBox({
el: $('#format-rules-edit-chk-show-bar'),
- labelText: 'Show bar only'
+ labelText: this.textShowBar
});
- // this.chShowBar.on('change', _.bind(this.onShowBarChange, this));
this.cmbAxisPos = new Common.UI.ComboBox({
el : $('#format-rules-edit-combo-axis-pos'),
@@ -1266,39 +1285,40 @@ define([
props.asc_setColorScaleOrDataBarOrIconSetRule(scaleProps);
break;
case Asc.c_oAscCFType.dataBar:
- // value = props.asc_getColorScaleOrDataBarOrIconSetRule();
- // var bars = value.asc_getCFVOs();
- // var arr = this.barControls;
- // for (var i=0; i