Commit c6acde2e authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

LongAction callbacks

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62152 954022d7-b5bf-4e40-9824-e11837661b57
parent 5950f8b9
...@@ -1185,6 +1185,9 @@ function CCollaborativeEditing() ...@@ -1185,6 +1185,9 @@ function CCollaborativeEditing()
{ {
if (true === oThis.m_bGlobalLock) if (true === oThis.m_bGlobalLock)
{ {
if (false == editor.prototype.asc_CheckLongActionCallback(this.OnCallback_AskLock))
return;
// Снимаем глобальный лок // Снимаем глобальный лок
oThis.m_bGlobalLock = false; oThis.m_bGlobalLock = false;
......
...@@ -1667,7 +1667,7 @@ asc_docs_api.prototype.sync_EndAction = function(type, id){ ...@@ -1667,7 +1667,7 @@ asc_docs_api.prototype.sync_EndAction = function(type, id){
{ {
this.IsLongActionCurrent--; this.IsLongActionCurrent--;
if (0 == this.asc_IsLongAction()) if (!this.asc_IsLongAction())
{ {
var _length = this.LongActionCallbacks.length; var _length = this.LongActionCallbacks.length;
for (var i = 0; i < _length; i++) for (var i = 0; i < _length; i++)
...@@ -1692,7 +1692,6 @@ asc_docs_api.prototype.asc_CheckLongActionCallback = function(_callback) ...@@ -1692,7 +1692,6 @@ asc_docs_api.prototype.asc_CheckLongActionCallback = function(_callback)
} }
else else
{ {
_callback();
return true; return true;
} }
}; };
......
...@@ -2611,7 +2611,7 @@ asc_docs_api.prototype.sync_EndAction = function(type, id){ ...@@ -2611,7 +2611,7 @@ asc_docs_api.prototype.sync_EndAction = function(type, id){
{ {
this.IsLongActionCurrent--; this.IsLongActionCurrent--;
if (0 == this.asc_IsLongAction()) if (!this.asc_IsLongAction())
{ {
var _length = this.LongActionCallbacks.length; var _length = this.LongActionCallbacks.length;
for (var i = 0; i < _length; i++) for (var i = 0; i < _length; i++)
...@@ -2636,7 +2636,6 @@ asc_docs_api.prototype.asc_CheckLongActionCallback = function(_callback) ...@@ -2636,7 +2636,6 @@ asc_docs_api.prototype.asc_CheckLongActionCallback = function(_callback)
} }
else else
{ {
_callback();
return true; return true;
} }
}; };
......
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