Commit 2231fcd1 authored by Alexander.Trofimov's avatar Alexander.Trofimov

common/apiBase to function closure

parent 4ac6161c
...@@ -44,7 +44,7 @@ var editor; ...@@ -44,7 +44,7 @@ var editor;
* @param eventsHandlers * @param eventsHandlers
* @constructor * @constructor
* @returns {spreadsheet_api} * @returns {spreadsheet_api}
* @extends {baseEditorsApi} * @extends {AscCommon.baseEditorsApi}
*/ */
function spreadsheet_api(name, inputName, eventsHandlers) { function spreadsheet_api(name, inputName, eventsHandlers) {
spreadsheet_api.superclass.constructor.call(this, name); spreadsheet_api.superclass.constructor.call(this, name);
...@@ -108,7 +108,7 @@ var editor; ...@@ -108,7 +108,7 @@ var editor;
this._init(); this._init();
return this; return this;
} }
AscCommon.extendClass(spreadsheet_api, baseEditorsApi); AscCommon.extendClass(spreadsheet_api, AscCommon.baseEditorsApi);
spreadsheet_api.prototype.sendEvent = function() { spreadsheet_api.prototype.sendEvent = function() {
this.handlers.trigger.apply(this.handlers, arguments); this.handlers.trigger.apply(this.handlers, arguments);
......
...@@ -5,7 +5,7 @@ function CheckLicense(licenseUrl, customerId, userId, userFirstName, userLastNam ...@@ -5,7 +5,7 @@ function CheckLicense(licenseUrl, customerId, userId, userFirstName, userLastNam
callback(true, g_oLicenseResult.Success); callback(true, g_oLicenseResult.Success);
} }
baseEditorsApi.prototype._onEndPermissions = function() AscCommon.baseEditorsApi.prototype._onEndPermissions = function()
{ {
if (this.isOnFirstConnectEnd && this.isOnLoadLicense) if (this.isOnFirstConnectEnd && this.isOnLoadLicense)
{ {
......
...@@ -76,11 +76,11 @@ function CheckUserInLicense(customerId, userId, userFirstName, userLastName, oLi ...@@ -76,11 +76,11 @@ function CheckUserInLicense(customerId, userId, userFirstName, userLastName, oLi
return res; return res;
} }
baseEditorsApi.prototype._onCheckLicenseEnd = function(err, res) { AscCommon.baseEditorsApi.prototype._onCheckLicenseEnd = function(err, res) {
this.licenseResult = {err: err, res: res}; this.licenseResult = {err: err, res: res};
this._onEndPermissions(); this._onEndPermissions();
}; };
baseEditorsApi.prototype._onEndPermissions = function() { AscCommon.baseEditorsApi.prototype._onEndPermissions = function() {
if (this.isOnFirstConnectEnd && this.isOnLoadLicense) { if (this.isOnFirstConnectEnd && this.isOnLoadLicense) {
var oResult = new AscCommon.asc_CAscEditorPermissions(); var oResult = new AscCommon.asc_CAscEditorPermissions();
if (null !== this.licenseResult) { if (null !== this.licenseResult) {
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
prot["asc_setArrColors"] = prot.asc_setArrColors; prot["asc_setArrColors"] = prot.asc_setArrColors;
})(window); })(window);
baseEditorsApi.prototype.asc_showRevision = function(newObj) { AscCommon.baseEditorsApi.prototype.asc_showRevision = function(newObj) {
if (!newObj.docId) { if (!newObj.docId) {
return; return;
} }
...@@ -96,4 +96,4 @@ baseEditorsApi.prototype.asc_showRevision = function(newObj) { ...@@ -96,4 +96,4 @@ baseEditorsApi.prototype.asc_showRevision = function(newObj) {
AscCommon.CollaborativeEditing.Apply_Changes(); AscCommon.CollaborativeEditing.Apply_Changes();
} }
}; };
baseEditorsApi.prototype['asc_showRevision'] = baseEditorsApi.prototype.asc_showRevision; AscCommon.baseEditorsApi.prototype['asc_showRevision'] = AscCommon.baseEditorsApi.prototype.asc_showRevision;
\ No newline at end of file \ No newline at end of file
"use strict"; "use strict";
(function(window, undefined){
// Import // Import
var offlineMode = AscCommon.offlineMode; var offlineMode = AscCommon.offlineMode;
var c_oEditorId = AscCommon.c_oEditorId; var c_oEditorId = AscCommon.c_oEditorId;
...@@ -576,4 +578,9 @@ baseEditorsApi.prototype.asc_isOffline = function() { ...@@ -576,4 +578,9 @@ baseEditorsApi.prototype.asc_isOffline = function() {
}; };
baseEditorsApi.prototype.asc_getUrlType = function(url) { baseEditorsApi.prototype.asc_getUrlType = function(url) {
return AscCommon.getUrlType(url); return AscCommon.getUrlType(url);
}; };
\ No newline at end of file
//----------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {};
window['AscCommon'].baseEditorsApi = baseEditorsApi;
})(window);
...@@ -36,7 +36,7 @@ var c_oSerFormat = { ...@@ -36,7 +36,7 @@ var c_oSerFormat = {
* *
* @param name * @param name
* @constructor * @constructor
* @extends {baseEditorsApi} * @extends {AscCommon.baseEditorsApi}
*/ */
function asc_docs_api(name) function asc_docs_api(name)
{ {
...@@ -123,7 +123,7 @@ function asc_docs_api(name) ...@@ -123,7 +123,7 @@ function asc_docs_api(name)
editor = window.editor; editor = window.editor;
} }
} }
AscCommon.extendClass(asc_docs_api, baseEditorsApi); AscCommon.extendClass(asc_docs_api, AscCommon.baseEditorsApi);
asc_docs_api.prototype.sendEvent = function() { asc_docs_api.prototype.sendEvent = function() {
this.asc_fireCallback.apply(this, arguments); this.asc_fireCallback.apply(this, arguments);
......
...@@ -204,7 +204,7 @@ CMailMergeSendData.prototype.put_UserId = function(v){this["userId"] = v;}; ...@@ -204,7 +204,7 @@ CMailMergeSendData.prototype.put_UserId = function(v){this["userId"] = v;};
* *
* @param name * @param name
* @constructor * @constructor
* @extends {baseEditorsApi} * @extends {AscCommon.baseEditorsApi}
*/ */
function asc_docs_api(name) function asc_docs_api(name)
{ {
...@@ -321,7 +321,7 @@ function asc_docs_api(name) ...@@ -321,7 +321,7 @@ function asc_docs_api(name)
//g_clipboardBase.Init(this); //g_clipboardBase.Init(this);
} }
AscCommon.extendClass(asc_docs_api, baseEditorsApi); AscCommon.extendClass(asc_docs_api, AscCommon.baseEditorsApi);
asc_docs_api.prototype.sendEvent = function() { asc_docs_api.prototype.sendEvent = function() {
this.asc_fireCallback.apply(this, arguments); this.asc_fireCallback.apply(this, arguments);
......
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