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

+ к rev.62449

изменения во взаимодействии с меню

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62507 954022d7-b5bf-4e40-9824-e11837661b57
parent 473a5269
......@@ -299,6 +299,14 @@ var c_oTargetType = {
FrozenAnchorH : 14,
FrozenAnchorV : 15
};
var c_oAscAutoFilterTypes = {
ColorFilter: 0,
CustomFilters: 1,
DynamicFilter: 2,
Top10: 3,
Filters: 4
};
var c_oAscCoAuthoringMeBorderColor = new window.CColor(22, 156, 0);
var c_oAscCoAuthoringOtherBorderColor = new window.CColor(238, 53, 37);
......
......@@ -214,7 +214,7 @@
prot["asc_getComments"] = prot.asc_getComments;
prot["asc_getLocked"] = prot.asc_getLocked;
prot["asc_getIsFormatTable"] = prot.asc_getIsFormatTable;
prot["asc_tableStyleName"] = prot.asc_tableStyleName;
prot["asc_getTableStyleName"] = prot.asc_getTableStyleName;
prot["asc_getStyleName"] = prot.asc_getStyleName;
prot["asc_getNumFormatType"] = prot.asc_getNumFormatType;
prot["asc_getAngle"] = prot.asc_getAngle;
......
......@@ -358,6 +358,7 @@ var UndoRedoDataTypes = new function() {
this.ClrScheme = 28;
this.AutoFilter = 29;
this.AutoFiltersOptions = 30;
this.AutoFilterObj = 31;
this.AutoFiltersOptionsElements = 32;
this.SingleProperty = 33;
......@@ -431,6 +432,7 @@ var UndoRedoDataTypes = new function() {
case this.ClrScheme: return new UndoRedoData_ClrScheme();break;
case this.AutoFilter: return new UndoRedoData_AutoFilter(); break;
case this.AutoFiltersOptions: return new Asc.AutoFiltersOptions(); break;
case this.AutoFilterObj: return new Asc.AutoFilterObj(); break;
case this.AutoFiltersOptionsElements: return new Asc.AutoFiltersOptionsElements(); break;
case this.AddFormatTableOptions: return new Asc.AddFormatTableOptions(); break;
case this.SingleProperty: return new UndoRedoData_SingleProperty(); break;
......@@ -2991,7 +2993,7 @@ UndoRedoCell.prototype = {
cell.setValueData(Val);
// ToDo Так делать неправильно, нужно поправить (перенести логику в model, а отрисовку отделить)
var worksheetView = this.wb.oApi.wb.getWorksheetById(nSheetId);
worksheetView.autoFilters._renameTableColumn(new Asc.Range(nCol, nRow, nCol, nRow), bUndo);
worksheetView.autoFilters.renameTableColumn(new Asc.Range(nCol, nRow, nCol, nRow), bUndo);
}
else if(historyitem_Cell_SetStyle == Type)
{
......
......@@ -4339,7 +4339,8 @@ TablePart.prototype.clone = function(ws) {
res.result.push(this.result[i].clone());
}
res.recalc(ws);
if(ws !== null)
res.recalc(ws);
return res;
};
TablePart.prototype.recalc = function(ws) {
......@@ -4483,12 +4484,14 @@ FilterColumn.prototype.clone = function() {
res.ShowButton = this.ShowButton;
return res;
};
FilterColumn.prototype.isHideValue = function(val, isDateTimeFormat) {
FilterColumn.prototype.isHideValue = function(val, isDateTimeFormat, top10Length) {
var res = false;
if(this.Filters)
res = this.Filters.isHideValue(val, isDateTimeFormat);
else if(this.CustomFiltersObj)
res = this.CustomFiltersObj.isHideValue(val);
else if(this.Top10)
res = this.Top10.isHideValue(val, top10Length);
return res;
};
FilterColumn.prototype.clean = function(val) {
......@@ -4512,7 +4515,7 @@ FilterColumn.prototype.createFilter = function(obj) {
newFilter = new CustomFilters();
this.CustomFiltersObj = newFilter
}
allFilterOpenElements = newFilter.create(obj);
allFilterOpenElements = newFilter.init(obj);
return allFilterOpenElements;
};
......@@ -4533,7 +4536,7 @@ Filters.prototype.clone = function() {
res.Blank = this.Blank;
return res;
};
Filters.prototype.create = function(obj) {
Filters.prototype.init = function(obj) {
var allFilterOpenElements = true;
for(var i = 0; i < obj.result.length; i++)
{
......@@ -4612,6 +4615,7 @@ DateGroupItem.prototype.clone = function() {
res.Year = this.Year;
return res;
};
/** @constructor */
function CustomFilters() {
this.And = null;
......@@ -4627,7 +4631,7 @@ CustomFilters.prototype.clone = function() {
}
return res;
};
CustomFilters.prototype.create = function(obj) {
CustomFilters.prototype.init = function(obj) {
this.And = !obj.isChecked;
this.CustomFilters = [];
......@@ -4639,11 +4643,19 @@ CustomFilters.prototype.create = function(obj) {
CustomFilters.prototype.isHideValue = function(val){
var res = false;
var filterRes1 = this.CustomFilters[0] ? this.CustomFilters[0].isHideValue(val) : true;
var filterRes2 = this.CustomFilters[1] ? this.CustomFilters[1].isHideValue(val) : true;
var filterRes1 = this.CustomFilters[0] ? this.CustomFilters[0].isHideValue(val) : null;
var filterRes2 = this.CustomFilters[1] ? this.CustomFilters[1].isHideValue(val) : null;
if(this.And && ((filterRes1 === null && filterRes2 === true || filterRes1 === true && filterRes2 === null || filterRes1 === true && filterRes2 === true)))
res = true;
if(!this.And && ((filterRes1 === true || filterRes2 === true)))
res = true;
return this.And ? (filterRes1 && filterRes2) : (filterRes1 || filterRes2);
return res;
};
CustomFilters.prototype.asc_getAnd = function () { return this.And; }
CustomFilters.prototype.asc_setAnd = function (val) { this.And = val; }
/** @constructor */
function CustomFilter(operator, val) {
this.Operator = operator != undefined ? operator : null;
......@@ -4655,7 +4667,7 @@ CustomFilter.prototype.clone = function() {
res.Val = this.Val;
return res;
};
CustomFilter.prototype.create = function(operator, val) {
CustomFilter.prototype.init = function(operator, val) {
this.Operator = operator;
this.Val = val;
};
......@@ -4664,7 +4676,7 @@ CustomFilter.prototype.isHideValue = function(val) {
var result = false;
var checkComplexSymbols = null;
var filterVal;
var filterVal, position;
if(checkComplexSymbols != null)
result = checkComplexSymbols;
else
......@@ -4772,6 +4784,13 @@ CustomFilter.prototype.isHideValue = function(val) {
return !result;
};
CustomFilter.prototype.asc_getOperator = function () { return this.Operator; };
CustomFilter.prototype.asc_getVal = function () { return this.Val; };
CustomFilter.prototype.asc_setOperator = function (val) { this.Operator = val; };
CustomFilter.prototype.asc_setVal = function (val) { this.Val = val; };
/** @constructor */
function DynamicFilter() {
this.Type = null;
......@@ -4785,6 +4804,15 @@ DynamicFilter.prototype.clone = function() {
res.MaxVal = this.MaxVal;
return res;
};
DynamicFilter.prototype.asc_getType = function () { return this.Type; };
DynamicFilter.prototype.asc_getVal = function () { return this.Val; };
DynamicFilter.prototype.asc_getMaxVal = function () { return this.MaxVal; };
DynamicFilter.prototype.asc_setType = function (val) { this.Type = val; };
DynamicFilter.prototype.asc_setVal = function (val) { this.Val = val; };
DynamicFilter.prototype.asc_setMaxVal = function (val) { this.MaxVal = val; };
/** @constructor */
function ColorFilter() {
this.CellColor = null;
......@@ -4798,6 +4826,13 @@ ColorFilter.prototype.clone = function() {
}
return res;
};
ColorFilter.prototype.asc_getCellColor = function () { return this.CellColor; };
ColorFilter.prototype.asc_getDxf = function () { return this.dxf; };
ColorFilter.prototype.asc_setCellColor = function (val) { this.CellColor = val; };
ColorFilter.prototype.asc_setDxf = function (val) { this.dxf = val; };
/** @constructor */
function Top10() {
this.FilterVal = null;
......@@ -4813,6 +4848,20 @@ Top10.prototype.clone = function() {
res.Val = this.Val;
return res;
};
Top10.prototype.isHideValue = function(val, top10Length) {
return;
};
Top10.prototype.asc_getFilterVal = function () { return this.FilterVal; };
Top10.prototype.asc_getPercent = function () { return this.Percent; };
Top10.prototype.asc_getTop = function () { return this.Top; };
Top10.prototype.asc_getVal = function () { return this.Val; };
Top10.prototype.asc_setFilterVal = function (val) { this.FilterVal = val; };
Top10.prototype.asc_setPercent = function (val) { this.Percent = val; };
Top10.prototype.asc_setTop = function (val) { this.Top = val; };
Top10.prototype.asc_setVal = function (val) { this.Val = val; };
/** @constructor */
function SortCondition() {
this.Ref = null;
......@@ -4843,3 +4892,49 @@ dateElem.prototype.clone = function() {
return res;
};
window["Asc"]["CustomFilters"] = window["Asc"].CustomFilters = CustomFilters;
prot = CustomFilters.prototype;
prot["asc_getAnd"] = prot.asc_getAnd;
prot["asc_setAnd"] = prot.asc_setAnd;
window["Asc"]["CustomFilter"] = window["Asc"].CustomFilter = CustomFilter;
prot = CustomFilter.prototype;
prot["asc_getOperator"] = prot.asc_getOperator;
prot["asc_getVal"] = prot.asc_getVal;
prot["asc_setOperator"] = prot.asc_setOperator;
prot["asc_setVal"] = prot.asc_setVal;
window["Asc"]["CustomFilter"] = window["Asc"].CustomFilter = CustomFilter;
prot = CustomFilter.prototype;
prot["asc_getOperator"] = prot.asc_getOperator;
prot["asc_getVal"] = prot.asc_getVal;
prot["asc_setOperator"] = prot.asc_setOperator;
prot["asc_setVal"] = prot.asc_setVal;
window["Asc"]["DynamicFilter"] = window["Asc"].DynamicFilter = DynamicFilter;
prot = DynamicFilter.prototype;
prot["asc_getType"] = prot.asc_getType;
prot["asc_getVal"] = prot.asc_getVal;
prot["asc_getMaxVal"] = prot.asc_getMaxVal;
prot["asc_setType"] = prot.asc_setType;
prot["asc_setVal"] = prot.asc_setVal;
prot["asc_setMaxVal"] = prot.asc_setMaxVal;
window["Asc"]["ColorFilter"] = window["Asc"].ColorFilter = ColorFilter;
prot = ColorFilter.prototype;
prot["asc_getCellColor"] = prot.asc_getType;
prot["asc_getDxf"] = prot.asc_getVal;
prot["asc_setCellColor"] = prot.asc_setType;
prot["asc_setDxf"] = prot.asc_setVal;
window["Asc"]["Top10"] = window["Asc"].Top10 = Top10;
prot = Top10.prototype;
prot["asc_getFilterVal"] = prot.asc_getFilterVal;
prot["asc_getPercent"] = prot.asc_getPercent;
prot["asc_getTop"] = prot.asc_getTop;
prot["asc_getVal"] = prot.asc_getVal;
prot["asc_setFilterVal"] = prot.asc_setFilterVal;
prot["asc_setPercent"] = prot.asc_setPercent;
prot["asc_setTop"] = prot.asc_setTop;
prot["asc_setVal"] = prot.asc_setVal;
\ No newline at end of file
This diff is collapsed.
......@@ -7597,7 +7597,7 @@
// Автозаполняем ячейки
if (range.promote(/*bCtrl*/ctrlPress, /*bVertical*/(1 === t.fillHandleDirection), nIndex)) {
// Вызываем функцию пересчета для заголовков форматированной таблицы
t.autoFilters._renameTableColumn(arn);
t.autoFilters.renameTableColumn(arn);
} else {
t.handlers.trigger("onErrorEvent", c_oAscError.ID.CannotFillRange, c_oAscError.Level.NoCritical);
t.activeRange.assign2(range.bbox);
......@@ -7941,8 +7941,8 @@
t.autoFilters._moveAutoFilters(arnTo, arnFrom, null, copyRange);
// Вызываем функцию пересчета для заголовков форматированной таблицы
t.autoFilters._renameTableColumn(arnFrom);
t.autoFilters._renameTableColumn(arnTo);
t.autoFilters.renameTableColumn(arnFrom);
t.autoFilters.renameTableColumn(arnTo);
t.autoFilters.reDrawFilter(arnFrom);
History.EndTransaction();
......@@ -8117,7 +8117,7 @@
range.cleanHyperlinks();
// Вызываем функцию пересчета для заголовков форматированной таблицы
t.autoFilters._renameTableColumn(arn);
t.autoFilters.renameTableColumn(arn);
/* возвращаем отрисовку. и перерисовываем ячейки с предварительным пересчетом */
buildRecalc(t.model.workbook);
......@@ -8169,7 +8169,7 @@
if (null !== val.asc_getText()) {
t.model.getRange3(r, c, r, c).setValue(val.asc_getText());
// Вызываем функцию пересчета для заголовков форматированной таблицы
t.autoFilters._renameTableColumn(arn);
t.autoFilters.renameTableColumn(arn);
}
break;
} else {
......@@ -8220,7 +8220,7 @@
else
selectData = t._setInfoAfterPaste(val,onlyActive);
t.autoFilters._renameTableColumn(t.activeRange);
t.autoFilters.renameTableColumn(t.activeRange);
if (!selectData) {
bIsUpdate = false;
......@@ -10380,7 +10380,7 @@
} else {
c.setValue2(val);
// Вызываем функцию пересчета для заголовков форматированной таблицы
t.autoFilters._renameTableColumn(oCellEdit);
t.autoFilters.renameTableColumn(oCellEdit);
}
if (!isFormula) {
......
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