Commit e643b4e3 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

delete asyncServerIdStartLoaded

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64666 954022d7-b5bf-4e40-9824-e11837661b57
parent 51dd94f0
...@@ -232,7 +232,6 @@ function g_fGetSaveUrl(urls){ ...@@ -232,7 +232,6 @@ function g_fGetSaveUrl(urls){
return null; return null;
} }
function sendCommand2(editor, fCallback, rdata, dataContainer){ function sendCommand2(editor, fCallback, rdata, dataContainer){
var sData;
//json не должен превышать размера g_nMaxJsonLength, иначе при его чтении будет exception //json не должен превышать размера g_nMaxJsonLength, иначе при его чтении будет exception
if(null == rdata["savetype"]) if(null == rdata["savetype"])
{ {
......
...@@ -1032,7 +1032,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -1032,7 +1032,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this._OfflineAppDocumentStartLoad(fCallback); this._OfflineAppDocumentStartLoad(fCallback);
} else { } else {
var v = { var v = {
"c": '', "c": 'open',
"id": this.documentId, "id": this.documentId,
"userid": this.documentUserId, "userid": this.documentUserId,
"format": this.documentFormat, "format": this.documentFormat,
...@@ -1043,7 +1043,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -1043,7 +1043,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
"embeddedfonts": this.isUseEmbeddedCutFonts, "embeddedfonts": this.isUseEmbeddedCutFonts,
"viewmode": this.asc_getViewerMode() "viewmode": this.asc_getViewerMode()
}; };
v["c"] = "open";
sendCommand2(this, null, v); sendCommand2(this, null, v);
} }
} }
...@@ -1364,9 +1363,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -1364,9 +1363,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.wbModel = response.val; this.wbModel = response.val;
// Начинаем соединение для совместного редактирования
this.asyncServerIdStartLoaded();
this.FontLoader.LoadDocumentFonts(this.wbModel.generateFontMap2()); this.FontLoader.LoadDocumentFonts(this.wbModel.generateFontMap2());
// Какая-то непонятная заглушка, чтобы не падало в ipad // Какая-то непонятная заглушка, чтобы не падало в ipad
...@@ -1385,7 +1381,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -1385,7 +1381,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
if (null != response && "getsettings" == response["type"]) { if (null != response && "getsettings" == response["type"]) {
var oSettings = response["data"]; var oSettings = response["data"];
//Set up coauthoring and spellcheker service //Set up spellcheker service
this.SpellCheckUrl = oSettings['g_cAscSpellCheckUrl']; this.SpellCheckUrl = oSettings['g_cAscSpellCheckUrl'];
var oEditorPermissions = new asc_CAscEditorPermissions(oSettings); var oEditorPermissions = new asc_CAscEditorPermissions(oSettings);
...@@ -1416,12 +1412,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -1416,12 +1412,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
} }
}; };
// Стартуем соединение с сервером для совместного редактирования
spreadsheet_api.prototype.asyncServerIdStartLoaded = function() {
//Инициализируем контрол для совместного редактирования
//this._coAuthoringInit();
};
// Соединились с сервером // Соединились с сервером
spreadsheet_api.prototype.asyncServerIdEndLoaded = function() { spreadsheet_api.prototype.asyncServerIdEndLoaded = function() {
// С сервером соединились, возможно стоит подождать загрузку шрифтов // С сервером соединились, возможно стоит подождать загрузку шрифтов
......
...@@ -584,11 +584,6 @@ asc_docs_api.prototype.asc_coAuthoringGetUsers = function () { ...@@ -584,11 +584,6 @@ asc_docs_api.prototype.asc_coAuthoringGetUsers = function () {
this.CoAuthoringApi.getUsers(); this.CoAuthoringApi.getUsers();
}; };
asc_docs_api.prototype.asyncServerIdStartLoaded = function () {
//Инициализируем контрол для совместного редактирования
//this._coAuthoringInit();
};
asc_docs_api.prototype.asyncServerIdEndLoaded = function () { asc_docs_api.prototype.asyncServerIdEndLoaded = function () {
this.ServerIdWaitComplete = true; this.ServerIdWaitComplete = true;
if (true == this.ServerImagesWaitComplete) if (true == this.ServerImagesWaitComplete)
...@@ -755,7 +750,7 @@ asc_docs_api.prototype.asc_getEditorPermissionsCallback = function(response) { ...@@ -755,7 +750,7 @@ asc_docs_api.prototype.asc_getEditorPermissionsCallback = function(response) {
if (null != response && "getsettings" == response["type"]) { if (null != response && "getsettings" == response["type"]) {
var oSettings = response["data"]; var oSettings = response["data"];
//Set up coauthoring and spellcheker service //Set up spellcheker service
this.SpellCheckUrl = oSettings['g_cAscSpellCheckUrl']; this.SpellCheckUrl = oSettings['g_cAscSpellCheckUrl'];
var asc_CAscEditorPermissions = window["Asc"].asc_CAscEditorPermissions; var asc_CAscEditorPermissions = window["Asc"].asc_CAscEditorPermissions;
...@@ -3871,8 +3866,6 @@ asc_docs_api.prototype.asyncImagesDocumentEndLoaded = function() ...@@ -3871,8 +3866,6 @@ asc_docs_api.prototype.asyncImagesDocumentEndLoaded = function()
this.ServerImagesWaitComplete = true; this.ServerImagesWaitComplete = true;
if (true == this.ServerIdWaitComplete) if (true == this.ServerIdWaitComplete)
this.OpenDocumentEndCallback(); this.OpenDocumentEndCallback();
this.asyncServerIdStartLoaded();
} }
}; };
......
...@@ -10,7 +10,6 @@ asc_docs_api.prototype['asc_coAuthoringDisconnect'] = asc_docs_api.prototype.asc ...@@ -10,7 +10,6 @@ asc_docs_api.prototype['asc_coAuthoringDisconnect'] = asc_docs_api.prototype.asc
asc_docs_api.prototype['asc_coAuthoringChatSendMessage'] = asc_docs_api.prototype.asc_coAuthoringChatSendMessage; asc_docs_api.prototype['asc_coAuthoringChatSendMessage'] = asc_docs_api.prototype.asc_coAuthoringChatSendMessage;
asc_docs_api.prototype['asc_coAuthoringChatGetMessages'] = asc_docs_api.prototype.asc_coAuthoringChatGetMessages; asc_docs_api.prototype['asc_coAuthoringChatGetMessages'] = asc_docs_api.prototype.asc_coAuthoringChatGetMessages;
asc_docs_api.prototype['asc_coAuthoringGetUsers'] = asc_docs_api.prototype.asc_coAuthoringGetUsers; asc_docs_api.prototype['asc_coAuthoringGetUsers'] = asc_docs_api.prototype.asc_coAuthoringGetUsers;
asc_docs_api.prototype['asyncServerIdStartLoaded'] = asc_docs_api.prototype.asyncServerIdStartLoaded;
asc_docs_api.prototype['asyncServerIdEndLoaded'] = asc_docs_api.prototype.asyncServerIdEndLoaded; asc_docs_api.prototype['asyncServerIdEndLoaded'] = asc_docs_api.prototype.asyncServerIdEndLoaded;
asc_docs_api.prototype['syncCollaborativeChanges'] = asc_docs_api.prototype.syncCollaborativeChanges; asc_docs_api.prototype['syncCollaborativeChanges'] = asc_docs_api.prototype.syncCollaborativeChanges;
asc_docs_api.prototype['SetCollaborativeMarksShowType'] = asc_docs_api.prototype.SetCollaborativeMarksShowType; asc_docs_api.prototype['SetCollaborativeMarksShowType'] = asc_docs_api.prototype.SetCollaborativeMarksShowType;
......
...@@ -725,32 +725,27 @@ asc_docs_api.prototype.Init = function() ...@@ -725,32 +725,27 @@ asc_docs_api.prototype.Init = function()
}; };
asc_docs_api.prototype.asc_getEditorPermissions = function() { asc_docs_api.prototype.asc_getEditorPermissions = function() {
var t = this; var t = this;
if (undefined != window['qtDocBridge']) { this._coAuthoringInit(function() {
// set permissions if (t.DocInfo && t.DocInfo.get_Id()) {
//var asc_CAscEditorPermissions = window["Asc"].asc_CAscEditorPermissions; var rData = {
//editor.asc_fireCallback("asc_onGetEditorPermissions", new asc_CAscEditorPermissions()); "c": "getsettings",
} else { "id": t.DocInfo.get_Id(),
this._coAuthoringInit(function() { "userid": t.DocInfo.get_UserId(),
if (t.DocInfo && t.DocInfo.get_Id()) { "format": t.DocInfo.get_Format(),
var rData = { "vkey": t.DocInfo.get_VKey(),
"c": "getsettings", "editorid": c_oEditorId.Word
"id": t.DocInfo.get_Id(), };
"userid": t.DocInfo.get_UserId(),
"format": t.DocInfo.get_Format(), t.advancedOptionsAction = c_oAscAdvancedOptionsAction.Perm;
"vkey": t.DocInfo.get_VKey(), sendCommand2(t, null, rData);
"editorid": c_oEditorId.Word } else {
}; var asc_CAscEditorPermissions = window["Asc"].asc_CAscEditorPermissions;
t.asc_fireCallback("asc_onGetEditorPermissions", new asc_CAscEditorPermissions());
t.advancedOptionsAction = c_oAscAdvancedOptionsAction.Perm; // Фиктивно инициализируем
sendCommand2(t, null, rData); t.SpellCheckUrl = window['g_cAscSpellCheckUrl'] ? window['g_cAscSpellCheckUrl'] : '';
} else { t._coSpellCheckInit();
var asc_CAscEditorPermissions = window["Asc"].asc_CAscEditorPermissions; }
t.asc_fireCallback("asc_onGetEditorPermissions", new asc_CAscEditorPermissions()); });
// Фиктивно инициализируем
t.SpellCheckUrl = window['g_cAscSpellCheckUrl'] ? window['g_cAscSpellCheckUrl'] : '';
}
});
}
}; };
asc_docs_api.prototype.asc_getLicense = function () asc_docs_api.prototype.asc_getLicense = function ()
...@@ -774,8 +769,9 @@ asc_docs_api.prototype.asc_getEditorPermissionsCallback = function(response) { ...@@ -774,8 +769,9 @@ asc_docs_api.prototype.asc_getEditorPermissionsCallback = function(response) {
if (null != response && "getsettings" == response["type"]) { if (null != response && "getsettings" == response["type"]) {
var oSettings = response["data"]; var oSettings = response["data"];
//Set up coauthoring and spellcheker service //Set up spellcheker service
this.SpellCheckUrl = oSettings['g_cAscSpellCheckUrl']; this.SpellCheckUrl = oSettings['g_cAscSpellCheckUrl'];
this._coSpellCheckInit();
var asc_CAscEditorPermissions = window["Asc"].asc_CAscEditorPermissions; var asc_CAscEditorPermissions = window["Asc"].asc_CAscEditorPermissions;
var oEditorPermissions = new asc_CAscEditorPermissions(oSettings); var oEditorPermissions = new asc_CAscEditorPermissions(oSettings);
...@@ -877,14 +873,12 @@ asc_docs_api.prototype.LoadDocument = function() ...@@ -877,14 +873,12 @@ asc_docs_api.prototype.LoadDocument = function()
if (this.DocInfo.get_OfflineApp() === true) if (this.DocInfo.get_OfflineApp() === true)
{ {
this.OfflineAppDocumentStartLoad(); this.OfflineAppDocumentStartLoad();
this.asyncServerIdStartLoaded();
return; return;
} }
if(documentId){ if(documentId){
var oOpenOptions = this.DocInfo.get_Options();
var rData = { var rData = {
"c" : '', "c" : 'open',
"id" : documentId, "id" : documentId,
"userid" : documentUserId, "userid" : documentUserId,
"format" : documentFormat, "format" : documentFormat,
...@@ -895,8 +889,6 @@ asc_docs_api.prototype.LoadDocument = function() ...@@ -895,8 +889,6 @@ asc_docs_api.prototype.LoadDocument = function()
"embeddedfonts" : this.isUseEmbeddedCutFonts, "embeddedfonts" : this.isUseEmbeddedCutFonts,
"viewmode" : this.isViewMode "viewmode" : this.isViewMode
}; };
rData['c'] = 'open';
this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Open); this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Open);
sendCommand2( this, null, rData ); sendCommand2( this, null, rData );
} }
...@@ -912,7 +904,6 @@ asc_docs_api.prototype.LoadDocument = function() ...@@ -912,7 +904,6 @@ asc_docs_api.prototype.LoadDocument = function()
} }
this.sync_zoomChangeCallback(this.WordControl.m_nZoomValue, 0); this.sync_zoomChangeCallback(this.WordControl.m_nZoomValue, 0);
this.asyncServerIdStartLoaded();
}; };
asc_docs_api.prototype.SetFontsPath = function(path) asc_docs_api.prototype.SetFontsPath = function(path)
...@@ -1141,8 +1132,6 @@ asc_docs_api.prototype.OpenDocument2 = function(url, gObject) ...@@ -1141,8 +1132,6 @@ asc_docs_api.prototype.OpenDocument2 = function(url, gObject)
this.WordControl.m_oDrawingDocument.CheckFontNeeds(); this.WordControl.m_oDrawingDocument.CheckFontNeeds();
window.global_pptx_content_loader.CheckImagesNeeds(this.WordControl.m_oLogicDocument); window.global_pptx_content_loader.CheckImagesNeeds(this.WordControl.m_oLogicDocument);
//this.asyncServerIdStartLoaded();
//this.FontLoader.LoadEmbeddedFonts(this.DocumentUrl, this.WordControl.m_oLogicDocument.EmbeddedFonts); //this.FontLoader.LoadEmbeddedFonts(this.DocumentUrl, this.WordControl.m_oLogicDocument.EmbeddedFonts);
this.FontLoader.LoadDocumentFonts(this.WordControl.m_oLogicDocument.Fonts, false); this.FontLoader.LoadDocumentFonts(this.WordControl.m_oLogicDocument.Fonts, false);
} }
...@@ -5801,12 +5790,6 @@ asc_docs_api.prototype.asc_enableKeyEvents = function(value){ ...@@ -5801,12 +5790,6 @@ asc_docs_api.prototype.asc_enableKeyEvents = function(value){
} }
}; };
asc_docs_api.prototype.asyncServerIdStartLoaded = function()
{
this._coSpellCheckInit();
//this._coAuthoringInit();
};
asc_docs_api.prototype.asyncServerIdEndLoaded = function() asc_docs_api.prototype.asyncServerIdEndLoaded = function()
{ {
this.ServerIdWaitComplete = true; this.ServerIdWaitComplete = true;
...@@ -6123,8 +6106,6 @@ asc_docs_api.prototype.asyncImagesDocumentEndLoaded = function() ...@@ -6123,8 +6106,6 @@ asc_docs_api.prototype.asyncImagesDocumentEndLoaded = function()
if (this.isViewMode) if (this.isViewMode)
this.SetViewMode(true); this.SetViewMode(true);
//this.asyncServerIdStartLoaded();
return; return;
} }
...@@ -6148,8 +6129,6 @@ asc_docs_api.prototype.asyncImagesDocumentEndLoaded = function() ...@@ -6148,8 +6129,6 @@ asc_docs_api.prototype.asyncImagesDocumentEndLoaded = function()
this.ServerImagesWaitComplete = true; this.ServerImagesWaitComplete = true;
if (true == this.ServerIdWaitComplete) if (true == this.ServerIdWaitComplete)
this.OpenDocumentEndCallback(); this.OpenDocumentEndCallback();
//this.asyncServerIdStartLoaded();
} }
else else
{ {
......
...@@ -460,7 +460,6 @@ asc_docs_api.prototype['async_SaveToPdf'] = asc_docs_api.prototype.async_SaveToP ...@@ -460,7 +460,6 @@ asc_docs_api.prototype['async_SaveToPdf'] = asc_docs_api.prototype.async_SaveToP
asc_docs_api.prototype['async_SaveToPdf_PartCallback'] = asc_docs_api.prototype.async_SaveToPdf_PartCallback; asc_docs_api.prototype['async_SaveToPdf_PartCallback'] = asc_docs_api.prototype.async_SaveToPdf_PartCallback;
asc_docs_api.prototype['async_SaveToPdf_Progress'] = asc_docs_api.prototype.async_SaveToPdf_Progress; asc_docs_api.prototype['async_SaveToPdf_Progress'] = asc_docs_api.prototype.async_SaveToPdf_Progress;
asc_docs_api.prototype['asc_enableKeyEvents'] = asc_docs_api.prototype.asc_enableKeyEvents; asc_docs_api.prototype['asc_enableKeyEvents'] = asc_docs_api.prototype.asc_enableKeyEvents;
asc_docs_api.prototype['asyncServerIdStartLoaded'] = asc_docs_api.prototype.asyncServerIdStartLoaded;
asc_docs_api.prototype['asyncServerIdEndLoaded'] = asc_docs_api.prototype.asyncServerIdEndLoaded; asc_docs_api.prototype['asyncServerIdEndLoaded'] = asc_docs_api.prototype.asyncServerIdEndLoaded;
asc_docs_api.prototype['asyncFontsDocumentStartLoaded'] = asc_docs_api.prototype.asyncFontsDocumentStartLoaded; asc_docs_api.prototype['asyncFontsDocumentStartLoaded'] = asc_docs_api.prototype.asyncFontsDocumentStartLoaded;
asc_docs_api.prototype['GenerateStyles'] = asc_docs_api.prototype.GenerateStyles; asc_docs_api.prototype['GenerateStyles'] = asc_docs_api.prototype.GenerateStyles;
......
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