[SSE] Show previouse settings for between autofilter (don't change "and/or" option).
This commit is contained in:
parent
e86454d8d6
commit
0e68fbe525
|
@ -850,14 +850,16 @@ define([
|
||||||
newCustomFilter.asc_setCustomFilters((item.value == -2) ? [new Asc.CustomFilter(), new Asc.CustomFilter()]: [new Asc.CustomFilter()]);
|
newCustomFilter.asc_setCustomFilters((item.value == -2) ? [new Asc.CustomFilter(), new Asc.CustomFilter()]: [new Asc.CustomFilter()]);
|
||||||
|
|
||||||
var newCustomFilters = newCustomFilter.asc_getCustomFilters();
|
var newCustomFilters = newCustomFilter.asc_getCustomFilters();
|
||||||
newCustomFilter.asc_setAnd(true);
|
|
||||||
newCustomFilters[0].asc_setOperator((item.value == -2) ? Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo : item.value);
|
newCustomFilters[0].asc_setOperator((item.value == -2) ? Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo : item.value);
|
||||||
|
|
||||||
if (item.value == -2) {
|
if (item.value == -2) {
|
||||||
newCustomFilters[0].asc_setVal((cond1 == Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo && cond2 == Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo) ? value1 : '');
|
var isBetween = (cond1 == Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo && cond2 == Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo);
|
||||||
|
newCustomFilter.asc_setAnd(isBetween ? isAnd : true);
|
||||||
|
newCustomFilters[0].asc_setVal(isBetween ? value1 : '');
|
||||||
newCustomFilters[1].asc_setOperator(Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo);
|
newCustomFilters[1].asc_setOperator(Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo);
|
||||||
newCustomFilters[1].asc_setVal((cond1 == Asc.c_oAscCustomAutoFilter.isGreaterThanOrEqualTo && cond2 == Asc.c_oAscCustomAutoFilter.isLessThanOrEqualTo) ? value2 : '');
|
newCustomFilters[1].asc_setVal(isBetween ? value2 : '');
|
||||||
} else {
|
} else {
|
||||||
|
newCustomFilter.asc_setAnd(true);
|
||||||
newCustomFilters[0].asc_setVal((item.value == cond1) ? value1 : '');
|
newCustomFilters[0].asc_setVal((item.value == cond1) ? value1 : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue