Commit ae0c9f30 authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

+ к rev.62561

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62575 954022d7-b5bf-4e40-9824-e11837661b57
parent b7697768
......@@ -4505,17 +4505,34 @@ FilterColumn.prototype.createFilter = function(obj) {
var allFilterOpenElements = false;
var newFilter;
if(obj.result && obj.result.length)
switch (obj.filter.type)
{
newFilter = new Filters();
this.Filters = newFilter;
case c_oAscAutoFilterTypes.ColorFilter:
{
break;
}
else
case c_oAscAutoFilterTypes.CustomFilters:
{
newFilter = new CustomFilters();
this.CustomFiltersObj = newFilter
this.CustomFiltersObj = obj.filter.filter.clone();
break;
}
case c_oAscAutoFilterTypes.DynamicFilter:
{
break;
}
case c_oAscAutoFilterTypes.Top10:
{
break;
}
case c_oAscAutoFilterTypes.Filters:
{
newFilter = new Filters();
this.Filters = newFilter;
allFilterOpenElements = newFilter.init(obj);
break;
}
}
return allFilterOpenElements;
};
......@@ -4538,10 +4555,10 @@ Filters.prototype.clone = function() {
};
Filters.prototype.init = function(obj) {
var allFilterOpenElements = true;
for(var i = 0; i < obj.result.length; i++)
for(var i = 0; i < obj.values.length; i++)
{
if(obj.result[i].visible)
this.Values[obj.result[i].text] = true;
if(obj.values[i].visible)
this.Values[obj.values[i].text] = true;
else
allFilterOpenElements = false;
}
......
......@@ -149,13 +149,13 @@ var maxIndividualValues = 10000;
asc_setCellId : function(cellId) { this.cellId = cellId;},
asc_setValues : function(values) { this.values = values; },
asc_setFilter : function(filter) { this.filter = filter; },
asc_setFilterObj : function(filter) { this.filter = filter; },
asc_setSortState : function(sortVal) { this.sortVal = sortVal; },
asc_getCellId : function() { return this.cellId; },
asc_getValues : function() { return this.values; },
asc_getFilter : function() { return this.filter; },
asc_getFilterObj : function() { return this.filter; },
asc_getSortState : function() { return this.sortVal; }
};
......@@ -3349,7 +3349,7 @@ var maxIndividualValues = 10000;
autoFilterObject.asc_setSortState(sortVal);
autoFilterObject.asc_setCellId(cellId);
autoFilterObject.asc_setValues(values);
autoFilterObject.asc_setFilter(filterObj);
autoFilterObject.asc_setFilterObj(filterObj);
ws.handlers.trigger("setAutoFiltersDialog", autoFilterObject);
},
......@@ -3867,7 +3867,7 @@ var maxIndividualValues = 10000;
var individualCount, count, tempResult;
var isCustomFilters = currentElemArray && filterColumns[currentElemArray] && filterColumns[currentElemArray].CustomFiltersObj;
var isCustomFilters = currentElemArray !== null && filterColumns[currentElemArray] && filterColumns[currentElemArray].CustomFiltersObj;
if(currentElemArray === null || (filterColumns[currentElemArray] && (filterColumns[currentElemArray].Filters || filterColumns[currentElemArray].Top10) || isCustomFilters))
{
individualCount = 0;
......@@ -4739,12 +4739,13 @@ var maxIndividualValues = 10000;
prot["asc_setSortState"] = prot.asc_setSortState;
prot["asc_getSortState"] = prot.asc_getSortState;
prot["asc_getValues"] = prot.asc_getValues;
prot["asc_getFilter"] = prot.asc_getFilter;
prot["asc_getFilterObj"] = prot.asc_getFilterObj;
prot["asc_getCellId"] = prot.asc_getCellId;
window["Asc"]["AutoFilterObj"] = window["Asc"].AutoFilterObj = AutoFilterObj;
prot = AutoFilterObj.prototype;
prot["asc_getType"] = prot.asc_getType;
prot["asc_setType"] = prot.asc_setType;
prot["asc_getFilter"] = prot.asc_getFilter;
window["Asc"]["AutoFiltersOptionsElements"] = window["Asc"].AutoFiltersOptionsElements = AutoFiltersOptionsElements;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment