Commit 6c720898 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

add asc_setViewMode

asc_coAuthoringDisconnect to baseEditorsApi
asc_setViewerMode -> asc_setViewMode
SetViewMode -> asc_setViewMode

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66484 954022d7-b5bf-4e40-9824-e11837661b57
parent 1c32fee6
......@@ -165,6 +165,8 @@ baseEditorsApi.prototype.sync_TryUndoInFastCollaborative = function()
{
this.sendEvent("asc_OnTryUndoInFastCollaborative");
};
baseEditorsApi.prototype.asc_setViewMode = function() {
};
baseEditorsApi.prototype.getViewMode = function() {
};
// Open
......@@ -284,7 +286,13 @@ baseEditorsApi.prototype._coAuthoringInit = function() {
};
baseEditorsApi.prototype._coAuthoringInitEnd = function() {
};
// server disconnect
baseEditorsApi.prototype.asc_coAuthoringDisconnect = function() {
this.CoAuthoringApi.disconnect();
this.isCoAuthoringEnable = false;
// Выставляем view-режим
this.asc_setViewMode(true);
};
// SpellCheck
baseEditorsApi.prototype._coSpellCheckInit = function() {
......
......@@ -407,7 +407,7 @@
var api = new Asc.spreadsheet_api("wb-widget", null);
api.asc_setMobileVersion(true);
api.asc_setViewerMode(true);
api.asc_setViewMode(true);
api.asc_registerCallback("asc_onStartAction", onStartAction);
api.asc_registerCallback("asc_onEndAction", onEndAction);
api.asc_registerCallback("asc_onError", onError);
......
......@@ -554,7 +554,7 @@ var editor;
return this.controller.getViewerMode();
};
spreadsheet_api.prototype.asc_setViewerMode = function(isViewerMode) {
spreadsheet_api.prototype.asc_setViewMode = function(isViewerMode) {
this.controller.setViewerMode(isViewerMode);
if (this.collaborativeEditing) {
this.collaborativeEditing.setViewerMode(isViewerMode);
......@@ -584,6 +584,9 @@ var editor;
}
}
};
spreadsheet_api.prototype.asc_setViewerMode = function(isViewerMode) {
this.asc_setViewMode(isViewerMode);
};
spreadsheet_api.prototype.asc_setUseEmbeddedCutFonts = function(bUse) {
this.isUseEmbeddedCutFonts = bUse;
......@@ -1325,7 +1328,7 @@ var editor;
// Посылаем наверх эвент об отключении от сервера
t.handlers.trigger("asc_onCoAuthoringDisconnect");
// И переходим в режим просмотра т.к. мы не можем сохранить таблицу
t.asc_setViewerMode(true);
t.asc_setViewMode(true);
t.handlers.trigger("asc_onError", isCloseCoAuthoring ? c_oAscError.ID.UserDrop : c_oAscError.ID.CoAuthoringDisconnect, c_oAscError.Level.NoCritical);
}
};
......@@ -2963,19 +2966,6 @@ var editor;
}
};
/////////////////////////////////////////////////////////////////////////
///////////////////CoAuthoring and Chat api//////////////////////////////
/////////////////////////////////////////////////////////////////////////
// server disconnect
spreadsheet_api.prototype.asc_coAuthoringDisconnect = function() {
this.CoAuthoringApi.disconnect();
this.isCoAuthoringEnable = false;
// Выставляем view-режим
this.asc_setViewerMode(true);
};
/////////////////////////////////////////////////////////////////////////
////////////////////////////AutoSave api/////////////////////////////////
/////////////////////////////////////////////////////////////////////////
......@@ -3249,6 +3239,7 @@ var editor;
prot["asc_setAutoSaveGap"] = prot.asc_setAutoSaveGap;
prot["asc_setMobileVersion"] = prot.asc_setMobileVersion;
prot["asc_setViewMode"] = prot.asc_setViewMode;
prot["asc_setViewerMode"] = prot.asc_setViewerMode;
prot["asc_setUseEmbeddedCutFonts"] = prot.asc_setUseEmbeddedCutFonts;
prot["asc_setAdvancedOptions"] = prot.asc_setAdvancedOptions;
......
This diff is collapsed.
......@@ -376,7 +376,7 @@ asc_docs_api.prototype._coAuthoringInitEnd = function() {
if (isDisconnectAtAll) {
// Посылаем наверх эвент об отключении от сервера
t.asc_fireCallback("asc_onCoAuthoringDisconnect");
t.SetViewMode(true, true);
t.asc_setViewMode(true);
t.sync_ErrorCallback(isCloseCoAuthoring ? c_oAscError.ID.UserDrop : c_oAscError.ID.CoAuthoringDisconnect, c_oAscError.Level.NoCritical);
}
};
......@@ -406,15 +406,6 @@ asc_docs_api.prototype.sync_CollaborativeChanges = function()
this.asc_fireCallback("asc_onCollaborativeChanges");
};
// server disconnect
asc_docs_api.prototype.asc_coAuthoringDisconnect = function () {
this.CoAuthoringApi.disconnect();
this.isCoAuthoringEnable = false;
//Just set viewer mode
this.SetViewMode(true);
};
asc_docs_api.prototype.asyncServerIdEndLoaded = function () {
this.ServerIdWaitComplete = true;
if (true == this.ServerImagesWaitComplete)
......@@ -3528,7 +3519,7 @@ asc_docs_api.prototype.asyncFontsDocumentEndLoaded = function()
if (this.isLoadNoCutFonts)
{
this.isLoadNoCutFonts = false;
this.SetViewMode(false);
this.asc_setViewMode(false);
return;
}
......@@ -3765,7 +3756,7 @@ asc_docs_api.prototype.OpenDocumentEndCallback = function()
}
if (this.isViewMode)
this.SetViewMode(true);
this.asc_setViewMode(true);
// Меняем тип состояния (на никакое)
this.advancedOptionsAction = c_oAscAdvancedOptionsAction.None;
......@@ -4359,7 +4350,7 @@ asc_docs_api.prototype.SetDeviceInputHelperId = function(idKeyboard)
asc_docs_api.prototype.getViewMode = function() {
return this.isViewMode;
};
asc_docs_api.prototype.SetViewMode = function(isViewMode) {
asc_docs_api.prototype.asc_setViewMode = function(isViewMode) {
if (isViewMode) {
this.isViewMode = true;
this.ShowParaMarks = false;
......@@ -4395,6 +4386,9 @@ asc_docs_api.prototype.SetViewMode = function(isViewMode) {
}
}
};
asc_docs_api.prototype.SetViewMode = function(isViewMode) {
this.asc_setViewMode(isViewMode);
};
asc_docs_api.prototype.SetUseEmbeddedCutFonts = function(bUse)
{
......
......@@ -351,6 +351,7 @@ asc_docs_api.prototype['SetPaintFormat'] = asc_docs_api.prototype.SetPaintFormat
asc_docs_api.prototype['sync_PaintFormatCallback'] = asc_docs_api.prototype.sync_PaintFormatCallback;
asc_docs_api.prototype['ClearFormating'] = asc_docs_api.prototype.ClearFormating;
asc_docs_api.prototype['SetDeviceInputHelperId'] = asc_docs_api.prototype.SetDeviceInputHelperId;
asc_docs_api.prototype['asc_setViewMode'] = asc_docs_api.prototype.asc_setViewMode;
asc_docs_api.prototype['SetViewMode'] = asc_docs_api.prototype.SetViewMode;
asc_docs_api.prototype['SetUseEmbeddedCutFonts'] = asc_docs_api.prototype.SetUseEmbeddedCutFonts;
asc_docs_api.prototype['IsNeedDefaultFonts'] = asc_docs_api.prototype.IsNeedDefaultFonts;
......
......@@ -1109,7 +1109,6 @@ $(document).ready(function(){
case "td_formatmodel":
//console.log("td_formatmodel");
editor.SetPaintFormat(true);
//editor.SetViewMode(false);
break;
}
......@@ -3050,7 +3049,7 @@ $(document).ready(function(){
c_DocInfo.put_UserName( globalCurentUser );
var isViewMode = "true" == getURLParameter("isViewMode");
editor.SetViewMode(isViewMode);
editor.asc_setViewMode(isViewMode);
editor.asc_setDocInfo(c_DocInfo);
editor.asc_getEditorPermissions();
......
......@@ -1077,7 +1077,7 @@ asc_docs_api.prototype._coAuthoringInitEnd = function() {
if (isDisconnectAtAll) {
// Посылаем наверх эвент об отключении от сервера
t.asc_fireCallback("asc_onCoAuthoringDisconnect");
t.SetViewMode(true);
t.asc_setViewMode(true);
t.sync_ErrorCallback(isCloseCoAuthoring ? c_oAscError.ID.UserDrop : c_oAscError.ID.CoAuthoringDisconnect, c_oAscError.Level.NoCritical);
}
};
......@@ -1085,15 +1085,6 @@ asc_docs_api.prototype._coAuthoringInitEnd = function() {
this.CoAuthoringApi.init(this.User, this.documentId, this.documentCallbackUrl, 'fghhfgsjdgfjs', c_oEditorId.Word, this.documentFormatSave);
};
// server disconnect
asc_docs_api.prototype.asc_coAuthoringDisconnect = function () {
this.CoAuthoringApi.disconnect();
this.isCoAuthoringEnable = false;
// Выставляем view-режим
this.SetViewMode(true);
};
/////////////////////////////////////////////////////////////////////////
//////////////////////////SpellChecking api//////////////////////////////
/////////////////////////////////////////////////////////////////////////
......@@ -5433,7 +5424,7 @@ asc_docs_api.prototype.asyncFontsDocumentEndLoaded = function()
if (this.isLoadNoCutFonts)
{
this.isLoadNoCutFonts = false;
this.SetViewMode(false);
this.asc_setViewMode(false);
return;
}
......@@ -5629,7 +5620,7 @@ asc_docs_api.prototype.asyncImagesDocumentEndLoaded = function()
this.WordControl.InitControl();
if (this.isViewMode)
this.SetViewMode(true);
this.asc_setViewMode(true);
return;
}
......@@ -5785,7 +5776,7 @@ asc_docs_api.prototype.OpenDocumentEndCallback = function()
this.WordControl.m_oDrawingDocument.SendMathToMenu();
if (this.isViewMode)
this.SetViewMode(true);
this.asc_setViewMode(true);
// Меняем тип состояния (на никакое)
this.advancedOptionsAction = c_oAscAdvancedOptionsAction.None;
......@@ -6283,7 +6274,7 @@ asc_docs_api.prototype.add_SectionBreak = function(_Type)
asc_docs_api.prototype.getViewMode = function() {
return this.isViewMode;
};
asc_docs_api.prototype.SetViewMode = function(isViewMode) {
asc_docs_api.prototype.asc_setViewMode = function(isViewMode) {
if (isViewMode) {
this.asc_SpellCheckDisconnect();
......@@ -6326,6 +6317,9 @@ asc_docs_api.prototype.SetViewMode = function(isViewMode) {
this.WordControl.OnResize(true);
}
};
asc_docs_api.prototype.SetViewMode = function(isViewMode) {
this.asc_setViewMode(isViewMode);
};
asc_docs_api.prototype.SetUseEmbeddedCutFonts = function(bUse)
{
......
......@@ -473,6 +473,7 @@ asc_docs_api.prototype['StartChangeWrapPolygon'] = asc_docs_api.prototype.StartC
asc_docs_api.prototype['ClearFormating'] = asc_docs_api.prototype.ClearFormating;
asc_docs_api.prototype['GetSectionInfo'] = asc_docs_api.prototype.GetSectionInfo;
asc_docs_api.prototype['add_SectionBreak'] = asc_docs_api.prototype.add_SectionBreak;
asc_docs_api.prototype['asc_setViewMode'] = asc_docs_api.prototype.asc_setViewMode;
asc_docs_api.prototype['SetViewMode'] = asc_docs_api.prototype.SetViewMode;
asc_docs_api.prototype['SetUseEmbeddedCutFonts'] = asc_docs_api.prototype.SetUseEmbeddedCutFonts;
asc_docs_api.prototype['IsNeedDefaultFonts'] = asc_docs_api.prototype.IsNeedDefaultFonts;
......
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