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,12 +113,15 @@ AscCommon.baseEditorsApi.prototype._onCheckLicenseEnd = function(err, res) { ...@@ -113,12 +113,15 @@ 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);
} }
......
...@@ -113,7 +113,9 @@ ...@@ -113,7 +113,9 @@
* @constructor * @constructor
* @memberOf Asc * @memberOf Asc
*/ */
function asc_CAscEditorPermissions (settings) { function asc_CAscEditorPermissions() {
this.canLicense = false;
this.isLight = false;
this.canCoAuthoring = true; this.canCoAuthoring = true;
this.canReaderMode = true; this.canReaderMode = true;
this.canBranding = false; this.canBranding = false;
...@@ -122,20 +124,18 @@ ...@@ -122,20 +124,18 @@
this.isAnalyticsEnable = false; this.isAnalyticsEnable = false;
return this; return this;
} }
asc_CAscEditorPermissions.prototype = { asc_CAscEditorPermissions.prototype.asc_getCanLicense = function(){ return this.canLicense; };
constructor: asc_CAscEditorPermissions, asc_CAscEditorPermissions.prototype.asc_getCanCoAuthoring = function(){ return this.canCoAuthoring; };
asc_getCanLicense: function(){ return this.canLicense; }, asc_CAscEditorPermissions.prototype.asc_getCanReaderMode = function(){ return this.canReaderMode; };
asc_CAscEditorPermissions.prototype.asc_getCanBranding = function(){ return this.canBranding; };
asc_CAscEditorPermissions.prototype.asc_getIsAutosaveEnable = function(){ return this.isAutosaveEnable; };
asc_CAscEditorPermissions.prototype.asc_getAutosaveMinInterval = function(){ return this.AutosaveMinInterval; };
asc_CAscEditorPermissions.prototype.asc_getIsAnalyticsEnable = function(){ return this.isAnalyticsEnable; };
asc_CAscEditorPermissions.prototype.asc_getIsLight = function(){ return this.isLight; };
asc_getCanCoAuthoring: function(){ return this.canCoAuthoring; }, asc_CAscEditorPermissions.prototype.asc_setCanLicense = function(v){ this.canLicense = v; };
asc_getCanReaderMode: function(){ return this.canReaderMode; }, asc_CAscEditorPermissions.prototype.asc_setCanBranding = function(v){ this.canBranding = v; };
asc_getCanBranding: function(){ return this.canBranding; }, asc_CAscEditorPermissions.prototype.asc_setIsLight = function(v){ this.isLight = v; };
asc_getIsAutosaveEnable: function(){ return this.isAutosaveEnable; },
asc_getAutosaveMinInterval: function(){ return this.AutosaveMinInterval; },
asc_getIsAnalyticsEnable: function(){ return this.isAnalyticsEnable; },
asc_setCanLicense: function(v){ this.canLicense = v; },
asc_setCanBranding: function(v){ this.canBranding = v; }
};
/** @constructor */ /** @constructor */
function asc_ValAxisSettings() function asc_ValAxisSettings()
...@@ -2310,6 +2310,7 @@ ...@@ -2310,6 +2310,7 @@
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