diff --git a/build/Gruntfile.js b/build/Gruntfile.js index d7bb7ef3fb77df04a9338f23c24f78a419e1ccbf..8c6d29683104c86f26d4104a1eb3b3e4d8280693 100644 --- a/build/Gruntfile.js +++ b/build/Gruntfile.js @@ -94,6 +94,7 @@ module.exports = function(grunt) { grunt.registerTask('concat_sdk_init', function() { var sdkTmp = 'sdk-tmp.js', sdkAllTmp = 'sdk-all-tmp.js', sdkAllMinTmp = 'sdk-all-min-tmp.js'; + var srcFilesMin = packageFile['compile']['sdk']['min']; var srcFilesAll = packageFile['compile']['sdk']['common']; var sdkOpt = { compilation_level: 'WHITESPACE_ONLY', @@ -116,7 +117,8 @@ module.exports = function(grunt) { srcFilesAll = srcFilesAll.concat(packageFile['compile']['sdk']['private']); } if (grunt.option('desktop')) { - srcFilesAll = srcFilesAll.concat(packageFile['compile']['sdk']['desktop']); + srcFilesMin = srcFilesMin.concat(packageFile['compile']['sdk']['desktop']['min']); + srcFilesAll = srcFilesAll.concat(packageFile['compile']['sdk']['desktop']['common']); } if (grunt.option('builder')) { srcFilesAll = srcFilesAll.concat(packageFile['compile']['sdk']['builder']); @@ -131,7 +133,7 @@ module.exports = function(grunt) { banner: '', footer: 'window["split"]="split";' }, - src: packageFile['compile']['sdk']['min'], + src: srcFilesMin, dest: sdkAllMinTmp }, sdk: { diff --git a/build/configs/webexcel.json b/build/configs/webexcel.json index 6951831ac1006ab113e1e3e1b817e218b54ce737..c2a328bf5c0dee7b3cd863d2ae9023afad3038b3 100644 --- a/build/configs/webexcel.json +++ b/build/configs/webexcel.json @@ -172,10 +172,15 @@ ], "builder": [ ], - "desktop": [ - "../common/Local/common.js", - "../cell/Local/api.js" - ], + "desktop": { + "min": [ + "../common/Local/license.js" + ], + "common": [ + "../common/Local/common.js", + "../cell/Local/api.js" + ] + }, "mobile_banners": [ "../../web-apps/vendor/xregexp/xregexp-all-min.js", "../../web-apps/vendor/underscore/underscore-min.js", diff --git a/build/configs/webpowerpoint.json b/build/configs/webpowerpoint.json index b340d3549d2ad456e427d5badda18a028f8d4896..94e6a13912b2b3f88c3c45342c06aa8df7a66f1c 100644 --- a/build/configs/webpowerpoint.json +++ b/build/configs/webpowerpoint.json @@ -163,10 +163,15 @@ ], "builder": [ ], - "desktop": [ - "../common/Local/common.js", - "../slide/Local/api.js" - ], + "desktop": { + "min": [ + "../common/Local/license.js" + ], + "common": [ + "../common/Local/common.js", + "../slide/Local/api.js" + ] + }, "mobile_banners": [ "../common/Native/native.js", "../common/Native/jquery_native.js", diff --git a/build/configs/webword.json b/build/configs/webword.json index a0cdae25c4a6b99490e8f9e30b49398047170a98..0cc3488881b2bfc05d792b8cd31c0beb0e15d38c 100644 --- a/build/configs/webword.json +++ b/build/configs/webword.json @@ -161,11 +161,16 @@ "builder": [ "../word/apiBuilder.js" ], - "desktop": [ - "../common/Local/common.js", - "../word/Local/documentrenderer.js", - "../word/Local/api.js" - ], + "desktop": { + "min": [ + "../common/Local/license.js" + ], + "common": [ + "../common/Local/common.js", + "../word/Local/documentrenderer.js", + "../word/Local/api.js" + ] + }, "mobile_banners": [], "exclude_mobile": [], "dst": "../word", diff --git a/common/Local/common.js b/common/Local/common.js index bdb266d20ff2fe922aba5f708a9996ae0e6d6748..e70acdb0637296d2f39b5cfe721e9d86286bb2ac 100644 --- a/common/Local/common.js +++ b/common/Local/common.js @@ -24,22 +24,6 @@ */ "use strict"; -function CheckLicense(licenseUrl, customerId, userId, userFirstName, userLastName, callback) -{ - callback(true, g_oLicenseResult.Success); -} - -AscCommon.baseEditorsApi.prototype._onEndPermissions = function() -{ - if (this.isOnFirstConnectEnd && this.isOnLoadLicense) - { - var oResult = new AscCommon.asc_CAscEditorPermissions(); - oResult.asc_setCanLicense(true); - oResult.asc_setCanBranding(true); - this.sendEvent('asc_onGetEditorPermissions', oResult); - } -}; - ///////////////////////////////////////////////////////// ////////////// FONTS //////////////////////// ///////////////////////////////////////////////////////// diff --git a/common/Local/license.js b/common/Local/license.js new file mode 100644 index 0000000000000000000000000000000000000000..20f3236b5de552c9d091eb30f36a1ea3d69fa833 --- /dev/null +++ b/common/Local/license.js @@ -0,0 +1,36 @@ +/* + * + * (c) Copyright Ascensio System Limited 2010-2016 + * + * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU + * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). + * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that + * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR + * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html + * + * You can contact Ascensio System SIA by email at sales@onlyoffice.com + * + * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display + * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. + * + * Pursuant to Section 7 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains + * relevant author attributions when distributing the software. If the display of the logo in its graphic + * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" + * in every copy of the program you distribute. + * Pursuant to Section 7 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * +*/ +"use strict"; + +AscCommon.baseEditorsApi.prototype._onEndPermissions = function() +{ + if (this.isOnFirstConnectEnd && this.isOnLoadLicense) + { + var oResult = new AscCommon.asc_CAscEditorPermissions(); + oResult.asc_setCanLicense(true); + oResult.asc_setCanBranding(true); + this.sendEvent('asc_onGetEditorPermissions', oResult); + } +}; \ No newline at end of file