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

common/apiBase to function closure

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