Commit 2aa4d399 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

add History.UndoRedoPrepare, History.UndoRedoEnd....

add History.UndoRedoPrepare, History.UndoRedoEnd. trigger("updateSheetViewSettings"), trigger("asc_onUpdateTabColor" перенесены в History.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56547 954022d7-b5bf-4e40-9824-e11837661b57
parent f3ba8db6
This diff is collapsed.
...@@ -1647,7 +1647,7 @@ Workbook.prototype.DeserializeHistory = function(aChanges, fCallback){ ...@@ -1647,7 +1647,7 @@ Workbook.prototype.DeserializeHistory = function(aChanges, fCallback){
History.SetSelectionRedo(null); History.SetSelectionRedo(null);
var oHistoryPositions = null;//нужен самый последний historyitem_Workbook_SheetPositions var oHistoryPositions = null;//нужен самый последний historyitem_Workbook_SheetPositions
var oRedoObjectParam = new Asc.RedoObjectParam(); var oRedoObjectParam = new Asc.RedoObjectParam();
History.RedoPrepare(oRedoObjectParam); History.UndoRedoPrepare(oRedoObjectParam, false);
for(var i = 0, length = aChanges.length; i < length; ++i) for(var i = 0, length = aChanges.length; i < length; ++i)
{ {
var sChange = aChanges[i]; var sChange = aChanges[i];
...@@ -1673,7 +1673,7 @@ Workbook.prototype.DeserializeHistory = function(aChanges, fCallback){ ...@@ -1673,7 +1673,7 @@ Workbook.prototype.DeserializeHistory = function(aChanges, fCallback){
if(null != oHistoryPositions) if(null != oHistoryPositions)
History.RedoAdd(oRedoObjectParam, oHistoryPositions.oClass, oHistoryPositions.nActionType, oHistoryPositions.nSheetId, oHistoryPositions.oRange, oHistoryPositions.oData); History.RedoAdd(oRedoObjectParam, oHistoryPositions.oClass, oHistoryPositions.nActionType, oHistoryPositions.nSheetId, oHistoryPositions.oRange, oHistoryPositions.oData);
History.RedoEnd(null, oRedoObjectParam); History.UndoRedoEnd(null, oRedoObjectParam, false);
oThis.bCollaborativeChanges = false; oThis.bCollaborativeChanges = false;
History.Clear(); History.Clear();
if(null != fCallback) if(null != fCallback)
...@@ -2117,8 +2117,8 @@ Woorksheet.prototype.setTabColor=function(color){ ...@@ -2117,8 +2117,8 @@ Woorksheet.prototype.setTabColor=function(color){
new UndoRedoData_FromTo(this.sheetPr.TabColor ? this.sheetPr.TabColor.clone() : null, color ? color.clone() : null)); new UndoRedoData_FromTo(this.sheetPr.TabColor ? this.sheetPr.TabColor.clone() : null, color ? color.clone() : null));
this.sheetPr.TabColor = color; this.sheetPr.TabColor = color;
if (!this.workbook.bUndoChanges && !this.workbook.bRedoChanges)
this.workbook.handlers.trigger("asc_onUpdateTabColor", this.getIndex()); this.workbook.handlers.trigger("asc_onUpdateTabColor", this.getIndex());
}; };
Woorksheet.prototype.renameWsToCollaborate=function(name){ Woorksheet.prototype.renameWsToCollaborate=function(name){
var lastname = this.getName(); var lastname = this.getName();
...@@ -2218,7 +2218,8 @@ Woorksheet.prototype.setSheetViewSettings = function (options) { ...@@ -2218,7 +2218,8 @@ Woorksheet.prototype.setSheetViewSettings = function (options) {
History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_SetViewSettings, this.getId(), null, new UndoRedoData_FromTo(current, options.clone())); History.Add(g_oUndoRedoWorksheet, historyitem_Worksheet_SetViewSettings, this.getId(), null, new UndoRedoData_FromTo(current, options.clone()));
this.sheetViews[0].setSettings(options); this.sheetViews[0].setSettings(options);
this.workbook.handlers.trigger("asc_onUpdateSheetViewSettings"); if (!this.workbook.bUndoChanges && !this.workbook.bRedoChanges)
this.workbook.handlers.trigger("asc_onUpdateSheetViewSettings");
}; };
Woorksheet.prototype.getRowsCount=function(){ Woorksheet.prototype.getRowsCount=function(){
return this.nRowsCount; return this.nRowsCount;
......
...@@ -1159,10 +1159,11 @@ ...@@ -1159,10 +1159,11 @@
this.bIsOn = false; this.bIsOn = false;
this.bIsReInit = false; this.bIsReInit = false;
this.bChangeWorksheetUpdate = false;
this.oChangeWorksheetUpdate = {}; this.oChangeWorksheetUpdate = {};
this.bUpdateWorksheetByModel = false; this.bUpdateWorksheetByModel = false;
this.bOnSheetsChanged = false; this.bOnSheetsChanged = false;
this.oOnUpdateTabColor = {};
this.oOnUpdateSheetViewSettings = {};
} }
/** @constructor */ /** @constructor */
......
...@@ -3297,7 +3297,7 @@ ...@@ -3297,7 +3297,7 @@
this.draw(); this.draw();
// Эвент на обновление // Эвент на обновление
if (isUpdate) if (isUpdate && !this.model.workbook.bUndoChanges && !this.model.workbook.bRedoChanges)
this.handlers.trigger("updateSheetViewSettings"); this.handlers.trigger("updateSheetViewSettings");
}; };
......
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