[SSE] Отображение цветов в меню фильтров и сортировки.
This commit is contained in:
parent
44f71cdcef
commit
1f96ebed7a
|
@ -824,7 +824,13 @@ define([
|
||||||
_setDefaults: function() {
|
_setDefaults: function() {
|
||||||
this.initialFilterType = this.configTo.asc_getFilterObj().asc_getType();
|
this.initialFilterType = this.configTo.asc_getFilterObj().asc_getType();
|
||||||
|
|
||||||
var isCustomFilter = (this.initialFilterType === Asc.c_oAscAutoFilterTypes.CustomFilters);
|
var isCustomFilter = (this.initialFilterType === Asc.c_oAscAutoFilterTypes.CustomFilters),
|
||||||
|
isTextFilter = this.configTo.asc_getIsTextFilter(),
|
||||||
|
colorsFill = this.configTo.asc_getColorsFill(),
|
||||||
|
colorsFont = this.configTo.asc_getColorsFont();
|
||||||
|
|
||||||
|
this.miTextFilter.setVisible(isTextFilter);
|
||||||
|
this.miNumFilter.setVisible(!isTextFilter);
|
||||||
|
|
||||||
this.miSortLow2High.setChecked(false, true);
|
this.miSortLow2High.setChecked(false, true);
|
||||||
this.miSortHigh2Low.setChecked(false, true);
|
this.miSortHigh2Low.setChecked(false, true);
|
||||||
|
@ -837,6 +843,34 @@ define([
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (colorsFont && colorsFont.length>0) {
|
||||||
|
var colors = [];
|
||||||
|
colorsFont.forEach(function(item, index) {
|
||||||
|
colors.push(Common.Utils.ThemeColor.getHexColor(item.get_r(), item.get_g(), item.get_b()).toLocaleUpperCase());
|
||||||
|
});
|
||||||
|
this.mnuSortColorFontPicker.updateColors(colors);
|
||||||
|
this.mnuFilterColorFontPicker.updateColors(colors);
|
||||||
|
this.miSortFontColor.setVisible(true);
|
||||||
|
this.miFilterFontColor.setVisible(true);
|
||||||
|
} else {
|
||||||
|
this.miSortFontColor.setVisible(false);
|
||||||
|
this.miFilterFontColor.setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (colorsFill && colorsFill.length>0) {
|
||||||
|
var colors = [];
|
||||||
|
colorsFill.forEach(function(item, index) {
|
||||||
|
colors.push(Common.Utils.ThemeColor.getHexColor(item.get_r(), item.get_g(), item.get_b()).toLocaleUpperCase());
|
||||||
|
});
|
||||||
|
this.mnuSortColorCellsPicker.updateColors(colors);
|
||||||
|
this.mnuFilterColorCellsPicker.updateColors(colors);
|
||||||
|
this.miSortCellColor.setVisible(true);
|
||||||
|
this.miFilterCellColor.setVisible(true);
|
||||||
|
} else {
|
||||||
|
this.miSortCellColor.setVisible(false);
|
||||||
|
this.miFilterCellColor.setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
// this.chCustomFilter.setValue(isCustomFilter);
|
// this.chCustomFilter.setValue(isCustomFilter);
|
||||||
this.btnOk.setDisabled(isCustomFilter);
|
this.btnOk.setDisabled(isCustomFilter);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue