Commit 7432bc31 authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix bug #31082 (добавил поддержку сообщения для undo на быстром редактировании)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66871 954022d7-b5bf-4e40-9824-e11837661b57
parent ba0f782e
......@@ -154,12 +154,13 @@ CHistory.prototype.Can_Redo = function()
{
return this.Points.length > 0 && this.Index < this.Points.length - 1;
};
/** @returns {boolean} */
CHistory.prototype.Undo = function()
{
// Проверяем можно ли сделать Undo
if ( true != this.Can_Undo() )
return;
// Проверяем можно ли сделать Undo
if (true !== this.Can_Undo()) {
return false;
}
if (this.Index === this.Points.length - 1)
this.LastState = this.workbook.handlers.trigger("getSelectionState");
......@@ -179,6 +180,7 @@ CHistory.prototype.Undo = function()
this._addRedoObjectParam(oRedoObjectParam, Item);
}
this.UndoRedoEnd(Point, oRedoObjectParam, true);
return true;
};
CHistory.prototype.UndoRedoPrepare = function (oRedoObjectParam, bUndo) {
if (this.Is_On()) {
......
......@@ -1747,7 +1747,9 @@
WorkbookView.prototype.undo = function () {
if (!this.controller.isCellEditMode) {
History.Undo();
if (!History.Undo() && this.collaborativeEditing.getFast() && this.collaborativeEditing.getCollaborativeEditing()) {
this.Api.sync_TryUndoInFastCollaborative();
}
} else {
this.cellEditor.undo();
}
......
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