Change warning when license limit reached

This commit is contained in:
Julia.Radzhabova
2025-08-05 22:27:21 +03:00
parent 762d2cb5e1
commit e3959b1fa6
21 changed files with 217 additions and 226 deletions

View File

@ -344,6 +344,7 @@ define([
textLink: props.link ? props.link.text : '',
closable: props.closable !== false, // true by default
showButton: props.showButton !== false, // true by default
textButton: props.textButton, // button text, Got it by default
automove: !!props.automove
});
props.tip.on({

View File

@ -197,8 +197,6 @@ define([
this.warnNoLicense = this.warnNoLicense.replace(/%1/g, '{{COMPANY_NAME}}');
this.warnNoLicenseUsers = this.warnNoLicenseUsers.replace(/%1/g, '{{COMPANY_NAME}}');
this.textNoLicenseTitle = this.textNoLicenseTitle.replace(/%1/g, '{{COMPANY_NAME}}');
this.warnLicenseExceeded = this.warnLicenseExceeded.replace(/%1/g, '{{COMPANY_NAME}}');
this.warnLicenseUsersExceeded = this.warnLicenseUsersExceeded.replace(/%1/g, '{{COMPANY_NAME}}');
},
onDocumentResize: function() {
@ -843,17 +841,21 @@ define([
});
} else if (this._state.licenseType) {
var license = this._state.licenseType,
title = this.textNoLicenseTitle,
buttons = ['ok'],
primary = 'ok';
primary = 'ok',
modal = false;
if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0 &&
(license===Asc.c_oLicenseResult.SuccessLimit || this.appOptions.permissionsLicense===Asc.c_oLicenseResult.SuccessLimit)) {
license = this.warnLicenseLimitedRenewed;
} else if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) {
license = (license===Asc.c_oLicenseResult.Connections) ? this.warnLicenseExceeded : this.warnLicenseUsersExceeded;
title = this.titleReadOnly;
license = (license===Asc.c_oLicenseResult.Connections) ? this.tipLicenseExceeded : this.tipLicenseUsersExceeded;
} else {
license = (license===Asc.c_oLicenseResult.ConnectionsOS) ? this.warnNoLicense : this.warnNoLicenseUsers;
buttons = [{value: 'buynow', caption: this.textBuyNow}, {value: 'contact', caption: this.textContactUs}];
primary = 'buynow';
modal = true;
}
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && this.appOptions.canFillForms) {
@ -861,25 +863,21 @@ define([
Common.NotificationCenter.trigger('api:disconnect');
}
var value = Common.localStorage.getItem("de-license-warning");
value = (value!==null) ? parseInt(value) : 0;
var now = (new Date).getTime();
if (now - value > 86400000) {
Common.UI.info({
maxwidth: 500,
title: this.textNoLicenseTitle,
msg : license,
buttons: buttons,
primary: primary,
callback: function(btn) {
Common.localStorage.setItem("de-license-warning", now);
if (btn == 'buynow')
window.open('{{PUBLISHER_URL}}', "_blank");
else if (btn == 'contact')
window.open('mailto:{{SALES_EMAIL}}', "_blank");
}
});
}
!modal ? Common.UI.TooltipManager.showTip({ step: 'licenseError', text: license, header: title, target: '#toolbar', maxwidth: 430,
automove: true, noHighlight: true, textButton: this.textContinue}) :
Common.UI.info({
maxwidth: 500,
title: title,
msg : license,
buttons: buttons,
primary: primary,
callback: function(btn) {
if (btn == 'buynow')
window.open('{{PUBLISHER_URL}}', "_blank");
else if (btn == 'contact')
window.open('mailto:{{SALES_EMAIL}}', "_blank");
}
});
}
},
@ -2289,8 +2287,6 @@ define([
errorUpdateVersion: 'The file version has been changed. The page will be reloaded.',
warnLicenseLimitedRenewed: 'License needs to be renewed.<br>You have a limited access to document editing functionality.<br>Please contact your administrator to get full access',
warnLicenseLimitedNoAccess: 'License expired.<br>You have no access to document editing functionality.<br>Please contact your administrator.',
warnLicenseExceeded: "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact your administrator to learn more.",
warnLicenseUsersExceeded: "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
warnNoLicense: "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact %1 sales team for personal upgrade terms.",
warnNoLicenseUsers: "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
textBuyNow: 'Visit website',
@ -2335,7 +2331,11 @@ define([
warnLicenseAnonymous: 'Access denied for anonymous users. This document will be opened for viewing only.',
textSubmitOk: 'Your PDF form has been saved in the Complete section. You can fill out this form again and send another result.',
textFilled: 'Filled',
savingText: 'Saving'
savingText: 'Saving',
tipLicenseExceeded: 'The document is open in read-only mode as the maximum number of simultaneous connections allowed by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.',
tipLicenseUsersExceeded: 'The document is open in read-only mode as the maximum number of users allowed to edit documents by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.',
titleReadOnly: 'Read-Only Mode',
textContinue: 'Continue'
}, DE.Controllers.ApplicationController));
});

View File

@ -166,14 +166,18 @@
"DE.Controllers.ApplicationController.waitText": "Please, wait...",
"DE.Controllers.ApplicationController.warnLicenseAnonymous": "Access denied for anonymous users.<br>This document will be opened for viewing only.",
"DE.Controllers.ApplicationController.warnLicenseBefore": "License not active.<br>Please contact your administrator.",
"DE.Controllers.ApplicationController.warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact your administrator to learn more.",
"del_DE.Controllers.ApplicationController.warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact your administrator to learn more.",
"DE.Controllers.ApplicationController.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
"DE.Controllers.ApplicationController.warnLicenseLimitedNoAccess": "License expired.<br>You have no access to document editing functionality.<br>Please contact your administrator.",
"DE.Controllers.ApplicationController.warnLicenseLimitedRenewed": "License needs to be renewed.<br>You have a limited access to document editing functionality.<br>Please contact your administrator to get full access",
"DE.Controllers.ApplicationController.warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"del_DE.Controllers.ApplicationController.warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"DE.Controllers.ApplicationController.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact %1 sales team for personal upgrade terms.",
"DE.Controllers.ApplicationController.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"DE.Controllers.ApplicationController.warnStartFilling": "Form filling is in progress.<br>File editing is not currently available.",
"DE.Controllers.ApplicationController.tipLicenseExceeded": "The document is open in read-only mode as the maximum number of simultaneous connections allowed by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.",
"DE.Controllers.ApplicationController.tipLicenseUsersExceeded": "The document is open in read-only mode as the maximum number of users allowed to edit documents by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.",
"DE.Controllers.ApplicationController.titleReadOnly": "Read-Only Mode",
"DE.Controllers.ApplicationController.textContinue": "Continue",
"DE.Views.ApplicationView.textClear": "Clear all fields",
"DE.Views.ApplicationView.textClearField": "Clear field",
"DE.Views.ApplicationView.textClose": "Close file",

View File

@ -394,8 +394,6 @@ define([
me.warnNoLicense = (me.warnNoLicense || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.warnNoLicenseUsers = (me.warnNoLicenseUsers || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.textNoLicenseTitle = (me.textNoLicenseTitle || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.warnLicenseExceeded = (me.warnLicenseExceeded || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.warnLicenseUsersExceeded = (me.warnLicenseUsersExceeded || '').replace(/%1/g, '{{COMPANY_NAME}}');
},
loadConfig: function(data) {
@ -1601,17 +1599,21 @@ define([
});
} else if (this._state.licenseType) {
var license = this._state.licenseType,
title = this.textNoLicenseTitle,
buttons = ['ok'],
primary = 'ok';
primary = 'ok',
modal = false;
if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0 &&
(license===Asc.c_oLicenseResult.SuccessLimit || this.appOptions.permissionsLicense===Asc.c_oLicenseResult.SuccessLimit)) {
license = this.warnLicenseLimitedRenewed;
} else if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) {
license = (license===Asc.c_oLicenseResult.Connections) ? this.warnLicenseExceeded : this.warnLicenseUsersExceeded;
title = this.titleReadOnly;
license = (license===Asc.c_oLicenseResult.Connections) ? this.tipLicenseExceeded : this.tipLicenseUsersExceeded;
} else {
license = (license===Asc.c_oLicenseResult.ConnectionsOS) ? this.warnNoLicense : this.warnNoLicenseUsers;
buttons = [{value: 'buynow', caption: this.textBuyNow}, {value: 'contact', caption: this.textContactUs}];
primary = 'buynow';
modal = true;
}
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.isEdit || this.appOptions.isRestrictedEdit)) {
@ -1620,25 +1622,21 @@ define([
Common.NotificationCenter.trigger('api:disconnect');
}
var value = Common.localStorage.getItem("de-license-warning");
value = (value!==null) ? parseInt(value) : 0;
var now = (new Date).getTime();
if (now - value > 86400000) {
Common.UI.info({
maxwidth: 500,
title: this.textNoLicenseTitle,
msg : license,
buttons: buttons,
primary: primary,
callback: function(btn) {
Common.localStorage.setItem("de-license-warning", now);
if (btn == 'buynow')
window.open('{{PUBLISHER_URL}}', "_blank");
else if (btn == 'contact')
window.open('mailto:{{SALES_EMAIL}}', "_blank");
}
});
}
!modal ? Common.UI.TooltipManager.showTip({ step: 'licenseError', text: license, header: title, target: '#toolbar', maxwidth: 430,
automove: true, noHighlight: true, textButton: this.textContinue}) :
Common.UI.info({
maxwidth: 500,
title: title,
msg : license,
buttons: buttons,
primary: primary,
callback: function(btn) {
if (btn == 'buynow')
window.open('{{PUBLISHER_URL}}', "_blank");
else if (btn == 'contact')
window.open('mailto:{{SALES_EMAIL}}', "_blank");
}
});
} else if (!this.appOptions.isDesktopApp && !this.appOptions.canBrandingExt &&
this.editorConfig && this.editorConfig.customization && (this.editorConfig.customization.loaderName || this.editorConfig.customization.loaderLogo ||
this.editorConfig.customization.font && (this.editorConfig.customization.font.size || this.editorConfig.customization.font.name))) {

View File

@ -1392,15 +1392,18 @@
"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.warnLicenseAnonymous": "Access denied for anonymous users.<br>This document will be opened for viewing only.",
"DE.Controllers.Main.warnLicenseBefore": "License not active.<br>Please contact your administrator.",
"DE.Controllers.Main.warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact your administrator to learn more.",
"del_DE.Controllers.Main.warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact your administrator to learn more.",
"DE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
"DE.Controllers.Main.warnLicenseLimitedNoAccess": "License expired.<br>You have no access to document editing functionality.<br>Please contact your administrator.",
"DE.Controllers.Main.warnLicenseLimitedRenewed": "License needs to be renewed.<br>You have a limited access to document editing functionality.<br>Please contact your administrator to get full access",
"DE.Controllers.Main.warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"del_DE.Controllers.Main.warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"DE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact %1 sales team for personal upgrade terms.",
"DE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"DE.Controllers.Main.warnStartFilling": "Form filling is in progress.<br>File editing is not currently available.",
"DE.Controllers.Main.tipLicenseExceeded": "The document is open in read-only mode as the maximum number of simultaneous connections allowed by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.",
"DE.Controllers.Main.tipLicenseUsersExceeded": "The document is open in read-only mode as the maximum number of users allowed to edit documents by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.",
"DE.Controllers.Main.titleReadOnly": "Read-Only Mode",
"DE.Controllers.Navigation.txtBeginning": "Beginning of document",
"DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document",
"DE.Controllers.Print.textMarginsLast": "Last Custom",

View File

@ -661,14 +661,17 @@
"warnDownloadAsPdf": "Your {0} will be converted to an editable format. This may take a while. The resulting document will be optimized to allow you to edit the text, so it might not look exactly like the original {0}, especially if the original file contained lots of graphics.",
"warnLicenseAnonymous": "Access denied for anonymous users.<br>This document will be opened for viewing only.",
"warnLicenseBefore": "License not active.<br>Please contact your administrator.",
"warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact your administrator to learn more.",
"del_warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact your administrator to learn more.",
"warnLicenseExp": "Your license has expired. Please, update your license and refresh the page.",
"warnLicenseLimitedNoAccess": "License expired. You have no access to document editing functionality. Please, contact your admin.",
"warnLicenseLimitedRenewed": "License needs to be renewed. You have limited access to document editing functionality.<br>Please contact your administrator to get full access",
"warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"del_warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact %1 sales team for personal upgrade terms.",
"warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"warnProcessRightsChange": "You don't have permission to edit this file."
"warnProcessRightsChange": "You don't have permission to edit this file.",
"titleReadOnly": "Read-Only Mode",
"tipLicenseExceeded": "The document is open in read-only mode as the maximum number of simultaneous connections allowed by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.",
"tipLicenseUsersExceeded": "The document is open in read-only mode as the maximum number of users allowed to edit documents by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access."
},
"Settings": {
"advDRMOptions": "Protected File",

View File

@ -686,8 +686,6 @@ class MainController extends Component {
const warnNoLicense = _t.warnNoLicense.replace(/%1/g, __COMPANY_NAME__);
const warnNoLicenseUsers = _t.warnNoLicenseUsers.replace(/%1/g, __COMPANY_NAME__);
const textNoLicenseTitle = _t.textNoLicenseTitle.replace(/%1/g, __COMPANY_NAME__);
const warnLicenseExceeded = _t.warnLicenseExceeded.replace(/%1/g, __COMPANY_NAME__);
const warnLicenseUsersExceeded = _t.warnLicenseUsersExceeded.replace(/%1/g, __COMPANY_NAME__);
const appOptions = this.props.storeAppOptions;
const isForm = appOptions.isForm;
@ -729,13 +727,15 @@ class MainController extends Component {
} else if (this._state.licenseType) {
let license = this._state.licenseType;
let buttons = [{ text: _t.textOk }];
let title = textNoLicenseTitle;
if ((appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0 &&
(license === Asc.c_oLicenseResult.SuccessLimit ||
appOptions.permissionsLicense === Asc.c_oLicenseResult.SuccessLimit)
) {
license = _t.warnLicenseLimitedRenewed;
} else if (license === Asc.c_oLicenseResult.Connections || license === Asc.c_oLicenseResult.UsersCount) {
license = (license===Asc.c_oLicenseResult.Connections) ? warnLicenseExceeded : warnLicenseUsersExceeded;
title = _t.titleReadOnly;
license = (license===Asc.c_oLicenseResult.Connections) ? _t.tipLicenseExceeded : _t.tipLicenseUsersExceeded;
} else {
license = (license === Asc.c_oLicenseResult.ConnectionsOS) ? warnNoLicense : warnNoLicenseUsers;
buttons = [{
@ -761,18 +761,11 @@ class MainController extends Component {
Common.Notifications.trigger('api:disconnect');
}
let value = LocalStorage.getItem("de-license-warning");
value = (value !== null) ? parseInt(value) : 0;
const now = (new Date).getTime();
if (now - value > 86400000) {
LocalStorage.setItem("de-license-warning", now);
f7.dialog.create({
title: textNoLicenseTitle,
text : license,
buttons: buttons
}).open();
}
f7.dialog.create({
title: title,
text : license,
buttons: buttons
}).open();
} else {
if (!appOptions.isDesktopApp && !appOptions.canBrandingExt &&
appOptions.config && appOptions.config.customization && (appOptions.config.customization.loaderName || appOptions.config.customization.loaderLogo)) {

View File

@ -336,8 +336,6 @@ define([
me.warnNoLicense = (me.warnNoLicense || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.warnNoLicenseUsers = (me.warnNoLicenseUsers || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.textNoLicenseTitle = (me.textNoLicenseTitle || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.warnLicenseExceeded = (me.warnLicenseExceeded || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.warnLicenseUsersExceeded = (me.warnLicenseUsersExceeded || '').replace(/%1/g, '{{COMPANY_NAME}}');
},
loadConfig: function(data) {
@ -1225,17 +1223,21 @@ define([
});
} else if (this._state.licenseType) {
var license = this._state.licenseType,
title = this.textNoLicenseTitle,
buttons = ['ok'],
primary = 'ok';
primary = 'ok',
modal = false;
if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0 &&
(license===Asc.c_oLicenseResult.SuccessLimit || this.appOptions.permissionsLicense===Asc.c_oLicenseResult.SuccessLimit)) {
license = this.warnLicenseLimitedRenewed;
} else if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) {
license = (license===Asc.c_oLicenseResult.Connections) ? this.warnLicenseExceeded : this.warnLicenseUsersExceeded;
title = this.titleReadOnly;
license = (license===Asc.c_oLicenseResult.Connections) ? this.tipLicenseExceeded : this.tipLicenseUsersExceeded;
} else {
license = (license===Asc.c_oLicenseResult.ConnectionsOS) ? this.warnNoLicense : this.warnNoLicenseUsers;
buttons = [{value: 'buynow', caption: this.textBuyNow}, {value: 'contact', caption: this.textContactUs}];
primary = 'buynow';
modal = true;
}
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.isPDFFill || this.appOptions.isPDFAnnotate || this.appOptions.isPDFEdit || this.appOptions.isRestrictedEdit)) {
@ -1244,25 +1246,21 @@ define([
Common.NotificationCenter.trigger('api:disconnect');
}
var value = Common.localStorage.getItem("pdfe-license-warning");
value = (value!==null) ? parseInt(value) : 0;
var now = (new Date).getTime();
if (now - value > 86400000) {
Common.UI.info({
maxwidth: 500,
title: this.textNoLicenseTitle,
msg : license,
buttons: buttons,
primary: primary,
callback: function(btn) {
Common.localStorage.setItem("pdfe-license-warning", now);
if (btn == 'buynow')
window.open('{{PUBLISHER_URL}}', "_blank");
else if (btn == 'contact')
window.open('mailto:{{SALES_EMAIL}}', "_blank");
}
});
}
!modal ? Common.UI.TooltipManager.showTip({ step: 'licenseError', text: license, header: title, target: '#toolbar', maxwidth: 430,
automove: true, noHighlight: true, textButton: this.textContinue}) :
Common.UI.info({
maxwidth: 500,
title: title,
msg : license,
buttons: buttons,
primary: primary,
callback: function(btn) {
if (btn == 'buynow')
window.open('{{PUBLISHER_URL}}', "_blank");
else if (btn == 'contact')
window.open('mailto:{{SALES_EMAIL}}', "_blank");
}
});
} else if (!this.appOptions.isDesktopApp && !this.appOptions.canBrandingExt &&
this.editorConfig && this.editorConfig.customization && (this.editorConfig.customization.loaderName || this.editorConfig.customization.loaderLogo ||
this.editorConfig.customization.font && (this.editorConfig.customization.font.size || this.editorConfig.customization.font.name))) {

View File

@ -1024,14 +1024,17 @@
"PDFE.Controllers.Main.warnBrowserZoom": "Your browser current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.",
"PDFE.Controllers.Main.warnLicenseAnonymous": "Access denied for anonymous users.<br>This document will be opened for viewing only.",
"PDFE.Controllers.Main.warnLicenseBefore": "License not active.<br>Please contact your administrator.",
"PDFE.Controllers.Main.warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact your administrator to learn more.",
"del_PDFE.Controllers.Main.warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact your administrator to learn more.",
"PDFE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
"PDFE.Controllers.Main.warnLicenseLimitedNoAccess": "License expired.<br>You have no access to document editing functionality.<br>Please contact your administrator.",
"PDFE.Controllers.Main.warnLicenseLimitedRenewed": "License needs to be renewed.<br>You have a limited access to document editing functionality.<br>Please contact your administrator to get full access",
"PDFE.Controllers.Main.warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"del_PDFE.Controllers.Main.warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"PDFE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact %1 sales team for personal upgrade terms.",
"PDFE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"PDFE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"PDFE.Controllers.Main.tipLicenseExceeded": "The document is open in read-only mode as the maximum number of simultaneous connections allowed by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.",
"PDFE.Controllers.Main.tipLicenseUsersExceeded": "The document is open in read-only mode as the maximum number of users allowed to edit documents by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.",
"PDFE.Controllers.Main.titleReadOnly": "Read-Only Mode",
"PDFE.Controllers.Navigation.txtBeginning": "Beginning of document",
"PDFE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document",
"PDFE.Controllers.Print.textMarginsLast": "Last custom",

View File

@ -367,8 +367,6 @@ define([
me.warnNoLicense = (me.warnNoLicense || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.warnNoLicenseUsers = (me.warnNoLicenseUsers || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.textNoLicenseTitle = (me.textNoLicenseTitle || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.warnLicenseExceeded = (me.warnLicenseExceeded || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.warnLicenseUsersExceeded = (me.warnLicenseUsersExceeded || '').replace(/%1/g, '{{COMPANY_NAME}}');
},
loadConfig: function(data) {
@ -1171,17 +1169,21 @@ define([
});
} else if (this._state.licenseType) {
var license = this._state.licenseType,
title = this.textNoLicenseTitle,
buttons = ['ok'],
primary = 'ok';
primary = 'ok',
modal = false;
if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0 &&
(license===Asc.c_oLicenseResult.SuccessLimit || this.appOptions.permissionsLicense===Asc.c_oLicenseResult.SuccessLimit)) {
license = this.warnLicenseLimitedRenewed;
} else if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) {
license = (license===Asc.c_oLicenseResult.Connections) ? this.warnLicenseExceeded : this.warnLicenseUsersExceeded;
title = this.titleReadOnly;
license = (license===Asc.c_oLicenseResult.Connections) ? this.tipLicenseExceeded : this.tipLicenseUsersExceeded;
} else {
license = (license===Asc.c_oLicenseResult.ConnectionsOS) ? this.warnNoLicense : this.warnNoLicenseUsers;
buttons = [{value: 'buynow', caption: this.textBuyNow}, {value: 'contact', caption: this.textContactUs}];
primary = 'buynow';
modal = true;
}
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.isEdit || this.appOptions.isRestrictedEdit)) {
@ -1190,25 +1192,21 @@ define([
Common.NotificationCenter.trigger('api:disconnect');
}
var value = Common.localStorage.getItem("pe-license-warning");
value = (value!==null) ? parseInt(value) : 0;
var now = (new Date).getTime();
if (now - value > 86400000) {
Common.UI.info({
maxwidth: 500,
title: this.textNoLicenseTitle,
msg : license,
buttons: buttons,
primary: primary,
callback: function(btn) {
Common.localStorage.setItem("pe-license-warning", now);
if (btn == 'buynow')
window.open('{{PUBLISHER_URL}}', "_blank");
else if (btn == 'contact')
window.open('mailto:{{SALES_EMAIL}}', "_blank");
}
});
}
!modal ? Common.UI.TooltipManager.showTip({ step: 'licenseError', text: license, header: title, target: '#toolbar', maxwidth: 430,
automove: true, noHighlight: true, textButton: this.textContinue}) :
Common.UI.info({
maxwidth: 500,
title: title,
msg : license,
buttons: buttons,
primary: primary,
callback: function(btn) {
if (btn == 'buynow')
window.open('{{PUBLISHER_URL}}', "_blank");
else if (btn == 'contact')
window.open('mailto:{{SALES_EMAIL}}', "_blank");
}
});
} else if (!this.appOptions.isDesktopApp && !this.appOptions.canBrandingExt &&
this.editorConfig && this.editorConfig.customization && (this.editorConfig.customization.loaderName || this.editorConfig.customization.loaderLogo ||
this.editorConfig.customization.font && (this.editorConfig.customization.font.size || this.editorConfig.customization.font.name))) {

View File

@ -1443,14 +1443,17 @@
"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.warnLicenseAnonymous": "Access denied for anonymous users.<br>This document will be opened for viewing only.",
"PE.Controllers.Main.warnLicenseBefore": "License not active.<br>Please contact your administrator.",
"PE.Controllers.Main.warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact your administrator to learn more.",
"del_PE.Controllers.Main.warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact your administrator to learn more.",
"PE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
"PE.Controllers.Main.warnLicenseLimitedNoAccess": "License expired.<br>You have no access to document editing functionality.<br>Please contact your administrator.",
"PE.Controllers.Main.warnLicenseLimitedRenewed": "License needs to be renewed.<br>You have a limited access to document editing functionality.<br>Please contact your administrator to get full access",
"PE.Controllers.Main.warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"del_PE.Controllers.Main.warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"PE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact %1 sales team for personal upgrade terms.",
"PE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"PE.Controllers.Main.tipLicenseExceeded": "The document is open in read-only mode as the maximum number of simultaneous connections allowed by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.",
"PE.Controllers.Main.tipLicenseUsersExceeded": "The document is open in read-only mode as the maximum number of users allowed to edit documents by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.",
"PE.Controllers.Main.titleReadOnly": "Read-Only Mode",
"PE.Controllers.Print.txtPrintRangeInvalid": "Invalid print range",
"PE.Controllers.Print.txtPrintRangeSingleRange": "Enter either a single slide number or a single slide range (for example, 5-12). Or you can Print to PDF.",
"PE.Controllers.Search.notcriticalErrorTitle": "Warning",

View File

@ -173,14 +173,17 @@
"txtProtected": "Once you enter the password and open the file, the current password to the file will be reset",
"warnLicenseAnonymous": "Access denied for anonymous users.<br>This document will be opened for viewing only.",
"warnLicenseBefore": "License not active.<br>Please contact your administrator.",
"warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact your administrator to learn more.",
"del_warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact your administrator to learn more.",
"warnLicenseExp": "Your license has expired. Please, update your license and refresh the page.",
"warnLicenseLimitedNoAccess": "License expired. You have no access to document editing functionality. Please, contact your administrator.",
"warnLicenseLimitedRenewed": "License needs to be renewed. You have limited access to document editing functionality.<br>Please contact your administrator to get full access",
"warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"del_warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact %1 sales team for personal upgrade terms.",
"warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"warnProcessRightsChange": "You don't have permission to edit the file."
"warnProcessRightsChange": "You don't have permission to edit the file.",
"titleReadOnly": "Read-Only Mode",
"tipLicenseExceeded": "The document is open in read-only mode as the maximum number of simultaneous connections allowed by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.",
"tipLicenseUsersExceeded": "The document is open in read-only mode as the maximum number of users allowed to edit documents by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access."
}
},
"Draw": {

View File

@ -670,8 +670,6 @@ class MainController extends Component {
const warnNoLicense = _t.warnNoLicense.replace(/%1/g, __COMPANY_NAME__);
const warnNoLicenseUsers = _t.warnNoLicenseUsers.replace(/%1/g, __COMPANY_NAME__);
const textNoLicenseTitle = _t.textNoLicenseTitle.replace(/%1/g, __COMPANY_NAME__);
const warnLicenseExceeded = _t.warnLicenseExceeded.replace(/%1/g, __COMPANY_NAME__);
const warnLicenseUsersExceeded = _t.warnLicenseUsersExceeded.replace(/%1/g, __COMPANY_NAME__);
const appOptions = this.props.storeAppOptions;
if (appOptions.config.mode !== 'view' && !EditorUIController.isSupportEditFeature()) {
@ -711,13 +709,15 @@ class MainController extends Component {
} else if (this._state.licenseType) {
let license = this._state.licenseType;
let buttons = [{ text: _t.textOk }];
let title = textNoLicenseTitle;
if ((appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0 &&
(license === Asc.c_oLicenseResult.SuccessLimit ||
appOptions.permissionsLicense === Asc.c_oLicenseResult.SuccessLimit)
) {
license = _t.warnLicenseLimitedRenewed;
} else if (license === Asc.c_oLicenseResult.Connections || license === Asc.c_oLicenseResult.UsersCount) {
license = (license===Asc.c_oLicenseResult.Connections) ? warnLicenseExceeded : warnLicenseUsersExceeded;
title = _t.titleReadOnly;
license = (license===Asc.c_oLicenseResult.Connections) ? _t.tipLicenseExceeded : _t.tipLicenseUsersExceeded;
} else {
license = (license === Asc.c_oLicenseResult.ConnectionsOS) ? warnNoLicense : warnNoLicenseUsers;
buttons = [{
@ -743,18 +743,11 @@ class MainController extends Component {
Common.Notifications.trigger('api:disconnect');
}
let value = LocalStorage.getItem("pe-license-warning");
value = (value !== null) ? parseInt(value) : 0;
const now = (new Date).getTime();
if (now - value > 86400000) {
LocalStorage.setItem("pe-license-warning", now);
f7.dialog.create({
title: textNoLicenseTitle,
text : license,
buttons: buttons
}).open();
}
f7.dialog.create({
title: title,
text : license,
buttons: buttons
}).open();
} else {
if (!appOptions.isDesktopApp && !appOptions.canBrandingExt &&
appOptions.config && appOptions.config.customization && (appOptions.config.customization.loaderName || appOptions.config.customization.loaderLogo)) {

View File

@ -398,9 +398,6 @@ define([
me.warnNoLicense = (me.warnNoLicense || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.warnNoLicenseUsers = (me.warnNoLicenseUsers || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.textNoLicenseTitle = (me.textNoLicenseTitle || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.warnLicenseExceeded = (me.warnLicenseExceeded || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.warnLicenseUsersExceeded = (me.warnLicenseUsersExceeded || '').replace(/%1/g, '{{COMPANY_NAME}}');
Common.NotificationCenter.on('script:loaded', _.bind(me.onPostLoadComplete, me));
},
@ -1238,17 +1235,21 @@ define([
});
} else if (this._state.licenseType) {
var license = this._state.licenseType,
title = this.textNoLicenseTitle,
buttons = ['ok'],
primary = 'ok';
primary = 'ok',
modal = false;
if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0 &&
(license===Asc.c_oLicenseResult.SuccessLimit || this.appOptions.permissionsLicense===Asc.c_oLicenseResult.SuccessLimit)) {
license = this.warnLicenseLimitedRenewed;
} else if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) {
license = (license===Asc.c_oLicenseResult.Connections) ? this.warnLicenseExceeded : this.warnLicenseUsersExceeded;
title = this.titleReadOnly;
license = (license===Asc.c_oLicenseResult.Connections) ? this.tipLicenseExceeded : this.tipLicenseUsersExceeded;
} else {
license = (license===Asc.c_oLicenseResult.ConnectionsOS) ? this.warnNoLicense : this.warnNoLicenseUsers;
buttons = [{value: 'buynow', caption: this.textBuyNow}, {value: 'contact', caption: this.textContactUs}];
primary = 'buynow';
modal = true;
}
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.isEdit || this.appOptions.isRestrictedEdit)) {
@ -1257,25 +1258,21 @@ define([
Common.NotificationCenter.trigger('api:disconnect');
}
var value = Common.localStorage.getItem("sse-license-warning");
value = (value!==null) ? parseInt(value) : 0;
var now = (new Date).getTime();
if (now - value > 86400000) {
Common.UI.info({
maxwidth: 500,
title: this.textNoLicenseTitle,
msg : license,
buttons: buttons,
primary: primary,
callback: function(btn) {
Common.localStorage.setItem("sse-license-warning", now);
if (btn == 'buynow')
window.open('{{PUBLISHER_URL}}', "_blank");
else if (btn == 'contact')
window.open('mailto:{{SALES_EMAIL}}', "_blank");
}
});
}
!modal ? Common.UI.TooltipManager.showTip({ step: 'licenseError', text: license, header: title, target: '#toolbar', maxwidth: 430,
automove: true, noHighlight: true, textButton: this.textContinue}) :
Common.UI.info({
maxwidth: 500,
title: title,
msg : license,
buttons: buttons,
primary: primary,
callback: function(btn) {
if (btn == 'buynow')
window.open('{{PUBLISHER_URL}}', "_blank");
else if (btn == 'contact')
window.open('mailto:{{SALES_EMAIL}}', "_blank");
}
});
} else if (!this.appOptions.isDesktopApp && !this.appOptions.canBrandingExt && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle) &&
this.editorConfig && this.editorConfig.customization && (this.editorConfig.customization.loaderName || this.editorConfig.customization.loaderLogo ||
this.editorConfig.customization.font && (this.editorConfig.customization.font.size || this.editorConfig.customization.font.name))) {

View File

@ -1569,14 +1569,17 @@
"SSE.Controllers.Main.warnExternalChartProtected": "This chart is based on data from an external file. In this window, you can only select data to display in the chart. To edit the spreadsheet, open it in the spreadsheet editor.",
"SSE.Controllers.Main.warnLicenseAnonymous": "Access denied for anonymous users.<br>This document will be opened for viewing only.",
"SSE.Controllers.Main.warnLicenseBefore": "License not active.<br>Please contact your administrator.",
"SSE.Controllers.Main.warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact your administrator to learn more.",
"del_SSE.Controllers.Main.warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact your administrator to learn more.",
"SSE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
"SSE.Controllers.Main.warnLicenseLimitedNoAccess": "License expired.<br>You have no access to document editing functionality.<br>Please contact your administrator.",
"SSE.Controllers.Main.warnLicenseLimitedRenewed": "License needs to be renewed.<br>You have a limited access to document editing functionality.<br>Please contact your administrator to get full access",
"SSE.Controllers.Main.warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"del_SSE.Controllers.Main.warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"SSE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact %1 sales team for personal upgrade terms.",
"SSE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"SSE.Controllers.Main.tipLicenseExceeded": "The document is open in read-only mode as the maximum number of simultaneous connections allowed by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.",
"SSE.Controllers.Main.tipLicenseUsersExceeded": "The document is open in read-only mode as the maximum number of users allowed to edit documents by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.",
"SSE.Controllers.Main.titleReadOnly": "Read-Only Mode",
"SSE.Controllers.PivotTable.strSheet": "Sheet",
"SSE.Controllers.PivotTable.txtCalculatedItemInPageField": "The item cannot be added or modified. PivotTable report has this field in Filters.",
"SSE.Controllers.PivotTable.txtCalculatedItemWarningDefault": "No actions with calculated items are allowed for this active cell.",

View File

@ -238,14 +238,17 @@
"titleUpdateVersion": "Version changed",
"warnLicenseAnonymous": "Access denied for anonymous users.<br>This document will be opened for viewing only.",
"warnLicenseBefore": "License not active.<br>Please contact your administrator.",
"warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact your administrator to learn more.",
"del_warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact your administrator to learn more.",
"warnLicenseExp": "Your license has expired. Please, update your license and refresh the page.",
"warnLicenseLimitedNoAccess": "License expired. You have no access to document editing functionality. Please, contact your admin.",
"warnLicenseLimitedRenewed": "License needs to be renewed. You have limited access to document editing functionality.<br>Please contact your administrator to get full access",
"warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"del_warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact %1 sales team for personal upgrade terms.",
"warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"warnProcessRightsChange": "You don't have permission to edit the file."
"warnProcessRightsChange": "You don't have permission to edit the file.",
"titleReadOnly": "Read-Only Mode",
"tipLicenseExceeded": "The document is open in read-only mode as the maximum number of simultaneous connections allowed by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.",
"tipLicenseUsersExceeded": "The document is open in read-only mode as the maximum number of users allowed to edit documents by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access."
}
},
"Draw": {

View File

@ -855,8 +855,6 @@ class MainController extends Component {
const warnNoLicense = _t.warnNoLicense.replace(/%1/g, __COMPANY_NAME__);
const warnNoLicenseUsers = _t.warnNoLicenseUsers.replace(/%1/g, __COMPANY_NAME__);
const textNoLicenseTitle = _t.textNoLicenseTitle.replace(/%1/g, __COMPANY_NAME__);
const warnLicenseExceeded = _t.warnLicenseExceeded.replace(/%1/g, __COMPANY_NAME__);
const warnLicenseUsersExceeded = _t.warnLicenseUsersExceeded.replace(/%1/g, __COMPANY_NAME__);
const appOptions = this.props.storeAppOptions;
if (appOptions.config.mode !== 'view' && !EditorUIController.isSupportEditFeature()) {
@ -896,13 +894,15 @@ class MainController extends Component {
} else if (this._state.licenseType) {
let license = this._state.licenseType;
let buttons = [{ text: _t.textOk }];
let title = textNoLicenseTitle;
if ((appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0 &&
(license === Asc.c_oLicenseResult.SuccessLimit ||
appOptions.permissionsLicense === Asc.c_oLicenseResult.SuccessLimit)
) {
license = _t.warnLicenseLimitedRenewed;
} else if (license === Asc.c_oLicenseResult.Connections || license === Asc.c_oLicenseResult.UsersCount) {
license = (license===Asc.c_oLicenseResult.Connections) ? warnLicenseExceeded : warnLicenseUsersExceeded;
title = _t.titleReadOnly;
license = (license===Asc.c_oLicenseResult.Connections) ? _t.tipLicenseExceeded : _t.tipLicenseUsersExceeded;
} else {
license = (license === Asc.c_oLicenseResult.ConnectionsOS) ? warnNoLicense : warnNoLicenseUsers;
buttons = [{
@ -928,18 +928,11 @@ class MainController extends Component {
Common.Notifications.trigger('api:disconnect');
}
let value = LocalStorage.getItem("sse-license-warning");
value = (value !== null) ? parseInt(value) : 0;
const now = (new Date).getTime();
if (now - value > 86400000) {
LocalStorage.setItem("sse-license-warning", now);
f7.dialog.create({
title: textNoLicenseTitle,
text : license,
buttons: buttons
}).open();
}
f7.dialog.create({
title: title,
text : license,
buttons: buttons
}).open();
} else {
if (!appOptions.isDesktopApp && !appOptions.canBrandingExt &&
appOptions.config && appOptions.config.customization && (appOptions.config.customization.loaderName || appOptions.config.customization.loaderLogo)) {

View File

@ -302,8 +302,6 @@ define([
me.warnNoLicense = (me.warnNoLicense || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.warnNoLicenseUsers = (me.warnNoLicenseUsers || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.textNoLicenseTitle = (me.textNoLicenseTitle || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.warnLicenseExceeded = (me.warnLicenseExceeded || '').replace(/%1/g, '{{COMPANY_NAME}}');
me.warnLicenseUsersExceeded = (me.warnLicenseUsersExceeded || '').replace(/%1/g, '{{COMPANY_NAME}}');
},
loadConfig: function(data) {
@ -1048,17 +1046,21 @@ define([
});
} else if (this._state.licenseType) {
var license = this._state.licenseType,
title = this.textNoLicenseTitle,
buttons = ['ok'],
primary = 'ok';
primary = 'ok',
modal = false;
if ((this.appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0 &&
(license===Asc.c_oLicenseResult.SuccessLimit || this.appOptions.permissionsLicense===Asc.c_oLicenseResult.SuccessLimit)) {
license = this.warnLicenseLimitedRenewed;
} else if (license===Asc.c_oLicenseResult.Connections || license===Asc.c_oLicenseResult.UsersCount) {
license = (license===Asc.c_oLicenseResult.Connections) ? this.warnLicenseExceeded : this.warnLicenseUsersExceeded;
title = this.titleReadOnly;
license = (license===Asc.c_oLicenseResult.Connections) ? this.tipLicenseExceeded : this.tipLicenseUsersExceeded;
} else {
license = (license===Asc.c_oLicenseResult.ConnectionsOS) ? this.warnNoLicense : this.warnNoLicenseUsers;
buttons = [{value: 'buynow', caption: this.textBuyNow}, {value: 'contact', caption: this.textContactUs}];
primary = 'buynow';
modal = true;
}
if (this._state.licenseType!==Asc.c_oLicenseResult.SuccessLimit && (this.appOptions.isEdit || this.appOptions.isRestrictedEdit)) {
@ -1067,25 +1069,19 @@ define([
Common.NotificationCenter.trigger('api:disconnect');
}
var value = Common.localStorage.getItem("ve-license-warning");
value = (value!==null) ? parseInt(value) : 0;
var now = (new Date).getTime();
if (now - value > 86400000) {
Common.UI.info({
maxwidth: 500,
title: this.textNoLicenseTitle,
msg : license,
buttons: buttons,
primary: primary,
callback: function(btn) {
Common.localStorage.setItem("ve-license-warning", now);
if (btn == 'buynow')
window.open('{{PUBLISHER_URL}}', "_blank");
else if (btn == 'contact')
window.open('mailto:{{SALES_EMAIL}}', "_blank");
}
});
}
Common.UI.info({
maxwidth: 500,
title: title,
msg : license,
buttons: buttons,
primary: primary,
callback: function(btn) {
if (btn == 'buynow')
window.open('{{PUBLISHER_URL}}', "_blank");
else if (btn == 'contact')
window.open('mailto:{{SALES_EMAIL}}', "_blank");
}
});
} else if (!this.appOptions.isDesktopApp && !this.appOptions.canBrandingExt &&
this.editorConfig && this.editorConfig.customization && (this.editorConfig.customization.loaderName || this.editorConfig.customization.loaderLogo ||
this.editorConfig.customization.font && (this.editorConfig.customization.font.size || this.editorConfig.customization.font.name))) {

View File

@ -294,14 +294,17 @@
"VE.Controllers.Main.warnBrowserZoom": "Your browser current zoom setting is not fully supported. Please reset to the default zoom by pressing Ctrl+0.",
"VE.Controllers.Main.warnLicenseAnonymous": "Access denied for anonymous users.<br>This document will be opened for viewing only.",
"VE.Controllers.Main.warnLicenseBefore": "License not active.<br>Please contact your administrator.",
"VE.Controllers.Main.warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact your administrator to learn more.",
"del_VE.Controllers.Main.warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact your administrator to learn more.",
"VE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
"VE.Controllers.Main.warnLicenseLimitedNoAccess": "License expired.<br>You have no access to document editing functionality.<br>Please contact your administrator.",
"VE.Controllers.Main.warnLicenseLimitedRenewed": "License needs to be renewed.<br>You have a limited access to document editing functionality.<br>Please contact your administrator to get full access",
"VE.Controllers.Main.warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"del_VE.Controllers.Main.warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"VE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact %1 sales team for personal upgrade terms.",
"VE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"VE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"VE.Controllers.Main.tipLicenseExceeded": "The document is open in read-only mode as the maximum number of simultaneous connections allowed by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.",
"VE.Controllers.Main.tipLicenseUsersExceeded": "The document is open in read-only mode as the maximum number of users allowed to edit documents by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.",
"VE.Controllers.Main.titleReadOnly": "Read-Only Mode",
"VE.Controllers.Search.notcriticalErrorTitle": "Warning",
"VE.Controllers.Search.textNoTextFound": "The data you have been searching for could not be found. Please adjust your search options.",
"VE.Controllers.Search.textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",

View File

@ -64,14 +64,17 @@
"txtIncorrectPwd": "Password is incorrect",
"warnLicenseAnonymous": "Access denied for anonymous users.<br>This document will be opened for viewing only.",
"warnLicenseBefore": "License not active.<br>Please contact your administrator.",
"warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact your administrator to learn more.",
"del_warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact your administrator to learn more.",
"warnLicenseExp": "Your license has expired. Please, update your license and refresh the page.",
"warnLicenseLimitedNoAccess": "License expired. You have no access to document editing functionality. Please, contact your administrator.",
"warnLicenseLimitedRenewed": "License needs to be renewed. You have limited access to document editing functionality.<br>Please contact your administrator to get full access",
"warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"del_warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact %1 sales team for personal upgrade terms.",
"warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"warnProcessRightsChange": "You don't have permission to edit the file."
"warnProcessRightsChange": "You don't have permission to edit the file.",
"titleReadOnly": "Read-Only Mode",
"tipLicenseExceeded": "The document is open in read-only mode as the maximum number of simultaneous connections allowed by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access.",
"tipLicenseUsersExceeded": "The document is open in read-only mode as the maximum number of users allowed to edit documents by license has been reached.<br><br>Please try again later or contact the document owner if you need editing access."
}
},
"Error": {

View File

@ -420,8 +420,6 @@ class MainController extends Component {
const warnNoLicense = _t.warnNoLicense.replace(/%1/g, __COMPANY_NAME__);
const warnNoLicenseUsers = _t.warnNoLicenseUsers.replace(/%1/g, __COMPANY_NAME__);
const textNoLicenseTitle = _t.textNoLicenseTitle.replace(/%1/g, __COMPANY_NAME__);
const warnLicenseExceeded = _t.warnLicenseExceeded.replace(/%1/g, __COMPANY_NAME__);
const warnLicenseUsersExceeded = _t.warnLicenseUsersExceeded.replace(/%1/g, __COMPANY_NAME__);
const appOptions = this.props.storeAppOptions;
if (appOptions.config.mode !== 'view' && !EditorUIController.isSupportEditFeature()) {
@ -460,13 +458,15 @@ class MainController extends Component {
} else if (this._state.licenseType) {
let license = this._state.licenseType;
let buttons = [{ text: _t.textOk }];
let title = textNoLicenseTitle;
if ((appOptions.trialMode & Asc.c_oLicenseMode.Limited) !== 0 &&
(license === Asc.c_oLicenseResult.SuccessLimit ||
appOptions.permissionsLicense === Asc.c_oLicenseResult.SuccessLimit)
) {
license = _t.warnLicenseLimitedRenewed;
} else if (license === Asc.c_oLicenseResult.Connections || license === Asc.c_oLicenseResult.UsersCount) {
license = (license===Asc.c_oLicenseResult.Connections) ? warnLicenseExceeded : warnLicenseUsersExceeded;
title = _t.titleReadOnly;
license = (license===Asc.c_oLicenseResult.Connections) ? _t.tipLicenseExceeded : _t.tipLicenseUsersExceeded;
} else {
license = (license === Asc.c_oLicenseResult.ConnectionsOS) ? warnNoLicense : warnNoLicenseUsers;
buttons = [{
@ -491,18 +491,11 @@ class MainController extends Component {
Common.Notifications.trigger('api:disconnect');
}
let value = LocalStorage.getItem("ve-license-warning");
value = (value !== null) ? parseInt(value) : 0;
const now = (new Date).getTime();
if (now - value > 86400000) {
LocalStorage.setItem("ve-license-warning", now);
f7.dialog.create({
title: textNoLicenseTitle,
text : license,
buttons: buttons
}).open();
}
f7.dialog.create({
title: title,
text : license,
buttons: buttons
}).open();
} else {
if (!appOptions.isDesktopApp && !appOptions.canBrandingExt &&
appOptions.config && appOptions.config.customization && (appOptions.config.customization.loaderName || appOptions.config.customization.loaderLogo)) {