Commit af4e93c8 authored by Alexander.Trofimov's avatar Alexander.Trofimov

вместе с unLockDocument теперь приходит параметр (сбрасывать ли lock-и или...

вместе с unLockDocument теперь приходит параметр (сбрасывать ли lock-и или нет, если пользователь сделал изменения, затем нажал undo и массив для отправки пустой)
Баг http://bugzserver/show_bug.cgi?id=25209

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57157 954022d7-b5bf-4e40-9824-e11837661b57
parent 2b3e3f79
...@@ -133,9 +133,9 @@ ...@@ -133,9 +133,9 @@
} }
}; };
CDocsCoApi.prototype.unLockDocument = function () { CDocsCoApi.prototype.unLockDocument = function (isSave) {
if (this._CoAuthoringApi && this._onlineWork) { if (this._CoAuthoringApi && this._onlineWork) {
this._CoAuthoringApi.unLockDocument(); this._CoAuthoringApi.unLockDocument(isSave);
} }
}; };
...@@ -464,8 +464,8 @@ ...@@ -464,8 +464,8 @@
"startIndex": startIndex}); "startIndex": startIndex});
}; };
DocsCoApi.prototype.unLockDocument = function () { DocsCoApi.prototype.unLockDocument = function (isSave) {
this._send({"type": "unLockDocument"}); this._send({'type': 'unLockDocument', 'isSave' : isSave});
}; };
DocsCoApi.prototype.getUsers = function () { DocsCoApi.prototype.getUsers = function () {
......
...@@ -1624,7 +1624,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -1624,7 +1624,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
if (!isStartEvent) { if (!isStartEvent) {
// Когда документ еще не загружен, нужно отпустить lock (при быстром открытии 2-мя пользователями) // Когда документ еще не загружен, нужно отпустить lock (при быстром открытии 2-мя пользователями)
if (!t.IsSendDocumentLoadCompleate) if (!t.IsSendDocumentLoadCompleate)
t.CoAuthoringApi.unLockDocument(); t.CoAuthoringApi.unLockDocument(false);
else { else {
// Принимаем чужие изменения // Принимаем чужие изменения
t.collaborativeEditing.applyChanges(); t.collaborativeEditing.applyChanges();
...@@ -1683,7 +1683,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -1683,7 +1683,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
if (0 < arrChanges.length || null !== deleteIndex) if (0 < arrChanges.length || null !== deleteIndex)
this.CoAuthoringApi.saveChanges(arrChanges, deleteIndex); this.CoAuthoringApi.saveChanges(arrChanges, deleteIndex);
else else
this.CoAuthoringApi.unLockDocument(); this.CoAuthoringApi.unLockDocument(true);
} }
}, },
......
...@@ -495,7 +495,7 @@ asc_docs_api.prototype._coAuthoringInit = function () { ...@@ -495,7 +495,7 @@ asc_docs_api.prototype._coAuthoringInit = function () {
CollaborativeEditing.Send_Changes(); CollaborativeEditing.Send_Changes();
} else { } else {
// Изменений нет, но нужно сбросить lock // Изменений нет, но нужно сбросить lock
t.CoAuthoringApi.unLockDocument(); t.CoAuthoringApi.unLockDocument(false);
} }
} else } else
t.isStartCoAuthoringOnEndLoad = true; t.isStartCoAuthoringOnEndLoad = true;
......
...@@ -1601,14 +1601,14 @@ asc_docs_api.prototype._coAuthoringInit = function() ...@@ -1601,14 +1601,14 @@ asc_docs_api.prototype._coAuthoringInit = function()
CollaborativeEditing.Send_Changes(); CollaborativeEditing.Send_Changes();
} else { } else {
// Изменений нет, но нужно сбросить lock // Изменений нет, но нужно сбросить lock
t.CoAuthoringApi.unLockDocument(); t.CoAuthoringApi.unLockDocument(true);
} }
} }
} else { } else {
t.isStartCoAuthoringOnEndLoad = true; t.isStartCoAuthoringOnEndLoad = true;
if (!isStartEvent) { if (!isStartEvent) {
// Документ еще не подгрузился, но нужно сбросить lock // Документ еще не подгрузился, но нужно сбросить lock
t.CoAuthoringApi.unLockDocument(); t.CoAuthoringApi.unLockDocument(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