Commit 14f219b5 authored by GoshaZotov's avatar GoshaZotov Committed by Alexander.Trofimov

change function af_changeFormatTableInfo

parent 88ed5815
......@@ -1904,15 +1904,8 @@
return result;
},
changeFormatTableInfo: function(tableName, optionType)
{
var tablePart = this._getFilterByDisplayName(tableName);
if(!tablePart || (tablePart && !tablePart.TableStyleInfo))
{
return false;
}
changeFormatTableInfo: function(tablePart, optionType)
{
switch(optionType)
{
case c_oAscChangeTableStyleInfo.columnBanded:
......@@ -1957,6 +1950,9 @@
}*/
}
this._cleanStyleTable(tablePart.Ref);
this._setColorStyleTable(tablePart.Ref, tablePart);
//TODO add to history
},
......
......@@ -7311,7 +7311,7 @@
cell_info.formatTableInfo.bandHor = tableStyleInfo.ShowRowStripes;
}
cell_info.formatTableInfo.lastRow = curTablePart.TotalsRowCount !== null ? true : false;
cell_info.formatTableInfo.firstRow = curTablePart.HeaderRowCount !== null ? true : false;
cell_info.formatTableInfo.firstRow = curTablePart.HeaderRowCount === null ? true : false;
//cell_info.formatTableInfo.filterButton = curTablePart.HeaderRowCount !== null ? true : false;
}
......@@ -12792,8 +12792,36 @@
WorksheetView.prototype.af_changeFormatTableInfo = function(tableName, optionType)
{
this.model.autoFilters.changeFormatTableInfo(tableName, optionType);
//TODO добавить перерисовку таблицы и перерисовку шаблонов
var tablePart = this.model.autoFilters._getFilterByDisplayName(tableName);
if(!tablePart || (tablePart && !tablePart.TableStyleInfo))
{
return false;
}
var isChangeTableInfo = this.af_checkChangeTableInfo(tablePart, optionType);
if(isChangeTableInfo !== false)
{
this.model.autoFilters.changeFormatTableInfo(tablePart, optionType);
this._onUpdateFormatTable(isChangeTableInfo, false, true);
//TODO добавить перерисовку таблицы и перерисовку шаблонов
}
};
WorksheetView.prototype.af_checkChangeTableInfo = function(tablePart, optionType)
{
var updateRange = tablePart.Ref;
if(optionType === c_oAscChangeTableStyleInfo.rowHeader && tablePart.HeaderRowCount !== null)//add header row
{
}
else if(optionType === c_oAscChangeTableStyleInfo.rowTotal && tablePart.TotalsRowCount !== null)//add total row
{
}
return updateRange;
};
/*
......
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