Commit 1dc74a7f authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by 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 e746506f
......@@ -133,9 +133,9 @@
}
};
CDocsCoApi.prototype.unLockDocument = function () {
CDocsCoApi.prototype.unLockDocument = function (isSave) {
if (this._CoAuthoringApi && this._onlineWork) {
this._CoAuthoringApi.unLockDocument();
this._CoAuthoringApi.unLockDocument(isSave);
}
};
......@@ -464,8 +464,8 @@
"startIndex": startIndex});
};
DocsCoApi.prototype.unLockDocument = function () {
this._send({"type": "unLockDocument"});
DocsCoApi.prototype.unLockDocument = function (isSave) {
this._send({'type': 'unLockDocument', 'isSave' : isSave});
};
DocsCoApi.prototype.getUsers = function () {
......
......@@ -1624,7 +1624,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
if (!isStartEvent) {
// Когда документ еще не загружен, нужно отпустить lock (при быстром открытии 2-мя пользователями)
if (!t.IsSendDocumentLoadCompleate)
t.CoAuthoringApi.unLockDocument();
t.CoAuthoringApi.unLockDocument(false);
else {
// Принимаем чужие изменения
t.collaborativeEditing.applyChanges();
......@@ -1683,7 +1683,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
if (0 < arrChanges.length || null !== deleteIndex)
this.CoAuthoringApi.saveChanges(arrChanges, deleteIndex);
else
this.CoAuthoringApi.unLockDocument();
this.CoAuthoringApi.unLockDocument(true);
}
},
......
......@@ -495,7 +495,7 @@ asc_docs_api.prototype._coAuthoringInit = function () {
CollaborativeEditing.Send_Changes();
} else {
// Изменений нет, но нужно сбросить lock
t.CoAuthoringApi.unLockDocument();
t.CoAuthoringApi.unLockDocument(false);
}
} else
t.isStartCoAuthoringOnEndLoad = true;
......
......@@ -1601,14 +1601,14 @@ asc_docs_api.prototype._coAuthoringInit = function()
CollaborativeEditing.Send_Changes();
} else {
// Изменений нет, но нужно сбросить lock
t.CoAuthoringApi.unLockDocument();
t.CoAuthoringApi.unLockDocument(true);
}
}
} else {
t.isStartCoAuthoringOnEndLoad = true;
if (!isStartEvent) {
// Документ еще не подгрузился, но нужно сбросить 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