Commit 3966e0ff authored by Alexander Trofimov's avatar Alexander Trofimov Committed by GitHub

Merge pull request #32 from ONLYOFFICE/release/v4.0

Release/v4.0
parents 2d2c7afc d45163c1
[![License](https://img.shields.io/badge/License-GNU%20AGPL%20V3-green.svg?style=flat)](http://www.gnu.org/licenses/agpl-3.0.ru.html) ![Release](https://img.shields.io/badge/Release-v4.0.0-blue.svg?style=flat)
## Sdkjs
JavaScript SDK which is a part of [ONLYOFFICE Document Server][2]. Contains API for all the included components client-side interaction.
## Project Information ## Project Information
Official website: [http://www.onlyoffice.org](http://onlyoffice.org "http://www.onlyoffice.org") Official website: [http://www.onlyoffice.org](http://onlyoffice.org "http://www.onlyoffice.org")
...@@ -8,6 +15,11 @@ SaaS version: [http://www.onlyoffice.com](http://www.onlyoffice.com "http://www. ...@@ -8,6 +15,11 @@ SaaS version: [http://www.onlyoffice.com](http://www.onlyoffice.com "http://www.
## User Feedback and Support ## User Feedback and Support
If you have any problems with or questions about this image, please contact us through a [dev.onlyoffice.org][1]. If you have any problems with or questions about [ONLYOFFICE Document Server][2], please visit our official forum to find answers to your questions: [dev.onlyoffice.org][1].
[1]: http://dev.onlyoffice.org [1]: http://dev.onlyoffice.org
[2]: https://github.com/ONLYOFFICE/DocumentServer
## License
Sdkjs is released under an GNU AGPL v3.0 license. See the LICENSE file for more information.
...@@ -113,13 +113,16 @@ AscCommon.baseEditorsApi.prototype._onCheckLicenseEnd = function(err, res) { ...@@ -113,13 +113,16 @@ AscCommon.baseEditorsApi.prototype._onCheckLicenseEnd = function(err, res) {
this.licenseResult = {err: err, res: res}; this.licenseResult = {err: err, res: res};
this._onEndPermissions(); this._onEndPermissions();
}; };
AscCommon.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) {
oResult.asc_setCanLicense(g_oLicenseResult.Success === this.licenseResult); var type = this.licenseResult['type'];
oResult.asc_setCanBranding(g_oLicenseResult.Error !== this.licenseResult); // Для тех, у кого есть лицензия, branding доступен oResult.asc_setCanLicense(g_oLicenseResult.Success === type);
oResult.asc_setCanBranding(g_oLicenseResult.Error !== type); // Для тех, у кого есть лицензия, branding доступен
oResult.asc_setCanBranding(g_oLicenseResult.Error !== type); // Для тех, у кого есть лицензия, branding доступен
oResult.asc_setIsLight(this.licenseResult['light']);
} }
this.sendEvent('asc_onGetEditorPermissions', oResult); this.sendEvent('asc_onGetEditorPermissions', oResult);
} }
}; };
\ No newline at end of file
...@@ -106,36 +106,36 @@ ...@@ -106,36 +106,36 @@
return ret; return ret;
} }
/** /**
* Класс asc_CAscEditorPermissions для прав редакторов * Класс asc_CAscEditorPermissions для прав редакторов
* ----------------------------------------------------------------------------- * -----------------------------------------------------------------------------
* *
* @constructor * @constructor
* @memberOf Asc * @memberOf Asc
*/ */
function asc_CAscEditorPermissions (settings) { function asc_CAscEditorPermissions() {
this.canCoAuthoring = true; this.canLicense = false;
this.canReaderMode = true; this.isLight = false;
this.canBranding = false; this.canCoAuthoring = true;
this.isAutosaveEnable = true; this.canReaderMode = true;
this.AutosaveMinInterval = 300; this.canBranding = false;
this.isAnalyticsEnable = false; this.isAutosaveEnable = true;
return this; this.AutosaveMinInterval = 300;
} this.isAnalyticsEnable = false;
asc_CAscEditorPermissions.prototype = { return this;
constructor: asc_CAscEditorPermissions, }
asc_getCanLicense: function(){ return this.canLicense; }, asc_CAscEditorPermissions.prototype.asc_getCanLicense = function(){ return this.canLicense; };
asc_CAscEditorPermissions.prototype.asc_getCanCoAuthoring = function(){ return this.canCoAuthoring; };
asc_getCanCoAuthoring: function(){ return this.canCoAuthoring; }, asc_CAscEditorPermissions.prototype.asc_getCanReaderMode = function(){ return this.canReaderMode; };
asc_getCanReaderMode: function(){ return this.canReaderMode; }, asc_CAscEditorPermissions.prototype.asc_getCanBranding = function(){ return this.canBranding; };
asc_getCanBranding: function(){ return this.canBranding; }, asc_CAscEditorPermissions.prototype.asc_getIsAutosaveEnable = function(){ return this.isAutosaveEnable; };
asc_getIsAutosaveEnable: function(){ return this.isAutosaveEnable; }, asc_CAscEditorPermissions.prototype.asc_getAutosaveMinInterval = function(){ return this.AutosaveMinInterval; };
asc_getAutosaveMinInterval: function(){ return this.AutosaveMinInterval; }, asc_CAscEditorPermissions.prototype.asc_getIsAnalyticsEnable = function(){ return this.isAnalyticsEnable; };
asc_getIsAnalyticsEnable: function(){ return this.isAnalyticsEnable; }, asc_CAscEditorPermissions.prototype.asc_getIsLight = function(){ return this.isLight; };
asc_setCanLicense: function(v){ this.canLicense = v; }, asc_CAscEditorPermissions.prototype.asc_setCanLicense = function(v){ this.canLicense = v; };
asc_setCanBranding: function(v){ this.canBranding = v; } asc_CAscEditorPermissions.prototype.asc_setCanBranding = function(v){ this.canBranding = v; };
}; asc_CAscEditorPermissions.prototype.asc_setIsLight = function(v){ this.isLight = v; };
/** @constructor */ /** @constructor */
function asc_ValAxisSettings() function asc_ValAxisSettings()
...@@ -2301,15 +2301,16 @@ ...@@ -2301,15 +2301,16 @@
window["AscCommon"].CreateAscColorCustom = CreateAscColorCustom; window["AscCommon"].CreateAscColorCustom = CreateAscColorCustom;
window["AscCommon"].CreateAscColor = CreateAscColor; window["AscCommon"].CreateAscColor = CreateAscColor;
window["AscCommon"].asc_CAscEditorPermissions = asc_CAscEditorPermissions; window["AscCommon"].asc_CAscEditorPermissions = asc_CAscEditorPermissions;
prot = asc_CAscEditorPermissions.prototype; prot = asc_CAscEditorPermissions.prototype;
prot["asc_getCanLicense"] = prot.asc_getCanLicense; prot["asc_getCanLicense"] = prot.asc_getCanLicense;
prot["asc_getCanCoAuthoring"] = prot.asc_getCanCoAuthoring; prot["asc_getCanCoAuthoring"] = prot.asc_getCanCoAuthoring;
prot["asc_getCanReaderMode"] = prot.asc_getCanReaderMode; prot["asc_getCanReaderMode"] = prot.asc_getCanReaderMode;
prot["asc_getCanBranding"] = prot.asc_getCanBranding; prot["asc_getCanBranding"] = prot.asc_getCanBranding;
prot["asc_getIsAutosaveEnable"] = prot.asc_getIsAutosaveEnable; prot["asc_getIsAutosaveEnable"] = prot.asc_getIsAutosaveEnable;
prot["asc_getAutosaveMinInterval"] = prot.asc_getAutosaveMinInterval; prot["asc_getAutosaveMinInterval"] = prot.asc_getAutosaveMinInterval;
prot["asc_getIsAnalyticsEnable"] = prot.asc_getIsAnalyticsEnable; prot["asc_getIsAnalyticsEnable"] = prot.asc_getIsAnalyticsEnable;
prot["asc_getIsLight"] = prot.asc_getIsLight;
window["AscCommon"].asc_ValAxisSettings = asc_ValAxisSettings; window["AscCommon"].asc_ValAxisSettings = asc_ValAxisSettings;
prot = asc_ValAxisSettings.prototype; prot = asc_ValAxisSettings.prototype;
......
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