Commit 29d7ad7f authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Добавил базовый класс api. Теперь все общие части ОБЯЗАТЕЛЬНО класть туда.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66136 954022d7-b5bf-4e40-9824-e11837661b57
parent b0f522ca
......@@ -156,6 +156,7 @@
"../../Excel/model/DrawingObjects/GlobalCounters.js",
"../../Word/apiCommon.js",
"../../Excel/apiCommonExport.js",
"../../Common/apiBase.js",
"../../Excel/api.js",
"../../Excel/Private/license.js",
"../../Excel/Private/comments.js"
......@@ -204,6 +205,7 @@
"expand": true,
"cwd": "../../Excel/",
"src": [
"../Common/apiBase.js",
"api.js",
"apiDefines.js",
"view/EventsController.js",
......
......@@ -129,6 +129,7 @@
"../../PowerPoint/Editor/Format/GroupPrototype.js",
"../../PowerPoint/Editor/Format/ChartSpacePrototype.js",
"../../PowerPoint/Editor/Format/GraphicFrame.js",
"../../Common/apiBase.js",
"../../PowerPoint/api.js",
"../../PowerPoint/Private/license.js",
"../../PowerPoint/Private/comments.js",
......@@ -180,6 +181,7 @@
"expand": true,
"cwd": "../../PowerPoint/",
"src": [
"../Common/apiBase.js",
"api.js",
"apiCommon.js",
"apiDefines.js"
......
......@@ -115,6 +115,7 @@
"../../Common/scroll.js",
"../../Word/Editor/SerializeCommon.js",
"../../Word/apiDefines.js",
"../../Common/apiBase.js",
"../../Word/api.js",
"../../Word/Private/license.js",
"../../Word/Private/comments.js",
......@@ -182,6 +183,7 @@
"expand": true,
"cwd": "../../Word/",
"src": [
"../Common/apiBase.js",
"api.js",
"apiCommon.js",
"apiDefines.js"
......
"use strict";
/** @constructor */
function baseEditorsApi() {
this.CoAuthoringApi = new window['CDocsCoApi']();
}
// send chart message
baseEditorsApi.prototype.asc_coAuthoringChatSendMessage = function(message) {
this.CoAuthoringApi.sendMessage(message);
};
// get chart messages
baseEditorsApi.prototype.asc_coAuthoringChatGetMessages = function() {
this.CoAuthoringApi.getMessages();
};
// get users, возвращается массив users
baseEditorsApi.prototype.asc_coAuthoringGetUsers = function() {
this.CoAuthoringApi.getUsers();
};
\ No newline at end of file
......@@ -92,6 +92,7 @@
<script type="text/javascript" src="../view/EventsController.js"></script>
<script type="text/javascript" src="../view/WorkbookView.js"></script>
<script type="text/javascript" src="../../Common/apiBase.js"></script>
<script type="text/javascript" src="../api.js"></script>
<!--for theme-->
......
"use strict";
/* api.js
/* comments.js
*
* Author: Alexander.Trofimov@avsmedia.net
* Date: Apr 23, 2015
......
"use strict";
/* api.js
/* license.js
*
* Author: Alexander.Trofimov@avsmedia.net
* Date: Apr 23, 2015
......
......@@ -111,6 +111,7 @@
<script type="text/javascript" src="view/EventsController.js"></script>
<script type="text/javascript" src="view/WorkbookView.js"></script>
<script type="text/javascript" src="../Common/apiBase.js"></script>
<script type="text/javascript" src="api.js"></script>
<script type="text/javascript" src="Private/license.js"></script>
<script type="text/javascript" src="Private/comments.js"></script>
......
......@@ -100,6 +100,7 @@
<script type="text/javascript" src="view/EventsController.js"></script>
<script type="text/javascript" src="view/WorkbookView.js"></script>
<script type="text/javascript" src="../Common/apiBase.js"></script>
<script type="text/javascript" src="api.js"></script>
<!--for theme-->
......
......@@ -16,10 +16,12 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
var asc_CCollaborativeEditing = asc.CCollaborativeEditing;
var asc_CAdjustPrint = asc.asc_CAdjustPrint;
var prot;
var CDocsCoApi = window["CDocsCoApi"];
/** @constructor */
function spreadsheet_api(name, inputName, eventsHandlers) {
spreadsheet_api.superclass.constructor.call(this);
g_fontApplication.Init();
/************ private!!! **************/
this.HtmlElementName = name;
......@@ -95,7 +97,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
// CoAuthoring and Chat
this.User = undefined;
this.CoAuthoringApi = new CDocsCoApi();
this.isCoAuthoringEnable = true;
this.collaborativeEditing = null;
this.isDocumentCanSave = false; // Флаг, говорит о возможности сохранять документ (активна кнопка save или нет)
......@@ -171,6 +173,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this._init();
return this;
}
asc.extendClass(spreadsheet_api, baseEditorsApi);
spreadsheet_api.prototype._init = function() {
var t = this;
......@@ -3288,18 +3291,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
/////////////////////////////////////////////////////////////////////////
///////////////////CoAuthoring and Chat api//////////////////////////////
/////////////////////////////////////////////////////////////////////////
// send chart message
spreadsheet_api.prototype.asc_coAuthoringChatSendMessage = function(message) {
this.CoAuthoringApi.sendMessage(message);
};
// get chart messages
spreadsheet_api.prototype.asc_coAuthoringChatGetMessages = function() {
this.CoAuthoringApi.getMessages();
};
// get users, возвращается массив users
spreadsheet_api.prototype.asc_coAuthoringGetUsers = function() {
this.CoAuthoringApi.getUsers();
};
// server disconnect
spreadsheet_api.prototype.asc_coAuthoringDisconnect = function() {
this.CoAuthoringApi.disconnect();
......
......@@ -319,6 +319,7 @@
<script type="text/javascript" src="../../../../OfficeWeb/Excel/view/EventsController.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Excel/view/WorkbookView.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Common/apiBase.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Excel/api.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Excel/Private/license.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Excel/Private/comments.js"></script>
......
......@@ -280,6 +280,7 @@
<script type="text/javascript" src="../../../../OfficeWeb/Excel/view/EventsController.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Excel/view/WorkbookView.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Common/apiBase.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Excel/api.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Excel/Private/license.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Excel/Private/comments.js"></script>
......
......@@ -3810,7 +3810,7 @@ TreeRB.prototype = {
function IntervalTreeRB(){
IntervalTreeRB.superclass.constructor.call(this);
};
}
Asc.extendClass(IntervalTreeRB, TreeRB);
IntervalTreeRB.prototype._init = function (x) {
this.nil = new IntervalTreeRBNode();
......
......@@ -103,6 +103,8 @@
<script type="text/javascript" src="../PowerPoint/Drawing/HtmlPage.js"></script>
<script type="text/javascript" src="../PowerPoint/apiDefines.js"></script>
<script type="text/javascript" src="../PowerPoint/apiCommon.js"></script>
<script type="text/javascript" src="../Common/apiBase.js"></script>
<script type="text/javascript" src="../PowerPoint/api.js"></script>
<script type="text/javascript" src="../PowerPoint/Private/license.js"></script>
<script type="text/javascript" src="../PowerPoint/Private/comments.js"></script>
......
......@@ -33,9 +33,10 @@ CErrorData.prototype.get_Value = function() { return this.Value; };
/** @constructor */
function asc_docs_api(name)
{
asc_docs_api.superclass.constructor.call(this);
g_fontApplication.Init();
var CDocsCoApi = window["CDocsCoApi"];
var CSpellCheckApi = window["CSpellCheckApi"];
History = new CHistory();
......@@ -139,7 +140,7 @@ function asc_docs_api(name)
// CoAuthoring and Chat
this.User = undefined;
this.CoAuthoringApi = new CDocsCoApi();
this.CoAuthoringApi.isPowerPoint = true;
this.isCoAuthoringEnable = true;
this.isDocumentCanSave = false; // Флаг, говорит о возможности сохранять документ (активна кнопка save или нет)
......@@ -213,6 +214,7 @@ function asc_docs_api(name)
CHART_STYLE_MANAGER = new CChartStyleManager();
}
asc.extendClass(asc_docs_api, baseEditorsApi);
asc_docs_api.prototype.asc_GetFontThumbnailsPath = function()
{
......@@ -590,18 +592,6 @@ asc_docs_api.prototype.asc_coAuthoringDisconnect = function () {
//Just set viewer mode
this.SetViewMode(true);
};
// send chart message
asc_docs_api.prototype.asc_coAuthoringChatSendMessage = function (message) {
this.CoAuthoringApi.sendMessage(message);
};
// get chart messages
asc_docs_api.prototype.asc_coAuthoringChatGetMessages = function () {
this.CoAuthoringApi.getMessages();
};
// get users, возвращается массив users
asc_docs_api.prototype.asc_coAuthoringGetUsers = function () {
this.CoAuthoringApi.getUsers();
};
asc_docs_api.prototype.asyncServerIdEndLoaded = function () {
this.ServerIdWaitComplete = true;
......
......@@ -319,6 +319,8 @@
<script type="text/javascript" src="../../../../OfficeWeb/PowerPoint/Drawing/HtmlPage.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/PowerPoint/apiDefines.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/PowerPoint/apiCommon.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Common/apiBase.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/PowerPoint/api.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/PowerPoint/Private/license.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/PowerPoint/Private/comments.js"></script>
......
......@@ -99,6 +99,8 @@
<script type="text/javascript" src="Drawing/documentrenderer.js"></script>
<script type="text/javascript" src="apiDefines.js"></script>
<script type="text/javascript" src="apiCommon.js"></script>
<script type="text/javascript" src="../Common/apiBase.js"></script>
<script type="text/javascript" src="api.js"></script>
<script type="text/javascript" src="Private/license.js"></script>
<script type="text/javascript" src="Private/comments.js"></script>
......
......@@ -176,6 +176,8 @@
<script type="text/javascript" src="Drawing/documentrenderer.js"></script>
<script type="text/javascript" src="apiDefines.js"></script>
<script type="text/javascript" src="apiCommon.js"></script>
<script type="text/javascript" src="../Common/apiBase.js"></script>
<script type="text/javascript" src="api.js"></script>
<script type="text/javascript" src="Private/license.js"></script>
<script type="text/javascript" src="Private/comments.js"></script>
......
......@@ -286,6 +286,8 @@ CMailMergeSendData.prototype.put_UserId = function(v){this["userId"] = v;};
/** @constructor */
function asc_docs_api(name)
{
asc_docs_api.superclass.constructor.call(this);
if (window["AscDesktopEditor"])
{
window["AscDesktopEditor"]["CreateEditorApi"]();
......@@ -293,7 +295,7 @@ function asc_docs_api(name)
g_fontApplication.Init();
var CDocsCoApi = window["CDocsCoApi"];
var CSpellCheckApi = window["CSpellCheckApi"];
History = new CHistory();
......@@ -356,7 +358,7 @@ function asc_docs_api(name)
// CoAuthoring and Chat
this.User = undefined;
this.CoAuthoringApi = new CDocsCoApi();
this.isCoAuthoringEnable = true;
this.isCoMarksDraw = false;
this.isDocumentCanSave = false; // Флаг, говорит о возможности сохранять документ (активна кнопка save или нет)
......@@ -493,6 +495,7 @@ function asc_docs_api(name)
this.RevisionChangesStack = [];
}
asc.extendClass(asc_docs_api, baseEditorsApi);
asc_docs_api.prototype.LoadFontsFromServer = function(_fonts)
{
......@@ -1347,21 +1350,6 @@ asc_docs_api.prototype._coAuthoringInit = function() {
this.CoAuthoringApi.init(this.User, documentId, documentCallbackUrl, 'fghhfgsjdgfjs', c_oEditorId.Word, documentFormatSave);
};
// send chart message
asc_docs_api.prototype.asc_coAuthoringChatSendMessage = function(message)
{
this.CoAuthoringApi.sendMessage(message);
};
// get chart messages
asc_docs_api.prototype.asc_coAuthoringChatGetMessages = function()
{
this.CoAuthoringApi.getMessages();
};
// get users, возвращается массив users
asc_docs_api.prototype.asc_coAuthoringGetUsers = function()
{
this.CoAuthoringApi.getUsers();
};
// server disconnect
asc_docs_api.prototype.asc_coAuthoringDisconnect = function () {
this.CoAuthoringApi.disconnect();
......
......@@ -376,6 +376,8 @@
<script type="text/javascript" src="../../../../OfficeWeb/Word/Drawing/documentrenderer.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/apiDefines.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/apiCommon.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Common/apiBase.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/api.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/document/empty.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Common/scroll.js"></script>
......
......@@ -168,6 +168,8 @@
<script type="text/javascript" src="../../../../OfficeWeb/Word/Drawing/documentrenderer.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/apiDefines.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/apiCommon.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Common/apiBase.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/api.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/Private/license.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/Private/comments.js"></script>
......
......@@ -106,6 +106,8 @@
<script type="text/javascript" src="../../OfficeWeb/Word/Drawing/documentrenderer.js"></script>
<script type="text/javascript" src="../../OfficeWeb/Word/apiDefines.js"></script>
<script type="text/javascript" src="../../OfficeWeb/Word/apiCommon.js"></script>
<script type="text/javascript" src="../../OfficeWeb/Common/apiBase.js"></script>
<script type="text/javascript" src="../../OfficeWeb/Word/api.js"></script>
<script type="text/javascript" src="../../OfficeWeb/Word/Private/license.js"></script>
<script type="text/javascript" src="../../OfficeWeb/Word/Private/comments.js"></script>
......
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