Commit 96b4ffb1 authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug with collaboration editing.

parent 63f09865
...@@ -146,9 +146,9 @@ window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data) ...@@ -146,9 +146,9 @@ window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data)
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
AscCommon.CHistory.prototype.Reset_SavedIndex = function(IsUserSave) AscCommon.CHistory.prototype.Reset_SavedIndex = function(IsUserSave)
{ {
this.SavedIndex = (null === this.SavedIndex && -1 === this.Index ? null : this.Index);
if (true === this.Is_UserSaveMode()) if (true === this.Is_UserSaveMode())
{ {
this.SavedIndex = this.Index;
if (true === IsUserSave) if (true === IsUserSave)
{ {
this.UserSavedIndex = this.Index; this.UserSavedIndex = this.Index;
...@@ -157,7 +157,6 @@ AscCommon.CHistory.prototype.Reset_SavedIndex = function(IsUserSave) ...@@ -157,7 +157,6 @@ AscCommon.CHistory.prototype.Reset_SavedIndex = function(IsUserSave)
} }
else else
{ {
this.SavedIndex = this.Index;
this.ForceSave = false; this.ForceSave = false;
} }
}; };
......
...@@ -879,7 +879,7 @@ CHistory.prototype.Is_On = function() ...@@ -879,7 +879,7 @@ CHistory.prototype.Is_On = function()
return (0 === this.TurnOffHistory); return (0 === this.TurnOffHistory);
}; };
CHistory.prototype.Reset_SavedIndex = function(IsUserSave) { CHistory.prototype.Reset_SavedIndex = function(IsUserSave) {
this.SavedIndex = this.Index; this.SavedIndex = (null === this.SavedIndex && -1 === this.Index ? null : this.Index);
if (this.Is_UserSaveMode()) { if (this.Is_UserSaveMode()) {
if (IsUserSave) { if (IsUserSave) {
this.UserSavedIndex = this.Index; this.UserSavedIndex = this.Index;
......
...@@ -81,9 +81,9 @@ window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data) ...@@ -81,9 +81,9 @@ window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data)
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
AscCommon.CHistory.prototype.Reset_SavedIndex = function(IsUserSave) AscCommon.CHistory.prototype.Reset_SavedIndex = function(IsUserSave)
{ {
this.SavedIndex = (null === this.SavedIndex && -1 === this.Index ? null : this.Index);
if (true === this.Is_UserSaveMode()) if (true === this.Is_UserSaveMode())
{ {
this.SavedIndex = this.Index;
if (true === IsUserSave) if (true === IsUserSave)
{ {
this.UserSavedIndex = this.Index; this.UserSavedIndex = this.Index;
...@@ -92,7 +92,6 @@ AscCommon.CHistory.prototype.Reset_SavedIndex = function(IsUserSave) ...@@ -92,7 +92,6 @@ AscCommon.CHistory.prototype.Reset_SavedIndex = function(IsUserSave)
} }
else else
{ {
this.SavedIndex = this.Index;
this.ForceSave = false; this.ForceSave = false;
} }
}; };
......
...@@ -834,18 +834,22 @@ CHistory.prototype = ...@@ -834,18 +834,22 @@ CHistory.prototype =
return (0 === this.TurnOffHistory); return (0 === this.TurnOffHistory);
}, },
Reset_SavedIndex : function(IsUserSave) Reset_SavedIndex : function(IsUserSave)
{ {
this.SavedIndex = this.Index; this.SavedIndex = (null === this.SavedIndex && -1 === this.Index ? null : this.Index);
if (true === this.Is_UserSaveMode()) { if (true === this.Is_UserSaveMode())
if (true === IsUserSave) { {
this.UserSavedIndex = this.Index; if (true === IsUserSave)
this.ForceSave = false; {
} this.UserSavedIndex = this.Index;
} else { this.ForceSave = false;
this.ForceSave = false; }
} }
}, else
{
this.ForceSave = false;
}
},
Set_SavedIndex : function(Index) Set_SavedIndex : function(Index)
{ {
......
...@@ -101,9 +101,9 @@ Asc['asc_docs_api'].prototype["asc_setAdvancedOptions"] = Asc['asc_docs_api'].pr ...@@ -101,9 +101,9 @@ Asc['asc_docs_api'].prototype["asc_setAdvancedOptions"] = Asc['asc_docs_api'].pr
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
AscCommon.CHistory.prototype.Reset_SavedIndex = function(IsUserSave) AscCommon.CHistory.prototype.Reset_SavedIndex = function(IsUserSave)
{ {
this.SavedIndex = (null === this.SavedIndex && -1 === this.Index ? null : this.Index);
if (true === this.Is_UserSaveMode()) if (true === this.Is_UserSaveMode())
{ {
this.SavedIndex = this.Index;
if (true === IsUserSave) if (true === IsUserSave)
{ {
this.UserSavedIndex = this.Index; this.UserSavedIndex = this.Index;
...@@ -112,7 +112,6 @@ AscCommon.CHistory.prototype.Reset_SavedIndex = function(IsUserSave) ...@@ -112,7 +112,6 @@ AscCommon.CHistory.prototype.Reset_SavedIndex = function(IsUserSave)
} }
else else
{ {
this.SavedIndex = this.Index;
this.ForceSave = false; this.ForceSave = false;
} }
}; };
......
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