Commit 88ed5815 authored by GoshaZotov's avatar GoshaZotov Committed by Alexander.Trofimov

add function in api - asc_changeFormatTableInfo

parent 45fac951
......@@ -660,6 +660,11 @@ var editor;
var ws = this.wb.getWorksheet();
return ws.af_changeSelectionFormatTable(tableName, optionType);
};
spreadsheet_api.prototype.asc_changeFormatTableInfo = function(tableName, optionType) {
var ws = this.wb.getWorksheet();
return ws.af_changeFormatTableInfo(tableName, optionType);
};
spreadsheet_api.prototype.asc_setMobileVersion = function(isMobile) {
this.isMobileVersion = isMobile;
......@@ -3361,6 +3366,7 @@ var editor;
prot["asc_getAddFormatTableOptions"] = prot.asc_getAddFormatTableOptions;
prot["asc_clearFilter"] = prot.asc_clearFilter;
prot["asc_changeSelectionFormatTable"] = prot.asc_changeSelectionFormatTable;
prot["asc_changeFormatTableInfo"] = prot.asc_changeFormatTableInfo;
// Drawing objects interface
......
......@@ -184,10 +184,13 @@ var c_oAscChangeSelectionFormatTable = {
};
var c_oAscChangeTableStyleInfo = {
showColumnStripes: 1,
showFirstColumn: 2,
showLastColumn: 3,
showRowStripes: 4
columnFirst: 1,
columnLast: 2,
columnBanded: 3,
rowHeader: 4,
rowTotal: 5,
rowBanded: 6,
filterButton: 7
};
// Состояние редактора ячейки
......
......@@ -1904,7 +1904,7 @@
return result;
},
changeTableStyleInfo: function(tableName, optionType)
changeFormatTableInfo: function(tableName, optionType)
{
var tablePart = this._getFilterByDisplayName(tableName);
......@@ -1915,26 +1915,46 @@
switch(optionType)
{
case c_oAscChangeTableStyleInfo.showColumnStripes:
case c_oAscChangeTableStyleInfo.columnBanded:
{
tablePart.TableStyleInfo.ShowColumnStripes = !tablePart.TableStyleInfo.ShowColumnStripes;
break;
}
case c_oAscChangeTableStyleInfo.showFirstColumn:
case c_oAscChangeTableStyleInfo.columnFirst:
{
tablePart.TableStyleInfo.ShowFirstColumn = !tablePart.TableStyleInfo.ShowFirstColumn;
break;
}
case c_oAscChangeTableStyleInfo.showLastColumn:
case c_oAscChangeTableStyleInfo.columnLast:
{
tablePart.TableStyleInfo.ShowLastColumn = !tablePart.TableStyleInfo.ShowLastColumn;
break;
}
case c_oAscChangeTableStyleInfo.showRowStripes:
case c_oAscChangeTableStyleInfo.rowBanded:
{
tablePart.TableStyleInfo.ShowRowStripes = !tablePart.TableStyleInfo.ShowRowStripes;
break;
}
case c_oAscChangeTableStyleInfo.rowHeader:
{
tablePart.TableStyleInfo.ShowRowStripes = !tablePart.TableStyleInfo.ShowRowStripes;
break;
}
/*case c_oAscChangeTableStyleInfo.rowTotal:
{
tablePart.TableStyleInfo.ShowRowStripes = !tablePart.TableStyleInfo.ShowRowStripes;
break;
}
case c_oAscChangeTableStyleInfo.rowHeader:
{
tablePart.TableStyleInfo.ShowRowStripes = !tablePart.TableStyleInfo.ShowRowStripes;
break;
}
case c_oAscChangeTableStyleInfo.filterButton:
{
tablePart.TableStyleInfo.ShowRowStripes = !tablePart.TableStyleInfo.ShowRowStripes;
break;
}*/
}
//TODO add to history
......
......@@ -12789,6 +12789,12 @@
t.setSelection(new Asc.Range(startCol, startRow, endCol, endRow));
};
WorksheetView.prototype.af_changeFormatTableInfo = function(tableName, optionType)
{
this.model.autoFilters.changeFormatTableInfo(tableName, optionType);
//TODO добавить перерисовку таблицы и перерисовку шаблонов
};
/*
* Export
......
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