Commit 34757a53 authored by Oleg.Korshul's avatar Oleg.Korshul

баги с UserSavedIndex

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@67446 954022d7-b5bf-4e40-9824-e11837661b57
parent 236da6f9
......@@ -163,7 +163,7 @@ window["CDocsCoApi"].prototype.askSaveChanges = function(callback)
window["CDocsCoApi"].prototype.saveChanges = function(arrayChanges, deleteIndex, excelAdditionalInfo)
{
window["AscDesktopEditor"]["LocalFileSaveChanges"](arrayChanges.join("\",\""), deleteIndex, arrayChanges.length);
this.onUnSaveLock();
//this.onUnSaveLock();
};
window["NativeCorrectImageUrlOnCopy"] = function(url)
......
......@@ -39,6 +39,8 @@
}
DesktopOfflineUpdateLocalName(this);
this.onUpdateDocumentModified(History.Is_Modified());
};
asc['spreadsheet_api'].prototype._onNeedParams = function(data)
......@@ -116,9 +118,9 @@ CHistory.prototype.Reset_SavedIndex = function(IsUserSave)
}
};
CHistory.prototype.Is_Modified = function(IsUserSave, IsNoSavedNoModifyed)
CHistory.prototype.Is_Modified = function(IsNotUserSave, IsNoSavedNoModifyed)
{
var checkIndex = (this.Is_UserSaveMode() && IsUserSave) ? this.UserSavedIndex : this.SavedIndex;
var checkIndex = (this.Is_UserSaveMode() && !IsNotUserSave) ? this.UserSavedIndex : this.SavedIndex;
if (-1 === this.Index && null === checkIndex && false === this.ForceSave)
{
if (window["AscDesktopEditor"])
......@@ -209,9 +211,8 @@ window["DesktopOfflineAppDocumentEndSave"] = function(isCancel)
DesktopOfflineUpdateLocalName(window["Asc"]["editor"]);
else
{
History.UserSavedIndex = window["Asc"]["editor"].LastUserSavedIndex;
window["Asc"]["editor"].onUpdateDocumentModified(History.Is_Modified(true));
History.UserSavedIndex = window["Asc"]["editor"].LastUserSavedIndex;
window["Asc"]["editor"].onUpdateDocumentModified(History.Is_Modified());
}
window["Asc"]["editor"].LastUserSavedIndex = undefined;
......
......@@ -61,9 +61,9 @@ CHistory.prototype.Reset_SavedIndex = function(IsUserSave)
this.ForceSave = false;
}
};
CHistory.prototype.Have_Changes = function(IsUserSave, IsNoSavedNoModifyed)
CHistory.prototype.Have_Changes = function(IsNotUserSave, IsNoSavedNoModifyed)
{
if (true === this.Is_UserSaveMode() && false !== IsUserSave)
if (true === this.Is_UserSaveMode() && true !== IsNotUserSave)
{
if (-1 === this.Index && null === this.UserSavedIndex && false === this.ForceSave)
{
......
......@@ -77,9 +77,9 @@ CHistory.prototype.Reset_SavedIndex = function(IsUserSave)
this.ForceSave = false;
}
};
CHistory.prototype.Have_Changes = function(IsUserSave, IsNoSavedNoModifyed)
CHistory.prototype.Have_Changes = function(IsNotUserSave, IsNoSavedNoModifyed)
{
if (true === this.Is_UserSaveMode() && false !== IsUserSave)
if (true === this.Is_UserSaveMode() && true !== IsNotUserSave)
{
if (-1 === this.Index && null === this.UserSavedIndex && false === this.ForceSave)
{
......
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