Commit 8933a61b authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

sync_EndAction to baseEditorsApi

Excel asc_EndAction -> sync_EndAction

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66416 954022d7-b5bf-4e40-9824-e11837661b57
parent 0ce95f91
......@@ -128,6 +128,8 @@ baseEditorsApi.prototype.sync_InitEditorFonts = function(gui_fonts) {
};
baseEditorsApi.prototype.sync_StartAction = function() {
};
baseEditorsApi.prototype.sync_EndAction = function() {
};
// Выставление интервала автосохранения (0 - означает, что автосохранения нет)
baseEditorsApi.prototype.asc_setAutoSaveGap = function(autoSaveGap) {
if (typeof autoSaveGap === "number") {
......
......@@ -2495,10 +2495,7 @@ function sendImgUrls(api, images, callback, bExcel) {
api.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage);
api.fCurCallback = function (input) {
if(!bExcel)
api.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage);
else
api.asc_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage);
api.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage);
var nError = c_oAscError.ID.No;
var data;
if (null != input && "imgurls" == input["type"]) {
......
......@@ -804,7 +804,7 @@ var editor;
} else if (c_oAscFileType.CSV === sFormat && !options.CSVOptions) {
// Мы открывали команду, надо ее закрыть.
if (actionType) {
this.asc_EndAction(c_oAscAsyncActionType.BlockInteraction, actionType);
this.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, actionType);
}
var cp = {'delimiter': c_oAscCsvDelimiter.Comma, 'codepage': c_oAscCodePageUtf8, 'encodings': getEncodingParams()};
this.handlers.trigger("asc_onAdvancedOptions", new asc.asc_CAdvancedOptions(c_oAscAdvancedOptionsID.CSV, cp), this.advancedOptionsAction);
......@@ -839,7 +839,7 @@ var editor;
// Меняем тип состояния (на никакое)
t.advancedOptionsAction = c_oAscAdvancedOptionsAction.None;
if (actionType) {
t.asc_EndAction(c_oAscAsyncActionType.BlockInteraction, actionType);
t.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, actionType);
}
};
t.fCurCallback = fCallback;
......@@ -915,7 +915,7 @@ var editor;
//console.log("asc_onStartAction: type = " + type + " id = " + id);
};
spreadsheet_api.prototype.asc_EndAction = function(type, id) {
spreadsheet_api.prototype.sync_EndAction = function(type, id) {
this.handlers.trigger("asc_onEndAction", type, id);
//console.log("asc_onEndAction: type = " + type + " id = " + id);
};
......@@ -985,7 +985,7 @@ var editor;
};
spreadsheet_api.prototype.asyncFontsDocumentEndLoaded = function() {
this.asc_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadDocumentFonts);
this.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadDocumentFonts);
if (this.asyncMethodCallback !== undefined) {
this.asyncMethodCallback();
......@@ -1005,7 +1005,7 @@ var editor;
};
spreadsheet_api.prototype.asyncFontEndLoaded = function(font) {
this.asc_EndAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.LoadFont);
this.sync_EndAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.LoadFont);
};
/**
......@@ -1077,7 +1077,7 @@ var editor;
if (this.collaborativeEditing.applyChanges()) {
// Изменений не было
this.IsSendDocumentLoadCompleate = true;
this.asc_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Open);
this.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Open);
}
};
......@@ -1479,7 +1479,7 @@ var editor;
// При открытии после принятия изменений мы должны сбросить пересчетные индексы
this.collaborativeEditing.clearRecalcIndex();
this.IsSendDocumentLoadCompleate = true;
this.asc_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Open);
this.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Open);
} else if (this.wb && !window["NATIVE_EDITOR_ENJINE"]) {
// Нужно послать 'обновить свойства' (иначе для удаления данных не обновится строка формул).
// ToDo Возможно стоит обновлять только строку формул
......@@ -1676,7 +1676,7 @@ var editor;
t.IsUserSave = false;
t.lastSaveTime = null;
t.asc_EndAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.Save);
t.sync_EndAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.Save);
// Обновляем состояние возможности сохранения документа
t.onUpdateDocumentModified(false);
......@@ -1693,7 +1693,7 @@ var editor;
if (ConnectionState.Close === nState) {
// Отключаемся от сохранения, соединение потеряно
if (this.IsUserSave) {
this.asc_EndAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.Save);
this.sync_EndAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.Save);
}
this.IsUserSave = false;
this.canSave = true;
......@@ -2327,7 +2327,7 @@ var editor;
} else {
t.handlers.trigger("asc_onError", c_oAscError.ID.Unknown, c_oAscError.Level.NoCritical);
}
t.handlers.trigger("asc_onEndAction", c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
t.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
};
sendCommand2(this, null, rData);
};
......@@ -2355,7 +2355,7 @@ var editor;
} else {
t._addImageUrl(url);
}
t.handlers.trigger("asc_onEndAction", c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
t.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
});
}
};
......@@ -2604,7 +2604,7 @@ var editor;
} else {
t.handlers.trigger("asc_onError", c_oAscError.ID.Unknown, c_oAscError.Level.NoCritical);
}
t.handlers.trigger("asc_onEndAction", c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
t.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
};
sendCommand2(this, null, rData);
}
......
......@@ -423,7 +423,7 @@
"selectionNameChanged" : function () {self._onSelectionNameChanged.apply(self, arguments);},
"selectionMathInfoChanged" : function () {self._onSelectionMathInfoChanged.apply(self, arguments);},
"onErrorEvent" : function (errorId, level) {self.handlers.trigger("asc_onError", errorId, level);},
"slowOperation" : function (isStart) {(isStart ? self.Api.sync_StartAction : self.Api.asc_EndAction).call(self.Api, c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.SlowOperation);},
"slowOperation" : function (isStart) {(isStart ? self.Api.sync_StartAction : self.Api.sync_EndAction).call(self.Api, c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.SlowOperation);},
"setAutoFiltersDialog" : function (arrVal) {self.handlers.trigger("asc_onSetAFDialog", arrVal);},
"selectionRangeChanged" : function (val) {self.handlers.trigger("asc_onSelectionRangeChanged", val);},
"onRenameCellTextEnd" : function (countFind, countReplace) {self.handlers.trigger("asc_onRenameCellTextEnd", countFind, countReplace);},
......@@ -1945,8 +1945,7 @@
History.EndTransaction();
if (options.isReplaceAll) {
// Заканчиваем медленную операцию
this.handlers.trigger("asc_onEndAction", c_oAscAsyncActionType.BlockInteraction,
c_oAscAsyncAction.SlowOperation);
this.Api.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.SlowOperation);
}
};
......
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