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

отсылаю объект с параметрами из меню при добавлении форматированной таблицы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47793 954022d7-b5bf-4e40-9824-e11837661b57
parent 7605fc67
......@@ -524,9 +524,9 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.wb.resize();
},
asc_addAutoFilter: function(lTable, isTitle){
asc_addAutoFilter: function(lTable, addFormatTableOptionsObj){
var ws = this.wb.getWorksheet();
var result = ws.addAutoFilter(lTable, isTitle);
var result = ws.addAutoFilter(lTable, addFormatTableOptionsObj);
return result;
},
......
......@@ -2066,7 +2066,8 @@
if($('#isTitle')[0].checked)
isTitle = false;
addFilterOptions.asc_setRange(addFilterDialog.find('#formatTableRange').val());
api.asc_addAutoFilter(defaultStyle, isTitle);
addFilterOptions.asc_setIsTitle(isTitle);
api.asc_addAutoFilter(defaultStyle, addFilterOptions);
$(this).dialog("close");
}
},
......
......@@ -211,7 +211,7 @@
},
//добавляем кнопки или удаляем (вызывается из меню при нажатии на кнопку добавления фильтра)
addAutoFilter: function (ws, lTable, ar, openFilter, isTurnOffHistory, addNameColumn) {
addAutoFilter: function (ws, lTable, ar, openFilter, isTurnOffHistory, addFormatTableOptionsObj) {
var bIsActiveSheet = this._isActiveSheet(ws);
var bIsOpenFilter = undefined !== openFilter;
var activeCells = Asc.clone(ar);
......@@ -232,14 +232,12 @@
var endCell;
var rangeFilter;
var splitRange;
if(addNameColumn == undefined)
if(!addFormatTableOptionsObj)
addNameColumn = true;
else
{
var objOpt = this.AddFormatTableOptions;
var ref;
if(objOpt)
ref = this.AddFormatTableOptions.asc_getRange();
ref = addFormatTableOptionsObj.asc_getRange();
addNameColumn = addFormatTableOptionsObj.asc_getIsTitle();
var newRange = this._refToRange(ref);
if(newRange)
activeCells = newRange;
......
......@@ -9151,14 +9151,14 @@
this.arrActiveFormulaRanges = [];
},
addAutoFilter: function (lTable, isTitle) {
addAutoFilter: function (lTable, addFormatTableOptionsObj) {
var t = this;
var ar = t.activeRange.clone(true);
var onChangeAutoFilterCallback = function (isSuccess) {
if (false === isSuccess)
return;
return t.autoFilters.addAutoFilter(t, lTable, ar, undefined, false, isTitle);
return t.autoFilters.addAutoFilter(t, lTable, ar, undefined, false, addFormatTableOptionsObj);
};
this._isLockedAll (onChangeAutoFilterCallback);
},
......
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