Add license type ConnectionsOS, UsersCountOS

This commit is contained in:
Julia Radzhabova 2018-05-28 13:00:03 +03:00
parent 43af68c439
commit 0d49651ea7
12 changed files with 196 additions and 129 deletions

View file

@ -108,7 +108,7 @@ define([
weakCompare : function(obj1, obj2){return obj1.type === obj2.type;}
});
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseWarning: false};
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseType: false};
this.languages = null;
this.translationTable = [];
// Initialize viewport
@ -994,16 +994,27 @@ define([
onLicenseChanged: function(params) {
var licType = params.asc_getLicenseType();
if (licType !== undefined && (licType===Asc.c_oLicenseResult.Connections || licType===Asc.c_oLicenseResult.UsersCount) && this.appOptions.canEdit && this.editorConfig.mode !== 'view') {
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) ? this.warnNoLicense : this.warnNoLicenseUsers;
}
if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' &&
(licType===Asc.c_oLicenseResult.Connections || licType===Asc.c_oLicenseResult.UsersCount || licType===Asc.c_oLicenseResult.ConnectionsOS || licType===Asc.c_oLicenseResult.UsersCountOS))
this._state.licenseType = licType;
if (this._isDocReady)
this.applyLicense();
},
applyLicense: function() {
if (this._state.licenseWarning) {
if (this._state.licenseType) {
var license = this._state.licenseType,
buttons = ['ok'],
primary = 'ok';
if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) {
license = (license===Asc.c_oLicenseResult.Connections) ? this.warnLicenseExceeded : this.warnLicenseUsersExceeded;
} else {
license = (license===Asc.c_oLicenseResult.ConnectionsOS) ? this.warnNoLicense : this.warnNoLicenseUsers;
buttons = [{value: 'buynow', caption: this.textBuyNow}, {value: 'contact', caption: this.textContactUs}];
primary = 'buynow';
}
this.disableEditing(true);
Common.NotificationCenter.trigger('api:disconnect');
@ -1015,12 +1026,9 @@ define([
Common.UI.info({
width: 500,
title: this.textNoLicenseTitle,
msg : this._state.licenseWarning,
buttons: [
{value: 'buynow', caption: this.textBuyNow},
{value: 'contact', caption: this.textContactUs}
],
primary: 'buynow',
msg : license,
buttons: buttons,
primary: primary,
callback: function(btn) {
if (btn == 'buynow')
window.open('https://www.onlyoffice.com', "_blank");
@ -2192,7 +2200,6 @@ define([
txtErrorLoadHistory: 'Loading history failed',
textBuyNow: 'Visit website',
textNoLicenseTitle: 'ONLYOFFICE open source version',
warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider upgrading your current license or purchasing a commercial one.',
textContactUs: 'Contact sales',
errorViewerDisconnect: 'Connection is lost. You can still view the document,<br>but will not be able to download or print until the connection is restored.',
warnLicenseExp: 'Your license has expired.<br>Please update your license and refresh the page.',
@ -2240,10 +2247,13 @@ define([
txtOddPage: "Odd Page ",
txtSameAsPrev: "Same as Previous",
txtCurrentDocument: "Current Document",
warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider upgrading your current license or purchasing a commercial one.',
txtNoTableOfContents: "No table of contents entries found.",
txtTableOfContents: "Table of Contents",
errorForceSave: "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later."
errorForceSave: "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.",
warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.',
warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.',
warnLicenseExceeded: 'The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.',
warnLicenseUsersExceeded: 'The number of concurrent users has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.'
}
})(), DE.Controllers.Main || {}))
});

View file

@ -447,8 +447,10 @@
"DE.Controllers.Main.warnBrowserIE9": "The application has low capabilities on IE9. Use IE10 or higher",
"DE.Controllers.Main.warnBrowserZoom": "Your browser current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.",
"DE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
"DE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider upgrading your current license or purchasing a commercial one.",
"DE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider upgrading your current license or purchasing a commercial one.",
"DE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
"DE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
"DE.Controllers.Main.warnLicenseExceeded": "The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.",
"DE.Controllers.Main.warnLicenseUsersExceeded": "The number of concurrent users has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.",
"DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"DE.Controllers.Navigation.txtBeginning": "Beginning of document",
"DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document",

View file

@ -80,7 +80,7 @@ define([
usersCount : 1,
fastCoauth : true,
lostEditingRights : false,
licenseWarning : false
licenseType : false
};
// Initialize viewport
@ -568,17 +568,37 @@ define([
onLicenseChanged: function(params) {
var licType = params.asc_getLicenseType();
if (licType !== undefined && (licType===Asc.c_oLicenseResult.Connections || licType===Asc.c_oLicenseResult.UsersCount) && this.appOptions.canEdit && this.editorConfig.mode !== 'view') {
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) ? this.warnNoLicense : this.warnNoLicenseUsers;
}
if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' &&
(licType===Asc.c_oLicenseResult.Connections || licType===Asc.c_oLicenseResult.UsersCount || licType===Asc.c_oLicenseResult.ConnectionsOS || licType===Asc.c_oLicenseResult.UsersCountOS))
this._state.licenseType = licType;
if (this._isDocReady && this._state.licenseWarning)
if (this._isDocReady && this._state.licenseType)
this.applyLicense();
},
applyLicense: function() {
var me = this;
if (me._state.licenseWarning) {
if (this._state.licenseType) {
var license = this._state.licenseType,
buttons = [{text: 'OK'}];
if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) {
license = (license===Asc.c_oLicenseResult.Connections) ? this.warnLicenseExceeded : this.warnLicenseUsersExceeded;
} else {
license = (license===Asc.c_oLicenseResult.ConnectionsOS) ? this.warnNoLicense : this.warnNoLicenseUsers;
buttons = [{
text: me.textBuyNow,
bold: true,
onClick: function() {
window.open('https://www.onlyoffice.com', "_blank");
}
},
{
text: me.textContactUs,
onClick: function() {
window.open('mailto:sales@onlyoffice.com', "_blank");
}
}];
}
DE.getController('Toolbar').activateViewControls();
DE.getController('Toolbar').deactivateEditControls();
Common.NotificationCenter.trigger('api:disconnect');
@ -591,22 +611,8 @@ define([
Common.localStorage.setItem("de-license-warning", now);
uiApp.modal({
title: me.textNoLicenseTitle,
text : me._state.licenseWarning,
buttons: [
{
text: me.textBuyNow,
bold: true,
onClick: function() {
window.open('https://www.onlyoffice.com', "_blank");
}
},
{
text: me.textContactUs,
onClick: function() {
window.open('mailto:sales@onlyoffice.com', "_blank");
}
}
]
text : license,
buttons: buttons
});
}
} else
@ -1251,7 +1257,6 @@ define([
textTryUndoRedo: 'The Undo/Redo functions are disabled for the Fast co-editing mode.',
textBuyNow: 'Visit website',
textNoLicenseTitle: 'ONLYOFFICE open source version',
warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider upgrading your current license or purchasing a commercial one.',
textContactUs: 'Contact sales',
errorViewerDisconnect: 'Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.',
warnLicenseExp: 'Your license has expired.<br>Please update your license and refresh the page.',
@ -1292,8 +1297,11 @@ define([
txtStyle_footnote_text: 'Footnote Text',
txtHeader: "Header",
txtFooter: "Footer",
warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider upgrading your current license or purchasing a commercial one.',
txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset'
txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset',
warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.',
warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.',
warnLicenseExceeded: 'The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.',
warnLicenseUsersExceeded: 'The number of concurrent users has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.'
}
})(), DE.Controllers.Main || {}))
});

View file

@ -150,8 +150,10 @@
"DE.Controllers.Main.uploadImageTextText": "Uploading image...",
"DE.Controllers.Main.uploadImageTitleText": "Uploading Image",
"DE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
"DE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider upgrading your current license or purchasing a commercial one.",
"DE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider upgrading your current license or purchasing a commercial one.",
"DE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
"DE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
"DE.Controllers.Main.warnLicenseExceeded": "The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.",
"DE.Controllers.Main.warnLicenseUsersExceeded": "The number of concurrent users has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.",
"DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"DE.Controllers.Search.textNoTextFound": "Text not Found",
"DE.Controllers.Search.textReplaceAll": "Replace All",

View file

@ -102,7 +102,7 @@ define([
onLaunch: function() {
var me = this;
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseWarning: false};
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseType: false};
this.languages = null;
this.translationTable = [];
@ -759,16 +759,27 @@ define([
onLicenseChanged: function(params) {
var licType = params.asc_getLicenseType();
if (licType !== undefined && (licType===Asc.c_oLicenseResult.Connections || licType===Asc.c_oLicenseResult.UsersCount) && this.appOptions.canEdit && this.editorConfig.mode !== 'view') {
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) ? this.warnNoLicense : this.warnNoLicenseUsers;
}
if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' &&
(licType===Asc.c_oLicenseResult.Connections || licType===Asc.c_oLicenseResult.UsersCount || licType===Asc.c_oLicenseResult.ConnectionsOS || licType===Asc.c_oLicenseResult.UsersCountOS))
this._state.licenseType = licType;
if (this._isDocReady)
this.applyLicense();
},
applyLicense: function() {
if (this._state.licenseWarning) {
if (this._state.licenseType) {
var license = this._state.licenseType,
buttons = ['ok'],
primary = 'ok';
if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) {
license = (license===Asc.c_oLicenseResult.Connections) ? this.warnLicenseExceeded : this.warnLicenseUsersExceeded;
} else {
license = (license===Asc.c_oLicenseResult.ConnectionsOS) ? this.warnNoLicense : this.warnNoLicenseUsers;
buttons = [{value: 'buynow', caption: this.textBuyNow}, {value: 'contact', caption: this.textContactUs}];
primary = 'buynow';
}
this.disableEditing(true);
Common.NotificationCenter.trigger('api:disconnect');
@ -780,12 +791,9 @@ define([
Common.UI.info({
width: 500,
title: this.textNoLicenseTitle,
msg : this._state.licenseWarning,
buttons: [
{value: 'buynow', caption: this.textBuyNow},
{value: 'contact', caption: this.textContactUs}
],
primary: 'buynow',
msg : license,
buttons: buttons,
primary: primary,
callback: function(btn) {
if (btn == 'buynow')
window.open('https://www.onlyoffice.com', "_blank");
@ -1977,7 +1985,6 @@ define([
textStrict: 'Strict mode',
textBuyNow: 'Visit website',
textNoLicenseTitle: 'ONLYOFFICE open source version',
warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider upgrading your current license or purchasing a commercial one.',
textContactUs: 'Contact sales',
errorViewerDisconnect: 'Connection is lost. You can still view the document,<br>but will not be able to download or print until the connection is restored.',
warnLicenseExp: 'Your license has expired.<br>Please update your license and refresh the page.',
@ -2010,7 +2017,6 @@ define([
saveTextText: 'Saving document...',
txtLoading: 'Loading...',
txtAddNotes: 'Click to add notes',
warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider upgrading your current license or purchasing a commercial one.',
errorForceSave: "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.",
txtAddFirstSlide: 'Click to add first slide',
txtTheme_blank: 'Blank',
@ -2023,7 +2029,11 @@ define([
txtTheme_safari: 'Safari',
txtTheme_dotted: 'Dotted',
txtTheme_corner: 'Corner',
txtTheme_turtle: 'Turtle'
txtTheme_turtle: 'Turtle',
warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.',
warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.',
warnLicenseExceeded: 'The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.',
warnLicenseUsersExceeded: 'The number of concurrent users has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.'
}
})(), PE.Controllers.Main || {}))
});

View file

@ -386,8 +386,10 @@
"PE.Controllers.Main.warnBrowserIE9": "The application has low capabilities on IE9. Use IE10 or higher",
"PE.Controllers.Main.warnBrowserZoom": "Your browser current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.",
"PE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
"PE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider upgrading your current license or purchasing a commercial one.",
"PE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider upgrading your current license or purchasing a commercial one.",
"PE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
"PE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
"PE.Controllers.Main.warnLicenseExceeded": "The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.",
"PE.Controllers.Main.warnLicenseUsersExceeded": "The number of concurrent users has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.",
"PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"PE.Controllers.Statusbar.zoomText": "Zoom {0}%",
"PE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.<br>The text style will be displayed using one of the system fonts, the saved font will be used when it is available.<br>Do you want to continue?",

View file

@ -80,7 +80,7 @@ define([
usersCount : 1,
fastCoauth : true,
lostEditingRights : false,
licenseWarning : false
licenseType : false
};
// Initialize viewport
@ -523,17 +523,37 @@ define([
onLicenseChanged: function(params) {
var licType = params.asc_getLicenseType();
if (licType !== undefined && (licType===Asc.c_oLicenseResult.Connections || licType===Asc.c_oLicenseResult.UsersCount) && this.appOptions.canEdit && this.editorConfig.mode !== 'view') {
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) ? this.warnNoLicense : this.warnNoLicenseUsers;
}
if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' &&
(licType===Asc.c_oLicenseResult.Connections || licType===Asc.c_oLicenseResult.UsersCount || licType===Asc.c_oLicenseResult.ConnectionsOS || licType===Asc.c_oLicenseResult.UsersCountOS))
this._state.licenseType = licType;
if (this._isDocReady && this._state.licenseWarning)
if (this._isDocReady && this._state.licenseType)
this.applyLicense();
},
applyLicense: function() {
var me = this;
if (me._state.licenseWarning) {
if (this._state.licenseType) {
var license = this._state.licenseType,
buttons = [{text: 'OK'}];
if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) {
license = (license===Asc.c_oLicenseResult.Connections) ? this.warnLicenseExceeded : this.warnLicenseUsersExceeded;
} else {
license = (license===Asc.c_oLicenseResult.ConnectionsOS) ? this.warnNoLicense : this.warnNoLicenseUsers;
buttons = [{
text: me.textBuyNow,
bold: true,
onClick: function() {
window.open('https://www.onlyoffice.com', "_blank");
}
},
{
text: me.textContactUs,
onClick: function() {
window.open('mailto:sales@onlyoffice.com', "_blank");
}
}];
}
PE.getController('Toolbar').activateViewControls();
PE.getController('Toolbar').deactivateEditControls();
Common.NotificationCenter.trigger('api:disconnect');
@ -546,22 +566,8 @@ define([
Common.localStorage.setItem("pe-license-warning", now);
uiApp.modal({
title: me.textNoLicenseTitle,
text : me._state.licenseWarning,
buttons: [
{
text: me.textBuyNow,
bold: true,
onClick: function() {
window.open('https://www.onlyoffice.com', "_blank");
}
},
{
text: me.textContactUs,
onClick: function() {
window.open('mailto:sales@onlyoffice.com', "_blank");
}
}
]
text : license,
buttons: buttons
});
}
} else
@ -1252,7 +1258,6 @@ define([
textTryUndoRedo: 'The Undo/Redo functions are disabled for the Fast co-editing mode.',
textBuyNow: 'Visit website',
textNoLicenseTitle: 'ONLYOFFICE open source version',
warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider upgrading your current license or purchasing a commercial one.',
textContactUs: 'Contact sales',
errorViewerDisconnect: 'Connection is lost. You can still view the document,<br>but will not be able to download or print until the connection is restored.',
warnLicenseExp: 'Your license has expired.<br>Please update your license and refresh the page.',
@ -1285,8 +1290,11 @@ define([
txtSlideNumber: 'Slide number',
txtSlideSubtitle: 'Slide subtitle',
txtSlideTitle: 'Slide title',
warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider upgrading your current license or purchasing a commercial one.',
txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset'
txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset',
warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.',
warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.',
warnLicenseExceeded: 'The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.',
warnLicenseUsersExceeded: 'The number of concurrent users has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.'
}
})(), PE.Controllers.Main || {}))
});

View file

@ -204,8 +204,10 @@
"PE.Controllers.Main.uploadImageTextText": "Uploading image...",
"PE.Controllers.Main.uploadImageTitleText": "Uploading Image",
"PE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
"PE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider upgrading your current license or purchasing a commercial one.",
"PE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider upgrading your current license or purchasing a commercial one.",
"PE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
"PE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
"PE.Controllers.Main.warnLicenseExceeded": "The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.",
"PE.Controllers.Main.warnLicenseUsersExceeded": "The number of concurrent users has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.",
"PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"PE.Controllers.Search.textNoTextFound": "Text not Found",
"PE.Controllers.Settings.notcriticalErrorTitle": "Warning",

View file

@ -107,7 +107,7 @@ define([
// $(document.body).css('position', 'absolute');
var me = this;
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseWarning: false};
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseType: false};
this.translationTable = [];
if (!Common.Utils.isBrowserSupported()){
@ -786,16 +786,27 @@ define([
if (this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge) return;
var licType = params.asc_getLicenseType();
if (licType !== undefined && (licType===Asc.c_oLicenseResult.Connections || licType===Asc.c_oLicenseResult.UsersCount) && this.appOptions.canEdit && this.editorConfig.mode !== 'view') {
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) ? this.warnNoLicense : this.warnNoLicenseUsers;
}
if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' &&
(licType===Asc.c_oLicenseResult.Connections || licType===Asc.c_oLicenseResult.UsersCount || licType===Asc.c_oLicenseResult.ConnectionsOS || licType===Asc.c_oLicenseResult.UsersCountOS))
this._state.licenseType = licType;
if (this._isDocReady)
this.applyLicense();
},
applyLicense: function() {
if (this._state.licenseWarning) {
if (this._state.licenseType) {
var license = this._state.licenseType,
buttons = ['ok'],
primary = 'ok';
if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) {
license = (license===Asc.c_oLicenseResult.Connections) ? this.warnLicenseExceeded : this.warnLicenseUsersExceeded;
} else {
license = (license===Asc.c_oLicenseResult.ConnectionsOS) ? this.warnNoLicense : this.warnNoLicenseUsers;
buttons = [{value: 'buynow', caption: this.textBuyNow}, {value: 'contact', caption: this.textContactUs}];
primary = 'buynow';
}
this.disableEditing(true);
Common.NotificationCenter.trigger('api:disconnect');
@ -807,12 +818,9 @@ define([
Common.UI.info({
width: 500,
title: this.textNoLicenseTitle,
msg : this._state.licenseWarning,
buttons: [
{value: 'buynow', caption: this.textBuyNow},
{value: 'contact', caption: this.textContactUs}
],
primary: 'buynow',
msg : license,
buttons: buttons,
primary: primary,
callback: function(btn) {
if (btn == 'buynow')
window.open('https://www.onlyoffice.com', "_blank");
@ -2159,7 +2167,6 @@ define([
errorFrmlWrongReferences: 'The function refers to a sheet that does not exist.<br>Please check the data and try again.',
textBuyNow: 'Visit website',
textNoLicenseTitle: 'ONLYOFFICE open source version',
warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider upgrading your current license or purchasing a commercial one.',
textContactUs: 'Contact sales',
confirmPutMergeRange: 'The source data contains merged cells.<br>They will be unmerged before they are pasted into the table.',
errorViewerDisconnect: 'Connection is lost. You can still view the document,<br>but will not be able to download or print until the connection is restored.',
@ -2200,9 +2207,13 @@ define([
txtStyle_Currency: 'Currency',
txtStyle_Percent: 'Percent',
txtStyle_Comma: 'Comma',
warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider upgrading your current license or purchasing a commercial one.',
errorForceSave: "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.",
errorMaxPoints: "The maximum number of points in series per chart is 4096."
errorMaxPoints: "The maximum number of points in series per chart is 4096.",
warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.',
warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.',
warnLicenseExceeded: 'The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.',
warnLicenseUsersExceeded: 'The number of concurrent users has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.'
}
})(), SSE.Controllers.Main || {}))
});

View file

@ -495,8 +495,10 @@
"SSE.Controllers.Main.warnBrowserIE9": "The application has low capabilities on IE9. Use IE10 or higher",
"SSE.Controllers.Main.warnBrowserZoom": "Your browser current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.",
"SSE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
"SSE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider upgrading your current license or purchasing a commercial one.",
"SSE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider upgrading your current license or purchasing a commercial one.",
"SSE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
"SSE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
"SSE.Controllers.Main.warnLicenseExceeded": "The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.",
"SSE.Controllers.Main.warnLicenseUsersExceeded": "The number of concurrent users has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.",
"SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"SSE.Controllers.Print.strAllSheets": "All Sheets",
"SSE.Controllers.Print.textWarning": "Warning",

View file

@ -81,7 +81,7 @@ define([
usersCount : 1,
fastCoauth : true,
lostEditingRights : false,
licenseWarning : false
licenseType : false
};
// Initialize viewport
@ -552,17 +552,37 @@ define([
if (this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge) return;
var licType = params.asc_getLicenseType();
if (licType !== undefined && (licType===Asc.c_oLicenseResult.Connections || licType===Asc.c_oLicenseResult.UsersCount) && this.appOptions.canEdit && this.editorConfig.mode !== 'view') {
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) ? this.warnNoLicense : this.warnNoLicenseUsers;
}
if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' &&
(licType===Asc.c_oLicenseResult.Connections || licType===Asc.c_oLicenseResult.UsersCount || licType===Asc.c_oLicenseResult.ConnectionsOS || licType===Asc.c_oLicenseResult.UsersCountOS))
this._state.licenseType = licType;
if (this._isDocReady && this._state.licenseWarning)
if (this._isDocReady && this._state.licenseType)
this.applyLicense();
},
applyLicense: function() {
var me = this;
if (me._state.licenseWarning) {
if (this._state.licenseType) {
var license = this._state.licenseType,
buttons = [{text: 'OK'}];
if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) {
license = (license===Asc.c_oLicenseResult.Connections) ? this.warnLicenseExceeded : this.warnLicenseUsersExceeded;
} else {
license = (license===Asc.c_oLicenseResult.ConnectionsOS) ? this.warnNoLicense : this.warnNoLicenseUsers;
buttons = [{
text: me.textBuyNow,
bold: true,
onClick: function() {
window.open('https://www.onlyoffice.com', "_blank");
}
},
{
text: me.textContactUs,
onClick: function() {
window.open('mailto:sales@onlyoffice.com', "_blank");
}
}];
}
SSE.getController('Toolbar').activateViewControls();
SSE.getController('Toolbar').deactivateEditControls();
Common.NotificationCenter.trigger('api:disconnect');
@ -575,22 +595,8 @@ define([
Common.localStorage.setItem("sse-license-warning", now);
uiApp.modal({
title: me.textNoLicenseTitle,
text : me._state.licenseWarning,
buttons: [
{
text: me.textBuyNow,
bold: true,
onClick: function() {
window.open('https://www.onlyoffice.com', "_blank");
}
},
{
text: me.textContactUs,
onClick: function() {
window.open('mailto:sales@onlyoffice.com', "_blank");
}
}
]
text : license,
buttons: buttons
});
}
} else
@ -1396,7 +1402,6 @@ define([
txtErrorLoadHistory: 'Loading history failed',
textBuyNow: 'Visit website',
textNoLicenseTitle: 'ONLYOFFICE open source version',
warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider upgrading your current license or purchasing a commercial one.',
textContactUs: 'Contact sales',
errorViewerDisconnect: 'Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.',
warnLicenseExp: 'Your license has expired.<br>Please update your license and refresh the page.',
@ -1449,9 +1454,12 @@ define([
txtStyle_Currency: 'Currency',
txtStyle_Percent: 'Percent',
txtStyle_Comma: 'Comma',
warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider upgrading your current license or purchasing a commercial one.',
errorMaxPoints: 'The maximum number of points in series per chart is 4096.',
txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset'
txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset',
warnNoLicense: 'This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.',
warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.',
warnLicenseExceeded: 'The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.',
warnLicenseUsersExceeded: 'The number of concurrent users has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.'
}
})(), SSE.Controllers.Main || {}))
});

View file

@ -257,8 +257,10 @@
"SSE.Controllers.Main.uploadImageTextText": "Uploading image...",
"SSE.Controllers.Main.uploadImageTitleText": "Uploading Image",
"SSE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
"SSE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider upgrading your current license or purchasing a commercial one.",
"SSE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider upgrading your current license or purchasing a commercial one.",
"SSE.Controllers.Main.warnNoLicense": "This version of ONLYOFFICE Editors has certain limitations for concurrent connections to the document server.<br>If you need more please consider purchasing a commercial license.",
"SSE.Controllers.Main.warnNoLicenseUsers": "This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider purchasing a commercial license.",
"SSE.Controllers.Main.warnLicenseExceeded": "The number of concurrent connections to the document server has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.",
"SSE.Controllers.Main.warnLicenseUsersExceeded": "The number of concurrent users has been exceeded and the document will be opened for viewing only.<br>Please contact your administrator for more information.",
"SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"SSE.Controllers.Search.textNoTextFound": "Text not found",
"SSE.Controllers.Search.textReplaceAll": "Replace All",