Commit 9cdf87c7 authored by Alexander.Trofimov's avatar Alexander.Trofimov

Немного поменял обновление состояния измененности документа при сохранении...

Немного поменял обновление состояния измененности документа при сохранении (звездочка пропадала раньше, чем мы закончили сохранять).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58526 954022d7-b5bf-4e40-9824-e11837661b57
parent 6eeffb8b
......@@ -587,7 +587,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
t.asc_EndAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.Save);
// Обновляем состояние возможности сохранения документа
t._onUpdateDocumentCanSave();
t.onUpdateDocumentModified(false);
};
this.CoAuthoringApi.unSaveChanges();
if (!isDocumentSaved)
......@@ -3220,6 +3220,14 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
return res;
};
spreadsheet_api.prototype.onUpdateDocumentModified = function (bIsModified) {
// Обновляем только после окончания сохранения
if (this.canSave) {
this.handlers.trigger("asc_onDocumentModifiedChanged", bIsModified);
this._onUpdateDocumentCanSave();
}
};
// offline mode
spreadsheet_api.prototype.offlineModeInit = function() {
......
......@@ -474,8 +474,7 @@
self.handlers.trigger("asc_onCanRedoChanged", bCanRedo);
});
this.model.handlers.add("setDocumentModified", function (bIsModified) {
self.handlers.trigger("asc_onDocumentModifiedChanged", bIsModified);
self.Api._onUpdateDocumentCanSave();
self.Api.onUpdateDocumentModified(bIsModified);
});
this.model.handlers.add("initCommentsToSave", function () {
self._initCommentsToSave();
......
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