Disable download as, print, save and version history when server is disconnected.
This commit is contained in:
parent
1494f1f807
commit
0dd09875b8
|
@ -122,7 +122,7 @@ define([
|
|||
setApi: function(api) {
|
||||
this.api = api;
|
||||
this.api.asc_registerCallback('asc_onReplaceAll', _.bind(this.onApiTextReplaced, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiServerDisconnect, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiServerDisconnect, this, true));
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiServerDisconnect, this));
|
||||
/** coauthoring begin **/
|
||||
if (this.mode.canCoAuthoring) {
|
||||
|
@ -446,7 +446,7 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onApiServerDisconnect: function() {
|
||||
onApiServerDisconnect: function(disableDownload) {
|
||||
this.mode.isEdit = false;
|
||||
this.leftMenu.close();
|
||||
|
||||
|
@ -456,7 +456,7 @@ define([
|
|||
/** coauthoring end **/
|
||||
this.leftMenu.btnPlugins.setDisabled(true);
|
||||
|
||||
this.leftMenu.getMenu('file').setMode({isDisconnected: true});
|
||||
this.leftMenu.getMenu('file').setMode({isDisconnected: true, disableDownload: !!disableDownload});
|
||||
if ( this.dlgSearch ) {
|
||||
this.leftMenu.btnSearch.toggle(false, true);
|
||||
this.dlgSearch['hide']();
|
||||
|
|
|
@ -1195,7 +1195,7 @@ define([
|
|||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.CoAuthoringDisconnect:
|
||||
config.msg = (this.appOptions.isEdit) ? this.errorCoAuthoringDisconnect : this.errorViewerDisconnect;
|
||||
config.msg = this.errorViewerDisconnect;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.ConvertationPassword:
|
||||
|
@ -1964,7 +1964,7 @@ define([
|
|||
textNoLicenseTitle: 'ONLYOFFICE open source version',
|
||||
warnNoLicense: 'You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.',
|
||||
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.',
|
||||
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.',
|
||||
titleLicenseExp: 'License expired',
|
||||
openErrorText: 'An error has occurred while opening the file',
|
||||
|
|
|
@ -304,7 +304,7 @@ define([
|
|||
this.api.asc_registerCallback('asc_onMarkerFormatChanged', _.bind(this.onApiStartHighlight, this));
|
||||
this.api.asc_registerCallback('asc_onTextHighLight', _.bind(this.onApiHighlightColor, this));
|
||||
this.api.asc_registerCallback('asc_onInitEditorStyles', _.bind(this.onApiInitEditorStyles, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onApiCoAuthoringDisconnect, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onApiCoAuthoringDisconnect, this, true));
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiCoAuthoringDisconnect, this));
|
||||
this.api.asc_registerCallback('asc_onCanCopyCut', _.bind(this.onApiCanCopyCut, this));
|
||||
this.api.asc_registerCallback('asc_onMathTypes', _.bind(this.onMathTypes, this));
|
||||
|
@ -2592,8 +2592,8 @@ define([
|
|||
});
|
||||
},
|
||||
|
||||
onApiCoAuthoringDisconnect: function() {
|
||||
this.toolbar.setMode({isDisconnected:true});
|
||||
onApiCoAuthoringDisconnect: function(disableDownload) {
|
||||
this.toolbar.setMode({isDisconnected:true, disableDownload: !!disableDownload});
|
||||
this.editMode = false;
|
||||
},
|
||||
|
||||
|
|
|
@ -215,6 +215,7 @@ define([
|
|||
applyMode: function() {
|
||||
this.items[5][this.mode.canPrint?'show':'hide']();
|
||||
this.items[6][(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide']();
|
||||
this.items[6].$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide']();
|
||||
this.items[7][this.mode.canOpenRecent?'show':'hide']();
|
||||
this.items[8][this.mode.canCreateNew?'show':'hide']();
|
||||
this.items[8].$el.find('+.devider')[this.mode.canCreateNew?'show':'hide']();
|
||||
|
@ -261,8 +262,7 @@ define([
|
|||
|
||||
this.panels['help'].setLangConfig(this.mode.lang);
|
||||
|
||||
this.items[11][this.mode.canUseHistory?'show':'hide']();
|
||||
this.items[11].setDisabled(this.mode.isDisconnected);
|
||||
this.items[11][this.mode.canUseHistory&&!this.mode.isDisconnected?'show':'hide']();
|
||||
},
|
||||
|
||||
setMode: function(mode, delay) {
|
||||
|
@ -271,6 +271,8 @@ define([
|
|||
this.mode.canOpenRecent = this.mode.canCreateNew = false;
|
||||
this.mode.isDisconnected = mode.isDisconnected;
|
||||
this.mode.canRename = false;
|
||||
this.mode.canPrint = false;
|
||||
this.mode.canDownload = this.mode.canDownloadOrigin = false;
|
||||
} else {
|
||||
this.mode = mode;
|
||||
}
|
||||
|
|
|
@ -1517,6 +1517,8 @@ define([
|
|||
this.cmbFontName.setDisabled(true);
|
||||
this.cmbFontSize.setDisabled(true);
|
||||
this.listStyles.setDisabled(true);
|
||||
if (mode.disableDownload)
|
||||
this.btnPrint.setDisabled(true);
|
||||
}
|
||||
|
||||
this.mode = mode;
|
||||
|
|
|
@ -210,7 +210,7 @@
|
|||
"DE.Controllers.Main.errorUpdateVersion": "Die Dateiversion wurde geändert. Die Seite wird neu geladen.",
|
||||
"DE.Controllers.Main.errorUserDrop": "Kein Zugriff auf diese Datei ist möglich.",
|
||||
"DE.Controllers.Main.errorUsersExceed": "Die nach dem Zahlungsplan erlaubte Anzahl der Benutzer ist überschritten",
|
||||
"DE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.",
|
||||
"DE.Controllers.Main.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.",
|
||||
"DE.Controllers.Main.leavePageText": "Dieses Dokument enthält ungespeicherte Änderungen. Klicken Sie auf \"Auf dieser Seite bleiben\" und dann auf \"Speichern\", um sie zu speichern. Klicken Sie auf \"Diese Seite verlassen\", um alle nicht gespeicherten Änderungen zu verwerfen.\n",
|
||||
"DE.Controllers.Main.loadFontsTextText": "Daten werden geladen...",
|
||||
"DE.Controllers.Main.loadFontsTitleText": "Daten werden geladen",
|
||||
|
|
|
@ -198,8 +198,6 @@
|
|||
"DE.Controllers.Main.applyChangesTextText": "Loading the changes...",
|
||||
"DE.Controllers.Main.applyChangesTitleText": "Loading the Changes",
|
||||
"del_DE.Controllers.Main.convertationErrorText": "Conversion failed.",
|
||||
"DE.Controllers.Main.openErrorText": "An error has occurred while opening the file",
|
||||
"DE.Controllers.Main.saveErrorText": "An error has occurred while saving the file",
|
||||
"DE.Controllers.Main.convertationTimeoutText": "Conversion timeout exceeded.",
|
||||
"DE.Controllers.Main.criticalErrorExtText": "Press \"OK\" to return to document list.",
|
||||
"DE.Controllers.Main.criticalErrorTitle": "Error",
|
||||
|
@ -224,7 +222,7 @@
|
|||
"DE.Controllers.Main.errorUpdateVersion": "The file version has been changed. The page will be reloaded.",
|
||||
"DE.Controllers.Main.errorUserDrop": "The file cannot be accessed right now.",
|
||||
"DE.Controllers.Main.errorUsersExceed": "The number of users allowed by the pricing plan was exceeded",
|
||||
"DE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.",
|
||||
"DE.Controllers.Main.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.",
|
||||
"DE.Controllers.Main.leavePageText": "You have unsaved changes in this document. Click \"Stay on This Page\", then \"Save\" to save them. Click \"Leave This Page\" to discard all the unsaved changes.",
|
||||
"DE.Controllers.Main.loadFontsTextText": "Loading data...",
|
||||
"DE.Controllers.Main.loadFontsTitleText": "Loading Data",
|
||||
|
|
|
@ -210,7 +210,7 @@
|
|||
"DE.Controllers.Main.errorUpdateVersion": "Se ha cambiado la versión del archivo. La página será actualizada.",
|
||||
"DE.Controllers.Main.errorUserDrop": "No se puede acceder al archivo ahora.",
|
||||
"DE.Controllers.Main.errorUsersExceed": "El número de usuarios permitido según su plan de precios fue excedido",
|
||||
"DE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.",
|
||||
"DE.Controllers.Main.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.",
|
||||
"DE.Controllers.Main.leavePageText": "Hay cambios no guardados en este documento. Haga clic en 'Permanecer en esta página', después 'Guardar' para guardarlos. Haga clic en 'Abandonar esta página' para descartar todos los cambios no guardados.",
|
||||
"DE.Controllers.Main.loadFontsTextText": "Cargando datos...",
|
||||
"DE.Controllers.Main.loadFontsTitleText": "Cargando datos",
|
||||
|
|
|
@ -210,7 +210,7 @@
|
|||
"DE.Controllers.Main.errorUpdateVersion": "La version du fichier a été changée. La page sera rechargée.",
|
||||
"DE.Controllers.Main.errorUserDrop": "Impossible d'accéder au fichier",
|
||||
"DE.Controllers.Main.errorUsersExceed": "Le nombre d'utilisateurs autorisés par le plan tarifaire a été dépassé",
|
||||
"DE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.",
|
||||
"DE.Controllers.Main.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.",
|
||||
"DE.Controllers.Main.leavePageText": "Vous avez des modifications non enregistrées dans ce document. Cliquez sur 'Rester sur cette page', ensuite sur 'Enregistrer' pour enregistrer les modifications. Cliquez sur 'Quitter cette page' pour annuler toutes les modifications non enregistrées.",
|
||||
"DE.Controllers.Main.loadFontsTextText": "Chargement des données...",
|
||||
"DE.Controllers.Main.loadFontsTitleText": "Chargement des données",
|
||||
|
|
|
@ -119,7 +119,7 @@ define([
|
|||
setApi: function(api) {
|
||||
this.api = api;
|
||||
this.api.asc_registerCallback('asc_onThumbnailsShow', _.bind(this.onThumbnailsShow, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiServerDisconnect, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiServerDisconnect, this, true));
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiServerDisconnect, this));
|
||||
/** coauthoring begin **/
|
||||
if (this.mode.canCoAuthoring) {
|
||||
|
@ -344,7 +344,7 @@ define([
|
|||
// this.api.asc_selectSearchingResults(false);
|
||||
},
|
||||
|
||||
onApiServerDisconnect: function() {
|
||||
onApiServerDisconnect: function(disableDownload) {
|
||||
this.mode.isEdit = false;
|
||||
this.leftMenu.close();
|
||||
|
||||
|
@ -354,7 +354,7 @@ define([
|
|||
/** coauthoring end **/
|
||||
this.leftMenu.btnPlugins.setDisabled(true);
|
||||
|
||||
this.leftMenu.getMenu('file').setMode({isDisconnected: true});
|
||||
this.leftMenu.getMenu('file').setMode({isDisconnected: true, disableDownload: !!disableDownload});
|
||||
if ( this.dlgSearch ) {
|
||||
this.leftMenu.btnSearch.toggle(false, true);
|
||||
this.dlgSearch['hide']();
|
||||
|
|
|
@ -963,7 +963,7 @@ define([
|
|||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.CoAuthoringDisconnect:
|
||||
config.msg = (this.appOptions.isEdit) ? this.errorCoAuthoringDisconnect : this.errorViewerDisconnect;
|
||||
config.msg = this.errorViewerDisconnect;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.ConvertationPassword:
|
||||
|
@ -1779,7 +1779,7 @@ define([
|
|||
textNoLicenseTitle: 'ONLYOFFICE open source version',
|
||||
warnNoLicense: 'You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.',
|
||||
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.',
|
||||
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.',
|
||||
titleLicenseExp: 'License expired',
|
||||
openErrorText: 'An error has occurred while opening the file',
|
||||
|
|
|
@ -278,7 +278,7 @@ define([
|
|||
this.api.asc_registerCallback('asc_onCanUnGroup', _.bind(this.onApiCanUnGroup, this));
|
||||
this.api.asc_registerCallback('asc_onPresentationSize', _.bind(this.onApiPageSize, this));
|
||||
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onApiCoAuthoringDisconnect, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onApiCoAuthoringDisconnect, this, true));
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiCoAuthoringDisconnect, this));
|
||||
this.api.asc_registerCallback('asc_onZoomChange', _.bind(this.onApiZoomChange, this));
|
||||
this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onApiFocusObject, this));
|
||||
|
@ -684,8 +684,8 @@ define([
|
|||
this.toolbar.lockToolbar(PE.enumLock.themeLock, false, {array: [this.toolbar.btnColorSchemas]});
|
||||
},
|
||||
|
||||
onApiCoAuthoringDisconnect: function() {
|
||||
this.toolbar.setMode({isDisconnected:true});
|
||||
onApiCoAuthoringDisconnect: function(disableDownload) {
|
||||
this.toolbar.setMode({isDisconnected:true, disableDownload: !!disableDownload});
|
||||
this.editMode = false;
|
||||
},
|
||||
|
||||
|
|
|
@ -212,6 +212,7 @@ define([
|
|||
applyMode: function() {
|
||||
this.items[5][this.mode.canPrint?'show':'hide']();
|
||||
this.items[6][(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide']();
|
||||
this.items[6].$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide']();
|
||||
this.items[7][this.mode.canOpenRecent?'show':'hide']();
|
||||
this.items[8][this.mode.canCreateNew?'show':'hide']();
|
||||
this.items[8].$el.find('+.devider')[this.mode.canCreateNew?'show':'hide']();
|
||||
|
@ -258,7 +259,10 @@ define([
|
|||
if (mode.isDisconnected) {
|
||||
this.mode.canEdit = this.mode.isEdit = false;
|
||||
this.mode.canOpenRecent = this.mode.canCreateNew = false;
|
||||
this.mode.isDisconnected = mode.isDisconnected;
|
||||
this.mode.canRename = false;
|
||||
this.mode.canPrint = false;
|
||||
this.mode.canDownload = false;
|
||||
} else {
|
||||
this.mode = mode;
|
||||
}
|
||||
|
|
|
@ -1287,7 +1287,7 @@ define([
|
|||
this.mnuitemHideTitleBar.hide();
|
||||
}
|
||||
|
||||
this.lockToolbar(PE.enumLock.cantPrint, !mode.canPrint, {array: [this.btnPrint]});
|
||||
this.lockToolbar(PE.enumLock.cantPrint, !mode.canPrint || mode.disableDownload, {array: [this.btnPrint]});
|
||||
},
|
||||
|
||||
changeViewMode: function(item, compact) {
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
"PE.Controllers.Main.errorUpdateVersion": "The file version has been changed. The page will be reloaded.",
|
||||
"PE.Controllers.Main.errorUserDrop": "The file cannot be accessed right now.",
|
||||
"PE.Controllers.Main.errorUsersExceed": "The number of users allowed by the pricing plan was exceeded",
|
||||
"PE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.",
|
||||
"PE.Controllers.Main.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.",
|
||||
"PE.Controllers.Main.leavePageText": "You have unsaved changes in this presentation. Click \"Stay on This Page\", then \"Save\" to save them. Click \"Leave This Page\" to discard all the unsaved changes.",
|
||||
"PE.Controllers.Main.loadFontsTextText": "Loading data...",
|
||||
"PE.Controllers.Main.loadFontsTitleText": "Loading Data",
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
"PE.Controllers.Main.errorUpdateVersion": "Se ha cambiado la versión del archivo. La página será actualizada.",
|
||||
"PE.Controllers.Main.errorUserDrop": "No se puede acceder al archivo ahora.",
|
||||
"PE.Controllers.Main.errorUsersExceed": "El número de usuarios permitido según su plan de precios fue excedido",
|
||||
"PE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.",
|
||||
"PE.Controllers.Main.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.",
|
||||
"PE.Controllers.Main.leavePageText": "Hay cambios no guardados en esta presentación. Pulse \"Permanecer en esta página\", después \"Guardar\" para guardadarlos. Pulse \"Abandonar esta página\" para descartar todos los cambios no guardados.",
|
||||
"PE.Controllers.Main.loadFontsTextText": "Cargando datos...",
|
||||
"PE.Controllers.Main.loadFontsTitleText": "Cargando datos",
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
"PE.Controllers.Main.errorUpdateVersion": "La version du fichier a été changée. La page sera rechargée.",
|
||||
"PE.Controllers.Main.errorUserDrop": "Impossible d'accéder au fichier",
|
||||
"PE.Controllers.Main.errorUsersExceed": "Le nombre d'utilisateurs autorisés par le plan tarifaire a été dépassé",
|
||||
"PE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.",
|
||||
"PE.Controllers.Main.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.",
|
||||
"PE.Controllers.Main.leavePageText": "Vous avez des modifications non enregistrées dans cette présentation. Cliquez sur \"Rester sur cette page\", ensuite sur \"Enregistrer\" pour enregistrer les modifications. Cliquez sur \"Quitter cette page\" pour annuler toutes les modifications non enregistrées.",
|
||||
"PE.Controllers.Main.loadFontsTextText": "Chargement des données...",
|
||||
"PE.Controllers.Main.loadFontsTitleText": "Chargement des données",
|
||||
|
|
|
@ -127,7 +127,7 @@ define([
|
|||
setApi: function(api) {
|
||||
this.api = api;
|
||||
this.api.asc_registerCallback('asc_onRenameCellTextEnd', _.bind(this.onRenameText, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiServerDisconnect, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiServerDisconnect, this, true));
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiServerDisconnect, this));
|
||||
/** coauthoring begin **/
|
||||
if (this.mode.canCoAuthoring) {
|
||||
|
@ -509,7 +509,7 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onApiServerDisconnect: function() {
|
||||
onApiServerDisconnect: function(disableDownload) {
|
||||
this.mode.isEdit = false;
|
||||
this.leftMenu.close();
|
||||
|
||||
|
@ -519,7 +519,7 @@ define([
|
|||
/** coauthoring end **/
|
||||
this.leftMenu.btnPlugins.setDisabled(true);
|
||||
|
||||
this.leftMenu.getMenu('file').setMode({isDisconnected: true});
|
||||
this.leftMenu.getMenu('file').setMode({isDisconnected: true, disableDownload: !!disableDownload});
|
||||
if ( this.dlgSearch ) {
|
||||
this.leftMenu.btnSearch.toggle(false, true);
|
||||
this.dlgSearch['hide']();
|
||||
|
|
|
@ -1076,7 +1076,7 @@ define([
|
|||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.CoAuthoringDisconnect:
|
||||
config.msg = (this.appOptions.isEdit) ? this.errorCoAuthoringDisconnect : this.errorViewerDisconnect;
|
||||
config.msg = this.errorViewerDisconnect;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.ConvertationPassword:
|
||||
|
@ -1969,7 +1969,7 @@ define([
|
|||
warnNoLicense: 'You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.',
|
||||
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 until the connection is restored.',
|
||||
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.',
|
||||
titleLicenseExp: 'License expired',
|
||||
openErrorText: 'An error has occurred while opening the file',
|
||||
|
|
|
@ -269,7 +269,7 @@ define([
|
|||
|
||||
this.api.asc_registerCallback('asc_onInitTablePictures', _.bind(this.onApiInitTableTemplates, this));
|
||||
this.api.asc_registerCallback('asc_onInitEditorStyles', _.bind(this.onApiInitEditorStyles, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onApiCoAuthoringDisconnect, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onApiCoAuthoringDisconnect, this, true));
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiCoAuthoringDisconnect, this));
|
||||
this.api.asc_registerCallback('asc_onLockDefNameManager', _.bind(this.onLockDefNameManager, this));
|
||||
this.api.asc_registerCallback('asc_onZoomChanged', _.bind(this.onApiZoomChange, this));
|
||||
|
@ -1374,8 +1374,8 @@ define([
|
|||
window.styles_loaded = true;
|
||||
},
|
||||
|
||||
onApiCoAuthoringDisconnect: function() {
|
||||
this.toolbar.setMode({isDisconnected:true});
|
||||
onApiCoAuthoringDisconnect: function(disableDownload) {
|
||||
this.toolbar.setMode({isDisconnected:true, disableDownload: !!disableDownload});
|
||||
this.editMode = false;
|
||||
},
|
||||
|
||||
|
|
|
@ -198,6 +198,7 @@ define([
|
|||
applyMode: function() {
|
||||
this.items[5][this.mode.canPrint?'show':'hide']();
|
||||
this.items[6][(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide']();
|
||||
this.items[6].$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide']();
|
||||
this.items[7][this.mode.canOpenRecent?'show':'hide']();
|
||||
this.items[8][this.mode.canCreateNew?'show':'hide']();
|
||||
this.items[8].$el.find('+.devider')[this.mode.canCreateNew?'show':'hide']();
|
||||
|
@ -242,7 +243,10 @@ define([
|
|||
if (mode.isDisconnected) {
|
||||
this.mode.canEdit = this.mode.isEdit = false;
|
||||
this.mode.canOpenRecent = this.mode.canCreateNew = false;
|
||||
this.mode.isDisconnected = mode.isDisconnected;
|
||||
this.mode.canRename = false;
|
||||
this.mode.canPrint = false;
|
||||
this.mode.canDownload = false;
|
||||
} else {
|
||||
this.mode = mode;
|
||||
}
|
||||
|
|
|
@ -1684,6 +1684,7 @@ define([
|
|||
this.lockToolbar( SSE.enumLock.lostConnect, true );
|
||||
this.lockToolbar( SSE.enumLock.lostConnect, true,
|
||||
{array:[this.btnEditChart,this.btnUndo,this.btnRedo,this.btnOpenDocument,this.btnNewDocument,this.btnSave]} );
|
||||
this.lockToolbar(SSE.enumLock.cantPrint, !mode.canPrint || mode.disableDownload, {array: [this.btnPrint]});
|
||||
} else {
|
||||
this.mode = mode;
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@
|
|||
"SSE.Controllers.Main.errorUpdateVersion": "The file version has been changed. The page will be reloaded.",
|
||||
"SSE.Controllers.Main.errorUserDrop": "The file cannot be accessed right now.",
|
||||
"SSE.Controllers.Main.errorUsersExceed": "The number of users allowed by the pricing plan was exceeded",
|
||||
"SSE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.",
|
||||
"SSE.Controllers.Main.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.",
|
||||
"SSE.Controllers.Main.errorWrongBracketsCount": "An error in the entered formula.<br>Wrong number of brackets is used.",
|
||||
"SSE.Controllers.Main.errorWrongOperator": "An error in the entered formula. Wrong operator is used.<br>Please correct the error or use the Esc button to cancel the formula editing.",
|
||||
"SSE.Controllers.Main.leavePageText": "You have unsaved changes in this spreadsheet. Click 'Stay on this Page' then 'Save' to save them. Click 'Leave this Page' to discard all the unsaved changes.",
|
||||
|
|
|
@ -167,7 +167,7 @@
|
|||
"SSE.Controllers.Main.errorUpdateVersion": "Se ha cambiado la versión del archivo. La página será actualizada.",
|
||||
"SSE.Controllers.Main.errorUserDrop": "No se puede acceder al archivo ahora.",
|
||||
"SSE.Controllers.Main.errorUsersExceed": "El número de usuarios permitido según su plan de precios fue excedido",
|
||||
"SSE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.",
|
||||
"SSE.Controllers.Main.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.",
|
||||
"SSE.Controllers.Main.errorWrongBracketsCount": "Un error en la fórmula introducida.<br>Número incorrecto de corchetes es usado.",
|
||||
"SSE.Controllers.Main.errorWrongOperator": "Un error en la fórmula introducida.Operador inválido es usado.<br>Por favor, corrija el error o utilice el botón Esc para cancelar la edición de fórmulas.",
|
||||
"SSE.Controllers.Main.leavePageText": "Usted tiene cambios no guardados en esta hoja de cálculo. Haga clic en 'Permanecer en esta página', después 'Guardar' para guardarlos. Haga clic en 'Abandonar esta página' para descartar todos los cambios no guardados.",
|
||||
|
|
|
@ -167,7 +167,7 @@
|
|||
"SSE.Controllers.Main.errorUpdateVersion": "La version du fichier a été changée. La page sera rechargée.",
|
||||
"SSE.Controllers.Main.errorUserDrop": "Impossible d'accéder au fichier",
|
||||
"SSE.Controllers.Main.errorUsersExceed": "Le nombre d'utilisateurs autorisés par le plan tarifaire a été dépassé",
|
||||
"SSE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.",
|
||||
"SSE.Controllers.Main.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.",
|
||||
"SSE.Controllers.Main.errorWrongBracketsCount": "Une erreur dans la formule entrée.<br>Nombre utilisé entre parenthèses est incorrect.",
|
||||
"SSE.Controllers.Main.errorWrongOperator": "Une erreur dans la formule entrée.<br>Opérateur utilisé est incorrect.<br>Veuillez corriger l'erreur ou utilisez le bouton Esc pour annuler l'édition de formule.",
|
||||
"SSE.Controllers.Main.leavePageText": "Vous avez des modifications non enregistrées dans cette feuille de calcul. Cliquez sur 'Rester sur cette page ' ensuite 'Enregistrer' pour les enregistrer. Cliquez sur 'Quitter cette page' pour annuler toutes les modifications non enregistrées.",
|
||||
|
|
Loading…
Reference in a new issue