Commit d6cc3d11 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Bug 31377 - [Fast Co-Edit] Не отключается Autosave

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@67525 954022d7-b5bf-4e40-9824-e11837661b57
parent 2fb9a2ca
......@@ -564,7 +564,7 @@ CPresentation.prototype =
},
Continue_FastCollaborativeEditing: function()
{
if (true !== CollaborativeEditing.Is_Fast())
if (true !== CollaborativeEditing.Is_Fast() || true === this.CollaborativeEditing.Is_SingleUser())
return;
if(this.Slides[this.CurPage]){
......
......@@ -412,13 +412,19 @@ asc_docs_api.prototype.Clear_CollaborativeMarks = function()
};
asc_docs_api.prototype._onUpdateDocumentCanSave = function () {
// Можно модифицировать это условие на более быстрое (менять самим состояние в аргументах, а не запрашивать каждый раз)
var tmp = this.isDocumentModified() || (0 >= CollaborativeEditing.m_nUseType &&
0 !== CollaborativeEditing.getOwnLocksLength());
if (tmp !== this.isDocumentCanSave) {
this.isDocumentCanSave = tmp;
this.asc_fireCallback('asc_onDocumentCanSaveChanged', this.isDocumentCanSave);
}
var CollEditing = CollaborativeEditing;
// Можно модифицировать это условие на более быстрое (менять самим состояние в аргументах, а не запрашивать каждый раз)
var isCanSave = this.isDocumentModified() || (true !== CollEditing.Is_SingleUser() && 0 !== CollEditing.getOwnLocksLength());
if (true === CollEditing.Is_Fast() && true !== CollEditing.Is_SingleUser())
isCanSave = false;
if (isCanSave !== this.isDocumentCanSave)
{
this.isDocumentCanSave = isCanSave;
this.asc_fireCallback('asc_onDocumentCanSaveChanged', this.isDocumentCanSave);
}
};
///////////////////////////////////////////
......@@ -1232,10 +1238,16 @@ asc_docs_api.prototype.sync_GetDocInfoEndCallback = function(){
};
asc_docs_api.prototype.sync_CanUndoCallback = function(bCanUndo)
{
if (true === CollaborativeEditing.Is_Fast() && true !== CollaborativeEditing.Is_SingleUser())
bCanUndo = false;
this.asc_fireCallback("asc_onCanUndo", bCanUndo);
};
asc_docs_api.prototype.sync_CanRedoCallback = function(bCanRedo)
{
if (true === CollaborativeEditing.Is_Fast() && true !== CollaborativeEditing.Is_SingleUser())
bCanRedo = false;
this.asc_fireCallback("asc_onCanRedo", bCanRedo);
};
......
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