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

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62157 954022d7-b5bf-4e40-9824-e11837661b57
parent 85c199a6
...@@ -156,6 +156,7 @@ function asc_docs_api(name) ...@@ -156,6 +156,7 @@ function asc_docs_api(name)
this.IsLongActionCurrent = 0; this.IsLongActionCurrent = 0;
this.LongActionCallbacks = []; this.LongActionCallbacks = [];
this.LongActionCallbacksParams = [];
this.TrackFile = null; this.TrackFile = null;
...@@ -1660,7 +1661,6 @@ asc_docs_api.prototype.sync_StartAction = function(type, id){ ...@@ -1660,7 +1661,6 @@ asc_docs_api.prototype.sync_StartAction = function(type, id){
this.IsLongActionCurrent++; this.IsLongActionCurrent++;
}; };
asc_docs_api.prototype.sync_EndAction = function(type, id){ asc_docs_api.prototype.sync_EndAction = function(type, id){
//this.AsyncAction
this.asc_fireCallback("asc_onEndAction", type, id); this.asc_fireCallback("asc_onEndAction", type, id);
if (c_oAscAsyncActionType.BlockInteraction == type) if (c_oAscAsyncActionType.BlockInteraction == type)
...@@ -1672,9 +1672,10 @@ asc_docs_api.prototype.sync_EndAction = function(type, id){ ...@@ -1672,9 +1672,10 @@ asc_docs_api.prototype.sync_EndAction = function(type, id){
var _length = this.LongActionCallbacks.length; var _length = this.LongActionCallbacks.length;
for (var i = 0; i < _length; i++) for (var i = 0; i < _length; i++)
{ {
this.LongActionCallbacks[i](); this.LongActionCallbacks[i](this.LongActionCallbacksParams[i]);
} }
this.LongActionCallbacks.splice(0, _length); this.LongActionCallbacks.splice(0, _length);
this.LongActionCallbacksParams.splice(0, _length);
} }
} }
}; };
...@@ -1683,11 +1684,12 @@ asc_docs_api.prototype.asc_IsLongAction = function() ...@@ -1683,11 +1684,12 @@ asc_docs_api.prototype.asc_IsLongAction = function()
{ {
return (0 == this.IsLongActionCurrent) ? false : true; return (0 == this.IsLongActionCurrent) ? false : true;
}; };
asc_docs_api.prototype.asc_CheckLongActionCallback = function(_callback) asc_docs_api.prototype.asc_CheckLongActionCallback = function(_callback, _param)
{ {
if (this.asc_IsLongAction()) if (this.asc_IsLongAction())
{ {
this.LongActionCallbacks[this.LongActionCallbacks.length] = _callback; this.LongActionCallbacks[this.LongActionCallbacks.length] = _callback;
this.LongActionCallbacksParams[this.LongActionCallbacksParams.length] = _param;
return false; return false;
} }
else else
......
...@@ -440,6 +440,7 @@ function asc_docs_api(name) ...@@ -440,6 +440,7 @@ function asc_docs_api(name)
this.IsLongActionCurrent = 0; this.IsLongActionCurrent = 0;
this.LongActionCallbacks = []; this.LongActionCallbacks = [];
this.LongActionCallbacksParams = [];
this.ParcedDocument = false; this.ParcedDocument = false;
this.isStartCoAuthoringOnEndLoad = false; // Подсоединились раньше, чем документ загрузился this.isStartCoAuthoringOnEndLoad = false; // Подсоединились раньше, чем документ загрузился
...@@ -2616,9 +2617,10 @@ asc_docs_api.prototype.sync_EndAction = function(type, id){ ...@@ -2616,9 +2617,10 @@ asc_docs_api.prototype.sync_EndAction = function(type, id){
var _length = this.LongActionCallbacks.length; var _length = this.LongActionCallbacks.length;
for (var i = 0; i < _length; i++) for (var i = 0; i < _length; i++)
{ {
this.LongActionCallbacks[i](); this.LongActionCallbacks[i](this.LongActionCallbacksParams[i]);
} }
this.LongActionCallbacks.splice(0, _length); this.LongActionCallbacks.splice(0, _length);
this.LongActionCallbacksParams.splice(0, _length);
} }
} }
}; };
...@@ -2627,11 +2629,12 @@ asc_docs_api.prototype.asc_IsLongAction = function() ...@@ -2627,11 +2629,12 @@ asc_docs_api.prototype.asc_IsLongAction = function()
{ {
return (0 == this.IsLongActionCurrent) ? false : true; return (0 == this.IsLongActionCurrent) ? false : true;
}; };
asc_docs_api.prototype.asc_CheckLongActionCallback = function(_callback) asc_docs_api.prototype.asc_CheckLongActionCallback = function(_callback, _param)
{ {
if (this.asc_IsLongAction()) if (this.asc_IsLongAction())
{ {
this.LongActionCallbacks[this.LongActionCallbacks.length] = _callback; this.LongActionCallbacks[this.LongActionCallbacks.length] = _callback;
this.LongActionCallbacksParams[this.LongActionCallbacksParams.length] = _param;
return false; return false;
} }
else else
......
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