Merge branch 'develop' into feature/refactor

This commit is contained in:
Julia Radzhabova 2016-10-14 11:40:06 +03:00
commit a4acc71b13
46 changed files with 156 additions and 126 deletions

View file

@ -84,7 +84,8 @@ define([
menuCls : '',
menuStyle : '',
displayField: 'displayValue',
valueField : 'value'
valueField : 'value',
scrollAlwaysVisible: false
},
template: _.template([
@ -117,6 +118,7 @@ define([
this.store = me.options.store || new Common.UI.ComboBoxStore();
this.displayField = me.options.displayField;
this.valueField = me.options.valueField;
this.scrollAlwaysVisible = me.options.scrollAlwaysVisible;
me.rendered = me.options.rendered || false;
this.lastValue = null;
@ -216,7 +218,8 @@ define([
el: $('.dropdown-menu', this.cmpEl),
minScrollbarLength: 40,
scrollYMarginOffset: 30,
includePadding: true
includePadding: true,
alwaysVisibleY: this.scrollAlwaysVisible
}, this.options.scroller));
}
@ -239,7 +242,8 @@ define([
el: $('.dropdown-menu', this.cmpEl),
minScrollbarLength: 40,
scrollYMarginOffset: 30,
includePadding: true
includePadding: true,
alwaysVisibleY: this.scrollAlwaysVisible
}, this.options.scroller));
}
@ -542,7 +546,8 @@ define([
el: $('.dropdown-menu', this.cmpEl),
minScrollbarLength : 40,
scrollYMarginOffset: 30,
includePadding : true
includePadding : true,
alwaysVisibleY: this.scrollAlwaysVisible
}, this.options.scroller));
}
}

View file

@ -87,7 +87,7 @@
display: inline-block;
padding: 2px 8px;
&.renamed {
&.renamed:hover {
background-color: @app-header-bg-color-dark;
}
}

View file

@ -5,7 +5,7 @@
#history-header {
position: absolute;
height: 45px;
height: 53px;
left: 0;
top: 0;
right: 0;
@ -14,7 +14,7 @@
#history-btn-back {
height: 27px;
margin-top: 8px;
margin-top: 15px;
padding-top: 4px;
padding-left: 20px;
font-size: 13px;
@ -52,7 +52,7 @@
#history-list {
height: 100%;
overflow: hidden;
padding: 45px 0;
padding: 53px 0 45px 0;
.item {
display: block;

View file

@ -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']();

View file

@ -520,7 +520,11 @@ define([
toolbarView.btnInsertShape.toggle(false, false);
toolbarView.btnInsertText.toggle(false, false);
}
if (this.appOptions.isEdit && toolbarView && toolbarView.btnHighlightColor.pressed &&
( !_.isObject(arguments[1]) || arguments[1].id !== 'id-toolbar-btn-highlight')) {
this.api.SetMarkerFormat(false);
toolbarView.btnHighlightColor.toggle(false, false);
}
application.getController('DocumentHolder').getView('DocumentHolder').focus();
if (this.api) {
@ -872,12 +876,12 @@ define([
documentHolderController.getView('DocumentHolder').createDelayedElements();
me.loadLanguages();
rightmenuController.createDelayedElements();
var shapes = me.api.asc_getPropertyEditorShapes();
if (shapes)
me.fillAutoShapes(shapes[0], shapes[1]);
rightmenuController.createDelayedElements();
me.updateThemeColors();
toolbarController.activateControls();
if (me.needToUpdateVersion)
@ -1195,7 +1199,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 +1968,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',

View file

@ -269,6 +269,7 @@ define([
}
if (this.editMode && this.api) {
this.rightmenu.shapeSettings.createDelayedElements();
var selectedElements = this.api.getSelectedElements();
if (selectedElements.length>0) {
var open = Common.localStorage.getItem("de-hide-right-settings");

View 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));
@ -2554,7 +2554,7 @@ define([
me.api.SetMarkerFormat(true, true, parseInt(r, 16), parseInt(g, 16), parseInt(b, 16));
}
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
Common.NotificationCenter.trigger('edit:complete', me.toolbar, me.toolbar.btnHighlightColor);
Common.component.Analytics.trackEvent('ToolBar', 'Highlight Color');
},
@ -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;
},

View file

@ -105,10 +105,8 @@ define([
},
ChangeSettings: function(props) {
if (this._initSettings) {
if (this._initSettings)
this.createDelayedElements();
this._initSettings = false;
}
this.disableControls(this._locked);
@ -307,6 +305,7 @@ define([
createDelayedElements: function() {
this.createDelayedControls();
this.updateMetricUnit();
this._initSettings = false;
},
_ChartWrapStyleChanged: function(style) {

View file

@ -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;
}

View file

@ -94,10 +94,8 @@ define([
},
ChangeSettings: function(prop) {
if (this._initSettings) {
if (this._initSettings)
this.createDelayedElements();
this._initSettings = false;
}
this.disableControls(this._locked);
@ -244,6 +242,7 @@ define([
createDelayedElements: function() {
this.createDelayedControls();
this.updateMetricUnit();
this._initSettings = false;
},
setLocked: function (locked) {

View file

@ -182,13 +182,12 @@ define([
createDelayedElements: function() {
this.createDelayedControls();
this.updateMetricUnit();
this._initSettings = false;
},
ChangeSettings: function(props) {
if (this._initSettings) {
if (this._initSettings)
this.createDelayedElements();
this._initSettings = false;
}
this.disableControls(this._locked);

View file

@ -380,13 +380,13 @@ define([
this.cmbMergeTo.setValue(this._arrMergeSrc[0].value);
}
}
this._initSettings = false;
},
ChangeSettings: function(props) {
if (this._initSettings) {
if (this._initSettings)
this.createDelayedControls();
this._initSettings = false;
}
this.disableInsertControls(this._locked);

View file

@ -276,10 +276,8 @@ define([
},
ChangeSettings: function(prop) {
if (this._initSettings) {
if (this._initSettings)
this.createDelayedElements();
this._initSettings = false;
}
this.disableControls(this._locked);
this.hideTextOnlySettings(this.isChart);
@ -397,6 +395,7 @@ define([
createDelayedElements: function() {
this.UpdateThemeColors();
this.updateMetricUnit();
this._initSettings = false;
},
openAdvancedSettings: function(e) {

View file

@ -764,7 +764,6 @@ define([
if (this._initSettings)
this.createDelayedElements();
this._initSettings = false;
if (props && props.get_ShapeProperties())
{
@ -1450,6 +1449,7 @@ define([
this.fillAutoShapes();
this.UpdateThemeColors();
this._initSettings = false;
},
onInitStandartTextures: function(texture) {

View file

@ -423,12 +423,12 @@ define([
createDelayedElements: function() {
this.createDelayedControls();
this.UpdateThemeColors();
this._initSettings = false;
},
ChangeSettings: function(props) {
if (this._initSettings)
this.createDelayedElements();
this._initSettings = false;
this.disableControls(this._locked);

View file

@ -515,7 +515,6 @@ define([
if (this._initSettings)
this.createDelayedElements();
this._initSettings = false;
if (props && props.get_ShapeProperties() && props.get_ShapeProperties().get_TextArtProperties())
{
@ -965,6 +964,7 @@ define([
this.createDelayedControls();
this.UpdateThemeColors();
this.fillTransform(this.api.asc_getPropertyEditorTextArts());
this._initSettings = false;
},
fillTextArt: function() {

View file

@ -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;

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -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']();

View file

@ -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',

View 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;
},

View file

@ -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;
}

View file

@ -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) {

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -1312,6 +1312,7 @@ define([
item.setDisabled(isCellLocked);
});
documentHolder.pmiCopy.setDisabled(false);
documentHolder.pmiFilterCells.setDisabled(isCellLocked || (filterInfo==null));
documentHolder.pmiSortCells.setDisabled(isCellLocked || (filterInfo==null));
documentHolder.pmiReapply.setDisabled(isCellLocked || (isApplyAutoFilter!==true));
if (showMenu) this.showPopupMenu(documentHolder.ssMenu, {}, event);

View file

@ -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']();

View file

@ -646,7 +646,6 @@ define([
documentHolderView.createDelayedElements();
toolbarController.createDelayedElements();
rightmenuController.createDelayedElements();
if (!me.appOptions.isEditMailMerge && !me.appOptions.isEditDiagram) {
var shapes = me.api.asc_getPropertyEditorShapes();
@ -657,6 +656,8 @@ define([
me.updateThemeColors();
}
rightmenuController.createDelayedElements();
me.api.asc_registerCallback('asc_onSaveUrl', _.bind(me.onSaveUrl, me));
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me));
me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me));
@ -1076,7 +1077,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:
@ -1144,6 +1145,10 @@ define([
config.msg = this.errorFrmlWrongReferences;
break;
case Asc.c_oAscError.ID.CopyMultiselectAreaError:
config.msg = this.errorCopyMultiselectArea;
break;
default:
config.msg = this.errorDefaultMessage.replace('%1', id);
break;
@ -1708,7 +1713,7 @@ define([
var app = this.getApplication(),
filemenu = app.getController('LeftMenu').getView('LeftMenu').getMenu('file');
app.getController('Viewport').getView('Common.Views.Header').setDocumentCaption(meta.title);
this.updateWindowTitle(true);
this.updateWindowTitle(this.api.asc_isDocumentModified(), true);
this.appOptions.spreadsheet.title = meta.title;
filemenu.loadDocument({doc:this.appOptions.spreadsheet});
filemenu.panels['info'].updateInfo(this.appOptions.spreadsheet);
@ -1969,11 +1974,12 @@ 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',
saveErrorText: 'An error has occurred while saving the file'
saveErrorText: 'An error has occurred while saving the file',
errorCopyMultiselectArea: 'This command cannot be used with multiple selections.<br>Select a single range and try again.'
}
})(), SSE.Controllers.Main || {}))
});

View file

@ -266,6 +266,7 @@ define([
this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onFocusObject, this));
this.api.asc_registerCallback('asc_onSelectionChanged', _.bind(this.onSelectionChanged, this));
this.api.asc_registerCallback('asc_doubleClickOnObject', _.bind(this.onDoubleClickOnObject, this));
this.rightmenu.shapeSettings.createDelayedElements();
this.onSelectionChanged(this.api.asc_getCellInfo());
}
},

View 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;
},

View file

@ -119,9 +119,10 @@ define([
this.cmbCondition1 = new Common.UI.ComboBox({
el : $('#id-search-begin-digital-combo', this.$window),
menuStyle : 'min-width: 225px;',
menuStyle : 'min-width: 225px;max-height: 135px;',
cls : 'input-group-nr',
data : this.conditions,
scrollAlwaysVisible: true,
editable : false
});
this.cmbCondition1.setValue(Asc.c_oAscCustomAutoFilter.equals);
@ -130,9 +131,10 @@ define([
this.cmbCondition2 = new Common.UI.ComboBox({
el : $('#id-search-end-digital-combo', this.$window),
menuStyle : 'min-width: 225px;',
menuStyle : 'min-width: 225px;max-height: 135px;',
cls : 'input-group-nr',
data : this.conditions,
scrollAlwaysVisible: true,
editable : false
});
this.cmbCondition2.setValue(0);
@ -150,39 +152,34 @@ define([
name : 'asc-radio-filter-tab'
});
this.txtValue1 = new Common.UI.InputField({
this.cmbValue1 = new Common.UI.ComboBox({
el : $('#id-sd-cell-search-begin', this.$window),
template: _.template([
'<div class="input-field" style="<%= style %>">',
'<input ',
'type="<%= type %>" ',
'name="<%= name %>" ',
'class="form-control <%= cls %>" style="float:none" ',
'placeholder="<%= placeHolder %>" ',
'value="<%= value %>"',
'>',
'</div>'].join('')),
allowBlank : true,
validateOnChange: true,
validation : function () { return true; }
cls : 'input-group-nr',
menuStyle : 'min-width: 225px;max-height: 135px;',
scrollAlwaysVisible: true,
data : []
});
this.txtValue2 = new Common.UI.InputField({
this.cmbValue2 = new Common.UI.ComboBox({
el : $('#id-sd-cell-search-end', this.$window),
template: _.template([
'<div class="input-field" style="<%= style %>">',
'<input ',
'type="<%= type %>" ',
'name="<%= name %>" ',
'class="form-control <%= cls %>" style="float:none" ',
'placeholder="<%= placeHolder %>" ',
'value="<%= value %>"',
'>',
'</div>'].join('')),
allowBlank : true,
validateOnChange: true,
validation : function () { return true; }
cls : 'input-group-nr',
menuStyle : 'min-width: 225px;max-height: 135px;',
scrollAlwaysVisible: true,
data : []
});
var comparator = function(item1, item2) {
var n1 = item1.get('intval'),
n2 = item2.get('intval'),
isN1 = n1!==undefined,
isN2 = n2!==undefined;
if (isN1 !== isN2) return (isN1) ? -1 : 1;
!isN1 && (n1 = item1.get('value').toLowerCase()) && (n2 = item2.get('value').toLowerCase());
if (n1==n2) return 0;
return (n2=='' || n1!=='' && n1<n2) ? -1 : 1;
};
this.cmbValue1.store.comparator = this.cmbValue2.store.comparator = comparator;
this.$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
this.loadDefaults();
@ -192,8 +189,8 @@ define([
var me = this;
_.defer(function () {
if (me.txtValue1) {
me.txtValue1.focus();
if (me.cmbValue1) {
me.cmbValue1._input.focus();
}
}, 500);
},
@ -221,8 +218,18 @@ define([
loadDefaults: function () {
if (this.properties && this.rbOr && this.rbAnd &&
this.cmbCondition1 && this.cmbCondition2 && this.txtValue1 && this.txtValue2) {
this.cmbCondition1 && this.cmbCondition2 && this.cmbValue1 && this.cmbValue2) {
var arr = [];
this.properties.asc_getValues().forEach(function (item) {
var value = item.asc_getText();
if (!_.isEmpty(value)) {
arr.push({value: value, displayValue: value,
intval: (!isNaN(parseFloat(value)) && isFinite(value)) ? parseFloat(value) : undefined});
}
});
this.cmbValue1.setData(arr);
this.cmbValue2.setData(arr);
var filterObj = this.properties.asc_getFilterObj();
if (filterObj.asc_getType() == Asc.c_oAscAutoFilterTypes.CustomFilters) {
var customFilter = filterObj.asc_getFilter(),
@ -233,14 +240,14 @@ define([
this.cmbCondition1.setValue(customFilters[0].asc_getOperator() || Asc.c_oAscCustomAutoFilter.equals);
this.cmbCondition2.setValue((customFilters.length>1) ? (customFilters[1].asc_getOperator() || 0) : 0);
this.txtValue1.setValue(null === customFilters[0].asc_getVal() ? '' : customFilters[0].asc_getVal());
this.txtValue2.setValue((customFilters.length>1) ? (null === customFilters[1].asc_getVal() ? '' : customFilters[1].asc_getVal()) : '');
this.cmbValue1.setValue(null === customFilters[0].asc_getVal() ? '' : customFilters[0].asc_getVal());
this.cmbValue2.setValue((customFilters.length>1) ? (null === customFilters[1].asc_getVal() ? '' : customFilters[1].asc_getVal()) : '');
}
}
},
save: function () {
if (this.api && this.properties && this.rbOr && this.rbAnd &&
this.cmbCondition1 && this.cmbCondition2 && this.txtValue1 && this.txtValue2) {
this.cmbCondition1 && this.cmbCondition2 && this.cmbValue1 && this.cmbValue2) {
var filterObj = this.properties.asc_getFilterObj();
filterObj.asc_setFilter(new Asc.CustomFilters());
@ -253,10 +260,10 @@ define([
customFilter.asc_setAnd(this.rbAnd.getValue());
customFilters[0].asc_setOperator(this.cmbCondition1.getValue());
customFilters[0].asc_setVal(this.txtValue1.getValue());
customFilters[0].asc_setVal(this.cmbValue1.getValue());
if (this.cmbCondition2.getValue() !== 0) {
customFilters[1].asc_setOperator(this.cmbCondition2.getValue() || undefined);
customFilters[1].asc_setVal(this.txtValue2.getValue());
customFilters[1].asc_setVal(this.cmbValue2.getValue());
}
this.api.asc_applyAutoFilter(this.properties);
@ -390,8 +397,8 @@ define([
var me = this;
_.defer(function () {
if (me.txtValue1) {
me.txtValue1.focus();
if (me.spnCount) {
me.spnCount.$input.focus();
}
}, 500);
},

View file

@ -102,10 +102,8 @@ define([
},
ChangeSettings: function(props) {
if (this._initSettings) {
if (this._initSettings)
this.createDelayedElements();
this._initSettings = false;
}
this.disableControls(this._locked);
@ -316,6 +314,7 @@ define([
createDelayedElements: function() {
this.createDelayedControls();
this.updateMetricUnit();
this._initSettings = false;
},
onWidthChange: function(field, newValue, oldValue, eOpts){

View file

@ -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;
}

View file

@ -193,13 +193,12 @@ define([
createDelayedElements: function() {
this.createDelayedControls();
this.updateMetricUnit();
this._initSettings = false;
},
ChangeSettings: function(props) {
if (this._initSettings) {
if (this._initSettings)
this.createDelayedElements();
this._initSettings = false;
}
this.disableControls(this._locked);

View file

@ -177,10 +177,8 @@ define([
},
ChangeSettings: function(prop) {
if (this._initSettings) {
if (this._initSettings)
this.createDelayedElements();
this._initSettings = false;
}
this.disableControls(this._locked);
@ -328,6 +326,7 @@ define([
createDelayedElements: function() {
this.createDelayedControls();
this.updateMetricUnit();
this._initSettings = false;
},
openAdvancedSettings: function(e) {

View file

@ -698,7 +698,6 @@ define([
ChangeSettings: function(props) {
if (this._initSettings)
this.createDelayedElements();
this._initSettings = false;
if (this.imgprops==null)
this.imgprops = new Asc.asc_CImgProperty();
@ -1336,6 +1335,7 @@ define([
this.fillAutoShapes();
this.UpdateThemeColors();
this._initSettings = false;
},
onInitStandartTextures: function(texture) {

View file

@ -249,13 +249,13 @@ define([
}, this));
this.btnEdit.menu.on('item:click', _.bind(this.onEditClick, this));
this.lockedControls.push(this.btnEdit);
this._initSettings = false;
},
ChangeSettings: function(props) {
if (this._initSettings) {
if (this._initSettings)
this.createDelayedControls();
this._initSettings = false;
}
this.disableControls(this._locked);

View file

@ -664,7 +664,6 @@ define([
if (this._initSettings)
this.createDelayedElements();
this._initSettings = false;
if (props && props.asc_getShapeProperties() && props.asc_getShapeProperties().get_TextArtProperties())
{
@ -1310,6 +1309,7 @@ define([
this.UpdateThemeColors();
this.fillTransform(this.api.asc_getPropertyEditorTextArts());
this._initSettings = false;
},
onInitStandartTextures: function(texture) {

View file

@ -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;

View file

@ -145,6 +145,7 @@
"SSE.Controllers.Main.errorBadImageUrl": "Image URL is incorrect",
"SSE.Controllers.Main.errorCoAuthoringDisconnect": "Server connection lost. The document cannot be edited right now.",
"SSE.Controllers.Main.errorConnectToServer": "The document could not be saved. Please check connection settings or contact your administrator.<br>When you click the 'OK' button, you will be prompted to download the document.<br><br>Find more information about connecting Document Server <a href=\"https://api.onlyoffice.com/editors/callback\" target=\"_blank\">here</a>",
"SSE.Controllers.Main.errorCopyMultiselectArea": "This command cannot be used with multiple selections.<br>Select a single range and try again.",
"SSE.Controllers.Main.errorCountArg": "An error in the entered formula.<br>Incorrect number of arguments is used.",
"SSE.Controllers.Main.errorCountArgExceed": "An error in the entered formula.<br>Number of arguments is exceeded.",
"SSE.Controllers.Main.errorCreateDefName": "The existing named ranges cannot be edited and the new ones cannot be created<br>at the moment as some of them are being edited.",
@ -173,7 +174,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.",

View file

@ -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.",

View file

@ -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.",