Commit 44c2307b authored by Alexander.Trofimov's avatar Alexander.Trofimov

asc_DecrementCounterLongAction -> decrementCounterLongAction

decrementCounterLongAction to baseEditorsApi

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66493 954022d7-b5bf-4e40-9824-e11837661b57
parent d014e85e
...@@ -178,6 +178,21 @@ baseEditorsApi.prototype.isLongAction = function() { ...@@ -178,6 +178,21 @@ baseEditorsApi.prototype.isLongAction = function() {
baseEditorsApi.prototype.incrementCounterLongAction = function() { baseEditorsApi.prototype.incrementCounterLongAction = function() {
++this.IsLongActionCurrent; ++this.IsLongActionCurrent;
}; };
baseEditorsApi.prototype.decrementCounterLongAction = function() {
this.IsLongActionCurrent--;
if (this.IsLongActionCurrent < 0) {
this.IsLongActionCurrent = 0;
}
if (!this.isLongAction()) {
var _length = this.LongActionCallbacks.length;
for (var i = 0; i < _length; i++) {
this.LongActionCallbacks[i](this.LongActionCallbacksParams[i]);
}
this.LongActionCallbacks.splice(0, _length);
this.LongActionCallbacksParams.splice(0, _length);
}
};
// Open // Open
baseEditorsApi.prototype._onOpenCommand = function(data) { baseEditorsApi.prototype._onOpenCommand = function(data) {
}; };
......
...@@ -1339,25 +1339,7 @@ asc_docs_api.prototype.sync_EndAction = function(type, id){ ...@@ -1339,25 +1339,7 @@ asc_docs_api.prototype.sync_EndAction = function(type, id){
if (c_oAscAsyncActionType.BlockInteraction == type) if (c_oAscAsyncActionType.BlockInteraction == type)
{ {
this.asc_DecrementCounterLongAction(); this.decrementCounterLongAction();
}
};
asc_docs_api.prototype.asc_DecrementCounterLongAction = function()
{
this.IsLongActionCurrent--;
if (this.IsLongActionCurrent < 0)
this.IsLongActionCurrent = 0;
if (!this.isLongAction())
{
var _length = this.LongActionCallbacks.length;
for (var i = 0; i < _length; i++)
{
this.LongActionCallbacks[i](this.LongActionCallbacksParams[i]);
}
this.LongActionCallbacks.splice(0, _length);
this.LongActionCallbacksParams.splice(0, _length);
} }
}; };
...@@ -1972,7 +1954,7 @@ asc_docs_api.prototype.setStartPointHistory = function(){ ...@@ -1972,7 +1954,7 @@ asc_docs_api.prototype.setStartPointHistory = function(){
asc_docs_api.prototype.setEndPointHistory = function(){ asc_docs_api.prototype.setEndPointHistory = function(){
this.noCreatePoint = false; this.noCreatePoint = false;
this.exucuteHistoryEnd = true; this.exucuteHistoryEnd = true;
this.asc_DecrementCounterLongAction(); this.decrementCounterLongAction();
}; };
asc_docs_api.prototype.SetSlideProps = function(prop) asc_docs_api.prototype.SetSlideProps = function(prop)
{ {
...@@ -3543,7 +3525,7 @@ asc_docs_api.prototype.asyncImagesDocumentEndLoaded = function() ...@@ -3543,7 +3525,7 @@ asc_docs_api.prototype.asyncImagesDocumentEndLoaded = function()
{ {
this.isPasteFonts_Images = false; this.isPasteFonts_Images = false;
this.pasteImageMap = null; this.pasteImageMap = null;
this.asc_DecrementCounterLongAction(); this.decrementCounterLongAction();
this.pasteCallback(); this.pasteCallback();
window.GlobalPasteFlag = false; window.GlobalPasteFlag = false;
window.GlobalPasteFlagCounter = 0; window.GlobalPasteFlagCounter = 0;
...@@ -3784,7 +3766,7 @@ asc_docs_api.prototype.pre_Paste = function(_fonts, _images, callback) ...@@ -3784,7 +3766,7 @@ asc_docs_api.prototype.pre_Paste = function(_fonts, _images, callback)
{ {
// никаких евентов. ничего грузить не нужно. сделано для сафари под макОс. // никаких евентов. ничего грузить не нужно. сделано для сафари под макОс.
// там при LongActions теряется фокус и вставляются пробелы // там при LongActions теряется фокус и вставляются пробелы
this.asc_DecrementCounterLongAction(); this.decrementCounterLongAction();
this.pasteCallback(); this.pasteCallback();
window.GlobalPasteFlag = false; window.GlobalPasteFlag = false;
window.GlobalPasteFlagCounter = 0; window.GlobalPasteFlagCounter = 0;
...@@ -4737,7 +4719,7 @@ asc_docs_api.prototype.asc_stopSaving = function () { ...@@ -4737,7 +4719,7 @@ asc_docs_api.prototype.asc_stopSaving = function () {
this.incrementCounterLongAction(); this.incrementCounterLongAction();
}; };
asc_docs_api.prototype.asc_continueSaving = function () { asc_docs_api.prototype.asc_continueSaving = function () {
this.asc_DecrementCounterLongAction(); this.decrementCounterLongAction();
}; };
//----------------------------------------------------------------- //-----------------------------------------------------------------
......
...@@ -92,7 +92,6 @@ asc_docs_api.prototype['sync_SaveCallBack'] = asc_docs_api.prototype.sync_SaveCa ...@@ -92,7 +92,6 @@ asc_docs_api.prototype['sync_SaveCallBack'] = asc_docs_api.prototype.sync_SaveCa
asc_docs_api.prototype['sync_DownloadAsCallBack'] = asc_docs_api.prototype.sync_DownloadAsCallBack; asc_docs_api.prototype['sync_DownloadAsCallBack'] = asc_docs_api.prototype.sync_DownloadAsCallBack;
asc_docs_api.prototype['sync_StartAction'] = asc_docs_api.prototype.sync_StartAction; asc_docs_api.prototype['sync_StartAction'] = asc_docs_api.prototype.sync_StartAction;
asc_docs_api.prototype['sync_EndAction'] = asc_docs_api.prototype.sync_EndAction; asc_docs_api.prototype['sync_EndAction'] = asc_docs_api.prototype.sync_EndAction;
asc_docs_api.prototype['asc_DecrementCounterLongAction'] = asc_docs_api.prototype.asc_DecrementCounterLongAction;
asc_docs_api.prototype['asc_CheckLongActionCallback'] = asc_docs_api.prototype.asc_CheckLongActionCallback; asc_docs_api.prototype['asc_CheckLongActionCallback'] = asc_docs_api.prototype.asc_CheckLongActionCallback;
asc_docs_api.prototype['sync_AddURLCallback'] = asc_docs_api.prototype.sync_AddURLCallback; asc_docs_api.prototype['sync_AddURLCallback'] = asc_docs_api.prototype.sync_AddURLCallback;
asc_docs_api.prototype['sync_ErrorCallback'] = asc_docs_api.prototype.sync_ErrorCallback; asc_docs_api.prototype['sync_ErrorCallback'] = asc_docs_api.prototype.sync_ErrorCallback;
......
...@@ -2086,7 +2086,7 @@ asc_docs_api.prototype.setStartPointHistory = function(){ ...@@ -2086,7 +2086,7 @@ asc_docs_api.prototype.setStartPointHistory = function(){
asc_docs_api.prototype.setEndPointHistory = function(){ asc_docs_api.prototype.setEndPointHistory = function(){
this.noCreatePoint = false; this.noCreatePoint = false;
this.exucuteHistoryEnd = true; this.exucuteHistoryEnd = true;
this.asc_DecrementCounterLongAction(); this.decrementCounterLongAction();
this.WordControl.m_oLogicDocument.TurnOn_InterfaceEvents(); this.WordControl.m_oLogicDocument.TurnOn_InterfaceEvents();
}; };
...@@ -2164,25 +2164,7 @@ asc_docs_api.prototype.sync_EndAction = function(type, id){ ...@@ -2164,25 +2164,7 @@ asc_docs_api.prototype.sync_EndAction = function(type, id){
if (c_oAscAsyncActionType.BlockInteraction == type) if (c_oAscAsyncActionType.BlockInteraction == type)
{ {
this.asc_DecrementCounterLongAction(); this.decrementCounterLongAction();
}
};
asc_docs_api.prototype.asc_DecrementCounterLongAction = function()
{
this.IsLongActionCurrent--;
if (this.IsLongActionCurrent < 0)
this.IsLongActionCurrent = 0;
if (!this.isLongAction())
{
var _length = this.LongActionCallbacks.length;
for (var i = 0; i < _length; i++)
{
this.LongActionCallbacks[i](this.LongActionCallbacksParams[i]);
}
this.LongActionCallbacks.splice(0, _length);
this.LongActionCallbacksParams.splice(0, _length);
} }
}; };
...@@ -5619,7 +5601,7 @@ asc_docs_api.prototype.asyncImagesDocumentEndLoaded = function() ...@@ -5619,7 +5601,7 @@ asc_docs_api.prototype.asyncImagesDocumentEndLoaded = function()
{ {
this.isPasteFonts_Images = false; this.isPasteFonts_Images = false;
this.pasteImageMap = null; this.pasteImageMap = null;
this.asc_DecrementCounterLongAction(); this.decrementCounterLongAction();
this.pasteCallback(); this.pasteCallback();
window.GlobalPasteFlag = false; window.GlobalPasteFlag = false;
window.GlobalPasteFlagCounter = 0; window.GlobalPasteFlagCounter = 0;
...@@ -5844,7 +5826,7 @@ asc_docs_api.prototype.pre_Paste = function(_fonts, _images, callback) ...@@ -5844,7 +5826,7 @@ asc_docs_api.prototype.pre_Paste = function(_fonts, _images, callback)
{ {
// никаких евентов. ничего грузить не нужно. сделано для сафари под макОс. // никаких евентов. ничего грузить не нужно. сделано для сафари под макОс.
// там при LongActions теряется фокус и вставляются пробелы // там при LongActions теряется фокус и вставляются пробелы
this.asc_DecrementCounterLongAction(); this.decrementCounterLongAction();
this.pasteCallback(); this.pasteCallback();
window.GlobalPasteFlag = false; window.GlobalPasteFlag = false;
window.GlobalPasteFlagCounter = 0; window.GlobalPasteFlagCounter = 0;
...@@ -6754,7 +6736,7 @@ asc_docs_api.prototype.asc_stopSaving = function () { ...@@ -6754,7 +6736,7 @@ asc_docs_api.prototype.asc_stopSaving = function () {
this.incrementCounterLongAction(); this.incrementCounterLongAction();
}; };
asc_docs_api.prototype.asc_continueSaving = function () { asc_docs_api.prototype.asc_continueSaving = function () {
this.asc_DecrementCounterLongAction(); this.decrementCounterLongAction();
}; };
asc_docs_api.prototype.asc_undoAllChanges = function () asc_docs_api.prototype.asc_undoAllChanges = function ()
......
...@@ -188,7 +188,6 @@ asc_docs_api.prototype['sync_SaveCallBack'] = asc_docs_api.prototype.sync_SaveCa ...@@ -188,7 +188,6 @@ asc_docs_api.prototype['sync_SaveCallBack'] = asc_docs_api.prototype.sync_SaveCa
asc_docs_api.prototype['sync_DownloadAsCallBack'] = asc_docs_api.prototype.sync_DownloadAsCallBack; asc_docs_api.prototype['sync_DownloadAsCallBack'] = asc_docs_api.prototype.sync_DownloadAsCallBack;
asc_docs_api.prototype['sync_StartAction'] = asc_docs_api.prototype.sync_StartAction; asc_docs_api.prototype['sync_StartAction'] = asc_docs_api.prototype.sync_StartAction;
asc_docs_api.prototype['sync_EndAction'] = asc_docs_api.prototype.sync_EndAction; asc_docs_api.prototype['sync_EndAction'] = asc_docs_api.prototype.sync_EndAction;
asc_docs_api.prototype['asc_DecrementCounterLongAction'] = asc_docs_api.prototype.asc_DecrementCounterLongAction;
asc_docs_api.prototype['asc_CheckLongActionCallback'] = asc_docs_api.prototype.asc_CheckLongActionCallback; asc_docs_api.prototype['asc_CheckLongActionCallback'] = asc_docs_api.prototype.asc_CheckLongActionCallback;
asc_docs_api.prototype['sync_AddURLCallback'] = asc_docs_api.prototype.sync_AddURLCallback; asc_docs_api.prototype['sync_AddURLCallback'] = asc_docs_api.prototype.sync_AddURLCallback;
asc_docs_api.prototype['sync_ErrorCallback'] = asc_docs_api.prototype.sync_ErrorCallback; asc_docs_api.prototype['sync_ErrorCallback'] = asc_docs_api.prototype.sync_ErrorCallback;
......
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