Add license error

This commit is contained in:
Julia Radzhabova 2018-09-07 13:22:03 +03:00
parent 12085b02ee
commit 3e79a19002
6 changed files with 85 additions and 4 deletions

View file

@ -181,6 +181,7 @@ define([
this.api.asc_registerCallback('asc_onPrintUrl', _.bind(this.onPrintUrl, this));
this.api.asc_registerCallback('asc_onMeta', _.bind(this.onMeta, this));
this.api.asc_registerCallback('asc_onSpellCheckInit', _.bind(this.loadLanguages, this));
this.api.asc_registerCallback('asc_onLicenseError', _.bind(this.onPaidFeatureError, this));
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
@ -1041,6 +1042,26 @@ define([
}
},
onPaidFeatureError: function() {
var buttons = [], primary,
mail = (this.appOptions.canBranding) ? ((this.editorConfig && this.editorConfig.customization && this.editorConfig.customization.customer) ? this.editorConfig.customization.customer.mail : '') : 'sales@onlyoffice.com';
if (mail.length>0) {
buttons.push({value: 'contact', caption: this.textContactUs});
primary = 'contact';
}
buttons.push({value: 'close', caption: this.textClose});
Common.UI.info({
title: this.textPaidFeature,
msg : this.textLicencePaidFeature,
buttons: buttons,
primary: primary,
callback: function(btn) {
if (btn == 'contact')
window.open('mailto:'+mail, "_blank");
}
});
},
onOpenDocument: function(progress) {
var elem = document.getElementById('loadmask-text');
var proc = (progress.asc_getCurrentFont() + progress.asc_getCurrentImage())/(progress.asc_getFontsCount() + progress.asc_getImagesCount());
@ -2218,7 +2239,7 @@ define([
textStrict: 'Strict mode',
txtErrorLoadHistory: 'Loading history failed',
textBuyNow: 'Visit website',
textNoLicenseTitle: 'ONLYOFFICE open source version',
textNoLicenseTitle: 'ONLYOFFICE connection limitation',
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.',
@ -2273,7 +2294,10 @@ define([
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.',
errorDataEncrypted: 'Encrypted changes have been received, they cannot be deciphered.'
errorDataEncrypted: 'Encrypted changes have been received, they cannot be deciphered.',
textClose: 'Close',
textPaidFeature: 'Paid feature',
textLicencePaidFeature: 'The feature you are trying to use is available for additional payment.<br>If you need it, please contact Sales Department'
}
})(), DE.Controllers.Main || {}))
});

View file

@ -462,6 +462,9 @@
"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.warnProcessRightsChange": "You have been denied the right to edit the file.",
"DE.Controllers.Main.textClose": "Close",
"DE.Controllers.Main.textPaidFeature": "Paid feature",
"DE.Controllers.Main.textLicencePaidFeature": "The feature you are trying to use is available for additional payment.<br>If you need it, please contact Sales Department",
"DE.Controllers.Navigation.txtBeginning": "Beginning of document",
"DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document",
"DE.Controllers.Statusbar.textHasChanges": "New changes have been tracked",

View file

@ -174,6 +174,7 @@ define([
this.api.asc_registerCallback('asc_onMeta', _.bind(this.onMeta, this));
this.api.asc_registerCallback('asc_onAdvancedOptions', _.bind(this.onAdvancedOptions, this));
this.api.asc_registerCallback('asc_onSpellCheckInit', _.bind(this.loadLanguages, this));
this.api.asc_registerCallback('asc_onLicenseError', _.bind(this.onPaidFeatureError, this));
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
@ -805,6 +806,26 @@ define([
}
},
onPaidFeatureError: function() {
var buttons = [], primary,
mail = (this.appOptions.canBranding) ? ((this.editorConfig && this.editorConfig.customization && this.editorConfig.customization.customer) ? this.editorConfig.customization.customer.mail : '') : 'sales@onlyoffice.com';
if (mail.length>0) {
buttons.push({value: 'contact', caption: this.textContactUs});
primary = 'contact';
}
buttons.push({value: 'close', caption: this.textClose});
Common.UI.info({
title: this.textPaidFeature,
msg : this.textLicencePaidFeature,
buttons: buttons,
primary: primary,
callback: function(btn) {
if (btn == 'contact')
window.open('mailto:'+mail, "_blank");
}
});
},
disableEditing: function(disable) {
var app = this.getApplication();
if (this.appOptions.canEdit && this.editorConfig.mode !== 'view') {
@ -2045,7 +2066,10 @@ define([
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.',
errorDataEncrypted: 'Encrypted changes have been received, they cannot be deciphered.'
errorDataEncrypted: 'Encrypted changes have been received, they cannot be deciphered.',
textClose: 'Close',
textPaidFeature: 'Paid feature',
textLicencePaidFeature: 'The feature you are trying to use is available for additional payment.<br>If you need it, please contact Sales Department'
}
})(), PE.Controllers.Main || {}))
});

View file

@ -400,6 +400,9 @@
"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.warnProcessRightsChange": "You have been denied the right to edit the file.",
"PE.Controllers.Main.textClose": "Close",
"PE.Controllers.Main.textPaidFeature": "Paid feature",
"PE.Controllers.Main.textLicencePaidFeature": "The feature you are trying to use is available for additional payment.<br>If you need it, please contact Sales Department",
"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?",
"PE.Controllers.Toolbar.textAccent": "Accents",

View file

@ -164,6 +164,7 @@ define([
this.api.asc_registerCallback('asc_onDocumentName', _.bind(this.onDocumentName, this));
this.api.asc_registerCallback('asc_onPrintUrl', _.bind(this.onPrintUrl, this));
this.api.asc_registerCallback('asc_onMeta', _.bind(this.onMeta, this));
this.api.asc_registerCallback('asc_onLicenseError', _.bind(this.onPaidFeatureError, this));
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
Common.NotificationCenter.on('namedrange:locked', _.bind(this.onNamedRangeLocked, this));
@ -831,6 +832,26 @@ define([
}
},
onPaidFeatureError: function() {
var buttons = [], primary,
mail = (this.appOptions.canBranding) ? ((this.editorConfig && this.editorConfig.customization && this.editorConfig.customization.customer) ? this.editorConfig.customization.customer.mail : '') : 'sales@onlyoffice.com';
if (mail.length>0) {
buttons.push({value: 'contact', caption: this.textContactUs});
primary = 'contact';
}
buttons.push({value: 'close', caption: this.textClose});
Common.UI.info({
title: this.textPaidFeature,
msg : this.textLicencePaidFeature,
buttons: buttons,
primary: primary,
callback: function(btn) {
if (btn == 'contact')
window.open('mailto:'+mail, "_blank");
}
});
},
disableEditing: function(disable) {
var app = this.getApplication();
if (this.appOptions.canEdit && this.editorConfig.mode !== 'view') {
@ -2224,7 +2245,10 @@ define([
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.',
errorDataEncrypted: 'Encrypted changes have been received, they cannot be deciphered.'
errorDataEncrypted: 'Encrypted changes have been received, they cannot be deciphered.',
textClose: 'Close',
textPaidFeature: 'Paid feature',
textLicencePaidFeature: 'The feature you are trying to use is available for additional payment.<br>If you need it, please contact Sales Department'
}
})(), SSE.Controllers.Main || {}))
});

View file

@ -534,6 +534,9 @@
"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.warnProcessRightsChange": "You have been denied the right to edit the file.",
"SSE.Controllers.Main.textClose": "Close",
"SSE.Controllers.Main.textPaidFeature": "Paid feature",
"SSE.Controllers.Main.textLicencePaidFeature": "The feature you are trying to use is available for additional payment.<br>If you need it, please contact Sales Department",
"SSE.Controllers.Print.strAllSheets": "All Sheets",
"SSE.Controllers.Print.textWarning": "Warning",
"SSE.Controllers.Print.warnCheckMargings": "Margins are incorrect",