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

+ обработке клавиши clearFilter

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57610 954022d7-b5bf-4e40-9824-e11837661b57
parent a2431939
......@@ -1641,7 +1641,7 @@ var gUndoInsDelCellsFlag = true;
if(aWs.AutoFilter && ((aWs.AutoFilter.FilterColumns && aWs.AutoFilter.FilterColumns.length) || (aWs.AutoFilter.SortState && aWs.AutoFilter.SortState.SortConditions && aWs.AutoFilter.SortState.SortConditions[0])))
{
if(clean)
this._cleanFilterColumnsAndSortState(aWs.AutoFilter);
this._cleanFilterColumnsAndSortState(aWs.AutoFilter, activeCell);
return true;
}
......@@ -2054,36 +2054,40 @@ var gUndoInsDelCellsFlag = true;
}
return null;
},
checkApplyFilterOrSort: function(tablePartId)
{
var aWs = this._getCurrentWS();
var result = false;
if(tablePartId !== undefined)
{
var tablePart = aWs.TableParts[tablePartId];
if(tablePart.Ref && ((tablePart.AutoFilter && tablePart.AutoFilter.FilterColumns && tablePart.AutoFilter.FilterColumns.length) || (tablePart && tablePart.SortState && tablePart.SortState.SortConditions && tablePart.SortState.SortConditions[0])))
result = true;
}
else
{
if(aWs.AutoFilter && ((aWs.AutoFilter.FilterColumns && aWs.AutoFilter.FilterColumns.length) || (aWs.AutoFilter.SortState && aWs.AutoFilter.SortState.SortConditions && aWs.AutoFilter.SortState.SortConditions[0])))
{
checkApplyFilterOrSort: function(tablePartId)
{
var aWs = this._getCurrentWS();
var result = false;
if(tablePartId !== undefined)
{
var tablePart = aWs.TableParts[tablePartId];
if(tablePart.Ref && ((tablePart.AutoFilter && tablePart.AutoFilter.FilterColumns && tablePart.AutoFilter.FilterColumns.length) || (tablePart && tablePart.SortState && tablePart.SortState.SortConditions && tablePart.SortState.SortConditions[0])))
result = {isFilterColumns: true, isAutoFilter: true};
}
else if(aWs.AutoFilter)
{
else if(tablePart.Ref && tablePart.AutoFilter && tablePart.AutoFilter !== null)
result = {isFilterColumns: null, isAutoFilter: true};
}
else
{
result = {isFilterColumns: null, isAutoFilter: false};
};
};
return result;
},
result = {isFilterColumns: null, isAutoFilter: false};
}
else
{
if(aWs.AutoFilter && ((aWs.AutoFilter.FilterColumns && aWs.AutoFilter.FilterColumns.length) || (aWs.AutoFilter.SortState && aWs.AutoFilter.SortState.SortConditions && aWs.AutoFilter.SortState.SortConditions[0])))
{
result = {isFilterColumns: true, isAutoFilter: true};
}
else if(aWs.AutoFilter)
{
result = {isFilterColumns: null, isAutoFilter: true};
}
else
{
result = {isFilterColumns: null, isAutoFilter: false};
};
};
return result;
},
getAddFormatTableOptions: function(activeCells)
{
......
......@@ -6457,11 +6457,9 @@
{
if(tablePartsOptions.tableRange.containsRange(activeCell))
{
cell_info.isAutoFilter = true;
if(this.autoFilters.checkApplyFilterOrSort(tablePartsOptions.id))
cell_info.clearFilter = true;
else
cell_info.clearFilter = null;
var checkApplyFilterOrSort = this.autoFilters.checkApplyFilterOrSort(tablePartsOptions.id);
cell_info.isAutoFilter = checkApplyFilterOrSort.isAutoFilter;
cell_info.clearFilter = checkApplyFilterOrSort.isFilterColumns;
}
else
{
......
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