diff --git a/apps/common/forms/resources/less/common.less b/apps/common/forms/resources/less/common.less index c1a0ccd51..dbfb92bcd 100644 --- a/apps/common/forms/resources/less/common.less +++ b/apps/common/forms/resources/less/common.less @@ -669,4 +669,19 @@ .font-size-large { .fontsize(@font-size-large); +} + +.input-field-btn { + .select-button { + display: none; + } + + .input-error { + &:before { + right: 3px; + } + } + input { + padding-right: 0; + } } \ No newline at end of file diff --git a/apps/common/main/lib/component/DataView.js b/apps/common/main/lib/component/DataView.js index 5680c1717..380adb99e 100644 --- a/apps/common/main/lib/component/DataView.js +++ b/apps/common/main/lib/component/DataView.js @@ -1652,7 +1652,18 @@ define([ if (recents.length > 0 && diff) { me.recentShapes = recents; - me.groups[0].groupStore.reset(me.recentShapes); + var resentsStore = new Common.UI.DataViewStore(); + _.each(me.recentShapes, function (recent) { + var model = { + data: {shapeType: recent.data.shapeType}, + tip: recent.tip, + allowSelected: recent.allowSelected, + selected: recent.selected, + groupName: recent.groupName + }; + resentsStore.push(model); + }); + me.groups[0].groupStore = resentsStore; var store = new Common.UI.DataViewStore(); _.each(me.groups, function (group) { diff --git a/apps/common/main/resources/less/input.less b/apps/common/main/resources/less/input.less index a10827e2e..84218bb34 100644 --- a/apps/common/main/resources/less/input.less +++ b/apps/common/main/resources/less/input.less @@ -42,7 +42,7 @@ content: ''; position: absolute; right: 3px; - top: 4px; + top: 3px; width: 16px; height: 16px; background-position: @input-error-offset-x @input-error-offset-y; diff --git a/apps/common/main/resources/less/variables.less b/apps/common/main/resources/less/variables.less index f3810aec7..5ebe3b98a 100644 --- a/apps/common/main/resources/less/variables.less +++ b/apps/common/main/resources/less/variables.less @@ -772,11 +772,11 @@ // Input error @input-error-offset-x: -73px; -@input-error-offset-y: -170px; +@input-error-offset-y: -169px; // Input warning @input-warning-offset-x: -57px; -@input-warning-offset-y: -170px; +@input-warning-offset-y: -169px; // Spinner @spinner-offset-x: -41px; diff --git a/apps/common/mobile/lib/view/collaboration/Comments.jsx b/apps/common/mobile/lib/view/collaboration/Comments.jsx index 582a7bd99..d8927fca7 100644 --- a/apps/common/mobile/lib/view/collaboration/Comments.jsx +++ b/apps/common/mobile/lib/view/collaboration/Comments.jsx @@ -639,7 +639,7 @@ const ViewComments = inject("storeComments", "storeAppOptions", "storeReview")(o const viewMode = !storeAppOptions.canComments; const comments = storeComments.groupCollectionFilter || storeComments.collectionComments; - const isEdit = storeAppOptions.isEdit; + const isEdit = storeAppOptions.isEdit || storeAppOptions.isRestrictedEdit; const sortComments = comments.length > 0 ? [...comments].sort((a, b) => a.time > b.time ? -1 : 1) : null; const [clickComment, setComment] = useState(); @@ -749,7 +749,7 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob const displayMode = storeReview.displayMode; const viewMode = !storeAppOptions.canComments; - const isEdit = storeAppOptions.isEdit; + const isEdit = storeAppOptions.isEdit || storeAppOptions.isRestrictedEdit; const comments = storeComments.showComments; const [currentIndex, setCurrentIndex] = useState(0); diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js index 45947fc43..1fb1061d6 100644 --- a/apps/documenteditor/forms/app/controller/ApplicationController.js +++ b/apps/documenteditor/forms/app/controller/ApplicationController.js @@ -229,6 +229,7 @@ define([ case Asc.c_oAscError.ID.UpdateVersion: config.msg = this.errorUpdateVersionOnDisconnect; + config.maxwidth = 600; break; case Asc.c_oAscError.ID.AccessDeny: @@ -248,6 +249,7 @@ define([ case Asc.c_oAscError.ID.ForceSaveButton: case Asc.c_oAscError.ID.ForceSaveTimeout: config.msg = this.errorForceSave; + config.maxwidth = 600; break; case Asc.c_oAscError.ID.LoadingFontError: diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 0e98802b5..1100abf9b 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -1240,8 +1240,8 @@ define([ '', '', '', - '', - '', + '', + '', '', '', '', @@ -1254,6 +1254,11 @@ define([ '', '', '', + '', + '', + '', + '', + '', '', '', '', @@ -1412,6 +1417,7 @@ define([ this.lblPdfAuthor = $markup.findById('#id-lbl-info-author'); this.lblPdfVer = $markup.findById('#id-info-pdf-ver'); this.lblPdfTagged = $markup.findById('#id-info-pdf-tagged'); + this.lblPdfProducer = $markup.findById('#id-info-pdf-produce'); this.lblFastWV = $markup.findById('#id-info-fast-wv'); this.btnApply = new Common.UI.Button({ @@ -1498,7 +1504,7 @@ define([ this.lblApplication.text(appname); } else if (pdfProps) { $('.docx-info', this.el).hide(); - appname = pdfProps ? pdfProps.Producer || '' : ''; + appname = pdfProps ? pdfProps.Creator || '' : ''; this.lblApplication.text(appname); } this._ShowHideInfoItem(this.lblApplication, !!appname); @@ -1625,6 +1631,10 @@ define([ this.lblPdfTagged.text(value===true ? this.txtYes : this.txtNo); this._ShowHideInfoItem(this.lblPdfTagged, value !== undefined); + value = props.Producer; + value && this.lblPdfProducer.text(value); + this._ShowHideInfoItem(this.lblPdfProducer, !!value); + value = props.FastWebView; if (value !== undefined) this.lblFastWV.text(value===true ? this.txtYes : this.txtNo); @@ -1790,7 +1800,8 @@ define([ txtPdfTagged: 'Tagged PDF', txtFastWV: 'Fast Web View', txtYes: 'Yes', - txtNo: 'No' + txtNo: 'No', + txtPdfProducer: 'PDF Producer' }, DE.Views.FileMenuPanels.DocumentInfo || {})); diff --git a/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js b/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js index 1a70d2d23..5a345e2d2 100644 --- a/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js @@ -106,6 +106,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat this.api = this.options.api; this._changedProps = null; this._changedShapeProps = null; + this._isSmartArt = false; }, render: function() { @@ -253,7 +254,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat minValue: 0 }); this.spnShapeWidth.on('change', _.bind(function(field, newValue, oldValue, eOpts){ - if (this.chRatio.getValue()=='checked' && !this.chRatio.isDisabled()) { + if (this.chRatio.getValue()=='checked' && (!this.chRatio.isDisabled() || this._isSmartArt)) { var w = field.getNumberValue(); var h = w/this._nRatio; if (h>this.sizeMax.height) { @@ -281,7 +282,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat }); this.spnShapeHeight.on('change', _.bind(function(field, newValue, oldValue, eOpts){ var h = field.getNumberValue(), w = null; - if (this.chRatio.getValue()=='checked' && !this.chRatio.isDisabled()) { + if (this.chRatio.getValue()=='checked' && (!this.chRatio.isDisabled() || this._isSmartArt)) { w = h * this._nRatio; if (w>this.sizeMax.width) { w = this.sizeMax.width; @@ -1408,7 +1409,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat this._setShapeDefaults(shapeprops); this.setTitle(this.textTitleShape); value = props.asc_getLockAspect(); - this.chRatio.setValue(value); + this.chRatio.setValue(value || this._isSmartArt, true); // can resize smart art only proportionately this.spnShapeWidth.setMaxValue(this.sizeMax.width); this.spnShapeHeight.setMaxValue(this.sizeMax.height); @@ -1450,7 +1451,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat value = props.get_Height(); this.spnShapeHeight.setValue((value!==undefined) ? Common.Utils.Metric.fnRecalcFromMM(value).toFixed(2) : '', true); } - this.chRatio.setDisabled(this.radioVSizePc.getValue() || this.radioHSizePc.getValue()); + this.chRatio.setDisabled(this.radioVSizePc.getValue() || this.radioHSizePc.getValue() || this._isSmartArt); var margins = shapeprops.get_paddings(); if (margins) { @@ -1558,11 +1559,13 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat this.radioHSizePc.setDisabled(true); this.radioVSizePc.setDisabled(true); this.btnsCategory[2].setDisabled(true); + this._isSmartArt = true; } if (props.get_FromSmartArtInternal()) { this.chAutofit.setDisabled(true); this.chFlipHor.setDisabled(true); this.chFlipVert.setDisabled(true); + this.btnsCategory[1].setDisabled(true); } var stroke = props.get_stroke(); diff --git a/apps/documenteditor/main/locale/de.json b/apps/documenteditor/main/locale/de.json index 7544cff11..a65bcc81f 100644 --- a/apps/documenteditor/main/locale/de.json +++ b/apps/documenteditor/main/locale/de.json @@ -1700,6 +1700,7 @@ "DE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Titel", "DE.Views.FileMenuPanels.DocumentInfo.txtUploaded": "Hochgeladen", "DE.Views.FileMenuPanels.DocumentInfo.txtWords": "Wörter", + "DE.Views.FileMenuPanels.DocumentInfo.txtPdfProducer": "PDF-Ersteller", "DE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Zugriffsrechte ändern", "DE.Views.FileMenuPanels.DocumentRights.txtRights": "Personen mit Berechtigungen", "DE.Views.FileMenuPanels.ProtectDoc.notcriticalErrorTitle": "Warnung", diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index dd174ddf3..b227028a7 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1708,6 +1708,7 @@ "DE.Views.FileMenuPanels.DocumentInfo.txtParagraphs": "Paragraphs", "DE.Views.FileMenuPanels.DocumentInfo.txtPdfTagged": "Tagged PDF", "DE.Views.FileMenuPanels.DocumentInfo.txtPdfVer": "PDF Version", + "DE.Views.FileMenuPanels.DocumentInfo.txtPdfProducer": "PDF Producer", "DE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Location", "DE.Views.FileMenuPanels.DocumentInfo.txtRights": "Persons who have rights", "DE.Views.FileMenuPanels.DocumentInfo.txtSpaces": "Symbols with spaces", diff --git a/apps/documenteditor/main/locale/es.json b/apps/documenteditor/main/locale/es.json index 2d4ec44eb..7480669bc 100644 --- a/apps/documenteditor/main/locale/es.json +++ b/apps/documenteditor/main/locale/es.json @@ -1702,6 +1702,7 @@ "DE.Views.FileMenuPanels.DocumentInfo.txtParagraphs": "Párrafos", "DE.Views.FileMenuPanels.DocumentInfo.txtPdfTagged": "PDF etiquetado", "DE.Views.FileMenuPanels.DocumentInfo.txtPdfVer": "Versión PDF", + "DE.Views.FileMenuPanels.DocumentInfo.txtPdfProducer": "Productor PDF", "DE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Ubicación", "DE.Views.FileMenuPanels.DocumentInfo.txtRights": "Personas que tienen derechos", "DE.Views.FileMenuPanels.DocumentInfo.txtSpaces": "Símbolos con espacios", diff --git a/apps/documenteditor/main/locale/fr.json b/apps/documenteditor/main/locale/fr.json index 4322d0030..d397ab29a 100644 --- a/apps/documenteditor/main/locale/fr.json +++ b/apps/documenteditor/main/locale/fr.json @@ -1702,6 +1702,7 @@ "DE.Views.FileMenuPanels.DocumentInfo.txtParagraphs": "Paragraphes", "DE.Views.FileMenuPanels.DocumentInfo.txtPdfTagged": "PDF marqué", "DE.Views.FileMenuPanels.DocumentInfo.txtPdfVer": "Version PDF", + "DE.Views.FileMenuPanels.DocumentInfo.txtPdfProducer": "Producteur PDF", "DE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Emplacement", "DE.Views.FileMenuPanels.DocumentInfo.txtRights": "Personnes qui ont des droits", "DE.Views.FileMenuPanels.DocumentInfo.txtSpaces": "Symboles avec des espaces", diff --git a/apps/documenteditor/main/locale/it.json b/apps/documenteditor/main/locale/it.json index 10f5b078b..6d0b2d864 100644 --- a/apps/documenteditor/main/locale/it.json +++ b/apps/documenteditor/main/locale/it.json @@ -1700,6 +1700,7 @@ "DE.Views.FileMenuPanels.DocumentInfo.txtTitle": "Titolo documento", "DE.Views.FileMenuPanels.DocumentInfo.txtUploaded": "Caricato", "DE.Views.FileMenuPanels.DocumentInfo.txtWords": "Parole", + "DE.Views.FileMenuPanels.DocumentInfo.txtPdfProducer": "Produttore PDF", "DE.Views.FileMenuPanels.DocumentRights.txtBtnAccessRights": "Modifica diritti di accesso", "DE.Views.FileMenuPanels.DocumentRights.txtRights": "Persone che hanno diritti", "DE.Views.FileMenuPanels.ProtectDoc.notcriticalErrorTitle": "Avviso", diff --git a/apps/documenteditor/main/locale/ru.json b/apps/documenteditor/main/locale/ru.json index 065187092..8ede8d475 100644 --- a/apps/documenteditor/main/locale/ru.json +++ b/apps/documenteditor/main/locale/ru.json @@ -1703,6 +1703,7 @@ "DE.Views.FileMenuPanels.DocumentInfo.txtParagraphs": "Абзацы", "DE.Views.FileMenuPanels.DocumentInfo.txtPdfTagged": "PDF с тегами", "DE.Views.FileMenuPanels.DocumentInfo.txtPdfVer": "Версия PDF", + "DE.Views.FileMenuPanels.DocumentInfo.txtPdfProducer": "Производитель PDF", "DE.Views.FileMenuPanels.DocumentInfo.txtPlacement": "Размещение", "DE.Views.FileMenuPanels.DocumentInfo.txtRights": "Люди, имеющие права", "DE.Views.FileMenuPanels.DocumentInfo.txtSpaces": "Символы с пробелами", diff --git a/apps/documenteditor/mobile/locale/az.json b/apps/documenteditor/mobile/locale/az.json index 65ac70397..99a364c7c 100644 --- a/apps/documenteditor/mobile/locale/az.json +++ b/apps/documenteditor/mobile/locale/az.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "Saxlanmamış dəyişiklikləriniz var. Avtomatik saxlanmanı gözləmək üçün \"Bu Səhifədə Qalın\" üzərinə klikləyin. Bütün saxlanmamış dəyişiklikləri ləğv etmək üçün \"Bu səhifədən Çıxın\" hissəsinin üzərinə klikləyin.", diff --git a/apps/documenteditor/mobile/locale/be.json b/apps/documenteditor/mobile/locale/be.json index 1c64fa788..e7b0a0e8b 100644 --- a/apps/documenteditor/mobile/locale/be.json +++ b/apps/documenteditor/mobile/locale/be.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveTitleText": "Вы выходзіце з праграмы", diff --git a/apps/documenteditor/mobile/locale/bg.json b/apps/documenteditor/mobile/locale/bg.json index cc3ee0c00..e1fec637e 100644 --- a/apps/documenteditor/mobile/locale/bg.json +++ b/apps/documenteditor/mobile/locale/bg.json @@ -655,7 +655,8 @@ "textPdfTagged": "Tagged PDF", "textFastWV": "Fast Web View", "textYes": "Yes", - "textNo": "No" + "textNo": "No", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", diff --git a/apps/documenteditor/mobile/locale/ca.json b/apps/documenteditor/mobile/locale/ca.json index 0e7d8ec90..fc901ffd9 100644 --- a/apps/documenteditor/mobile/locale/ca.json +++ b/apps/documenteditor/mobile/locale/ca.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "Tens canvis sense desar. Fes clic a \"Mantingueu-vos en aquesta pàgina\" per esperar al desament automàtic. Fes clic a \"Deixar aquesta pàgina\" per descartar tots els canvis no desats.", diff --git a/apps/documenteditor/mobile/locale/cs.json b/apps/documenteditor/mobile/locale/cs.json index 61e71709d..601e98424 100644 --- a/apps/documenteditor/mobile/locale/cs.json +++ b/apps/documenteditor/mobile/locale/cs.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "V tomto dokumentu máte neuložené změny. Klikněte na 'Zůstat na této stránce'. Klikněte na 'Opustit tuto stránku' pro zahození neuložených změn.", diff --git a/apps/documenteditor/mobile/locale/da.json b/apps/documenteditor/mobile/locale/da.json index cc3ee0c00..e1fec637e 100644 --- a/apps/documenteditor/mobile/locale/da.json +++ b/apps/documenteditor/mobile/locale/da.json @@ -655,7 +655,8 @@ "textPdfTagged": "Tagged PDF", "textFastWV": "Fast Web View", "textYes": "Yes", - "textNo": "No" + "textNo": "No", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", diff --git a/apps/documenteditor/mobile/locale/de.json b/apps/documenteditor/mobile/locale/de.json index 5428ce63a..7ea23d697 100644 --- a/apps/documenteditor/mobile/locale/de.json +++ b/apps/documenteditor/mobile/locale/de.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF-Ersteller" }, "Toolbar": { "dlgLeaveMsgText": "Sie haben nicht gespeicherte Änderungen. Klicken Sie auf \"Auf dieser Seite bleiben\" und warten Sie, bis die Datei automatisch gespeichert wird. Klicken Sie auf \"Die Seite verlassen\", um nicht gespeicherte Änderungen zu verwerfen.", diff --git a/apps/documenteditor/mobile/locale/el.json b/apps/documenteditor/mobile/locale/el.json index 4ed3c7ffe..b51aaac37 100644 --- a/apps/documenteditor/mobile/locale/el.json +++ b/apps/documenteditor/mobile/locale/el.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "Έχετε μη αποθηκευμένες αλλαγές. Πατήστε 'Παραμονή στη Σελίδα' για να περιμένετε την αυτόματη αποθήκευση. Πατήστε 'Έξοδος από τη Σελίδα' για να απορρίψετε όλες τις μη αποθηκευμένες αλλαγές.", diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index a572771a2..f64b62ab6 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -604,6 +604,7 @@ "textParagraphs": "Paragraphs", "textPdfTagged": "Tagged PDF", "textPdfVer": "PDF Version", + "textPdfProducer": "PDF Producer", "textPoint": "Point", "textPortrait": "Portrait", "textPrint": "Print", diff --git a/apps/documenteditor/mobile/locale/es.json b/apps/documenteditor/mobile/locale/es.json index 285376d0e..c32ec8ca1 100644 --- a/apps/documenteditor/mobile/locale/es.json +++ b/apps/documenteditor/mobile/locale/es.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "Productor PDF" }, "Toolbar": { "dlgLeaveMsgText": "Tiene cambios sin guardar. Haga clic en \"Permanecer en esta página\" para esperar a que se guarde automáticamente. Haga clic en \"Salir de esta página\" para descartar todos los cambios no guardados.", diff --git a/apps/documenteditor/mobile/locale/fi.json b/apps/documenteditor/mobile/locale/fi.json index cc3ee0c00..e1fec637e 100644 --- a/apps/documenteditor/mobile/locale/fi.json +++ b/apps/documenteditor/mobile/locale/fi.json @@ -655,7 +655,8 @@ "textPdfTagged": "Tagged PDF", "textFastWV": "Fast Web View", "textYes": "Yes", - "textNo": "No" + "textNo": "No", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", diff --git a/apps/documenteditor/mobile/locale/fr.json b/apps/documenteditor/mobile/locale/fr.json index 4bbb151eb..854dce451 100644 --- a/apps/documenteditor/mobile/locale/fr.json +++ b/apps/documenteditor/mobile/locale/fr.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "Producteur PDF" }, "Toolbar": { "dlgLeaveMsgText": "Vous avez des modifications non enregistrées dans ce document. Cliquez sur Rester sur cette page et attendez l'enregistrement automatique. Cliquez sur Quitter cette page pour annuler toutes les modifications non enregistrées.", diff --git a/apps/documenteditor/mobile/locale/gl.json b/apps/documenteditor/mobile/locale/gl.json index 25ac5103a..ef470b5fb 100644 --- a/apps/documenteditor/mobile/locale/gl.json +++ b/apps/documenteditor/mobile/locale/gl.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "Ten cambios sen gardar. Prema en \"Permanecer nesta páxina\" para esperar a que se garde automaticamente. Prema en \"Saír desta páxina\" para descartar todos os cambios non gardados.", diff --git a/apps/documenteditor/mobile/locale/hu.json b/apps/documenteditor/mobile/locale/hu.json index 5d75465bb..a9145fd92 100644 --- a/apps/documenteditor/mobile/locale/hu.json +++ b/apps/documenteditor/mobile/locale/hu.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "Nem mentett módosításai vannak. Kattintson a „Maradj ezen az oldalon” gombra az automatikus mentés megvárásához. Kattintson a \"Hagyja el ezt az oldalt\" gombra az összes nem mentett módosítás elvetéséhez.", diff --git a/apps/documenteditor/mobile/locale/it.json b/apps/documenteditor/mobile/locale/it.json index e2df4e1a8..ed157734b 100644 --- a/apps/documenteditor/mobile/locale/it.json +++ b/apps/documenteditor/mobile/locale/it.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "Produttore PDF" }, "Toolbar": { "dlgLeaveMsgText": "Hai dei cambiamenti non salvati. Premi 'Rimanere sulla pagina' per attendere il salvataggio automatico. Premi 'Lasciare la pagina' per eliminare tutte le modifiche non salvate.", diff --git a/apps/documenteditor/mobile/locale/ja.json b/apps/documenteditor/mobile/locale/ja.json index 630c72a9e..6b1ce026f 100644 --- a/apps/documenteditor/mobile/locale/ja.json +++ b/apps/documenteditor/mobile/locale/ja.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "保存されていない変更があります。自動保存を待つように「このページから移動しない」をクリックしてください。保存されていない変更を破棄ように「このページから移動する」をクリックしてください。", diff --git a/apps/documenteditor/mobile/locale/ko.json b/apps/documenteditor/mobile/locale/ko.json index 25b34b8e3..03da8cf7f 100644 --- a/apps/documenteditor/mobile/locale/ko.json +++ b/apps/documenteditor/mobile/locale/ko.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "저장하지 않은 변경 사항이 있습니다. 자동 저장이 완료될 때까지 기다리려면 \"이 페이지에 머물기\"를 클릭하십시오. \"이 페이지에서 나가기\"를 클릭하면 저장되지 않은 모든 변경 사항이 삭제됩니다.", diff --git a/apps/documenteditor/mobile/locale/lo.json b/apps/documenteditor/mobile/locale/lo.json index 19f65ddac..22ae4a6a5 100644 --- a/apps/documenteditor/mobile/locale/lo.json +++ b/apps/documenteditor/mobile/locale/lo.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "ທ່ານມີການປ່ຽນແປງທີ່ຍັງບໍ່ໄດ້ບັນທຶກໄວ້. ຄລິກທີ່ 'ຢູ່ໃນໜ້ານີ້' ເພື່ອລໍຖ້າການບັນທຶກອັດຕະໂນມັດ. ຄລິກ 'ອອກຈາກໜ້ານີ້' ເພື່ອຍົກເລີກການປ່ຽນແປງທີ່ບໍ່ໄດ້ບັນທຶກໄວ້ທັງໝົດ.", diff --git a/apps/documenteditor/mobile/locale/lv.json b/apps/documenteditor/mobile/locale/lv.json index cc3ee0c00..e1fec637e 100644 --- a/apps/documenteditor/mobile/locale/lv.json +++ b/apps/documenteditor/mobile/locale/lv.json @@ -655,7 +655,8 @@ "textPdfTagged": "Tagged PDF", "textFastWV": "Fast Web View", "textYes": "Yes", - "textNo": "No" + "textNo": "No", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", diff --git a/apps/documenteditor/mobile/locale/nb.json b/apps/documenteditor/mobile/locale/nb.json index cc3ee0c00..e1fec637e 100644 --- a/apps/documenteditor/mobile/locale/nb.json +++ b/apps/documenteditor/mobile/locale/nb.json @@ -655,7 +655,8 @@ "textPdfTagged": "Tagged PDF", "textFastWV": "Fast Web View", "textYes": "Yes", - "textNo": "No" + "textNo": "No", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", diff --git a/apps/documenteditor/mobile/locale/nl.json b/apps/documenteditor/mobile/locale/nl.json index 20b7f9a82..42286e941 100644 --- a/apps/documenteditor/mobile/locale/nl.json +++ b/apps/documenteditor/mobile/locale/nl.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "U heeft nog niet opgeslagen wijzigingen. Klik op 'Blijf op deze pagina' om te wachten op automatisch opslaan. Klik op 'Verlaat deze pagina' om alle niet-opgeslagen wijzigingen te verwijderen.", diff --git a/apps/documenteditor/mobile/locale/pl.json b/apps/documenteditor/mobile/locale/pl.json index cc3ee0c00..e1fec637e 100644 --- a/apps/documenteditor/mobile/locale/pl.json +++ b/apps/documenteditor/mobile/locale/pl.json @@ -655,7 +655,8 @@ "textPdfTagged": "Tagged PDF", "textFastWV": "Fast Web View", "textYes": "Yes", - "textNo": "No" + "textNo": "No", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", diff --git a/apps/documenteditor/mobile/locale/pt.json b/apps/documenteditor/mobile/locale/pt.json index 5a8fff274..077cb83de 100644 --- a/apps/documenteditor/mobile/locale/pt.json +++ b/apps/documenteditor/mobile/locale/pt.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "Você tem mudanças não salvas. Clique em 'Ficar nesta página' para esperar pela auto-salvar. Clique em 'Sair desta página' para descartar todas as mudanças não salvas.", diff --git a/apps/documenteditor/mobile/locale/ro.json b/apps/documenteditor/mobile/locale/ro.json index 54b830f03..026b0279d 100644 --- a/apps/documenteditor/mobile/locale/ro.json +++ b/apps/documenteditor/mobile/locale/ro.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "Nu ați salvat modificările din documentul. Faceți clic pe Rămâi în pagină și așteptați la salvare automată. Faceți clic pe Părăsește aceasta pagina ca să renunțați la toate modificările nesalvate.", diff --git a/apps/documenteditor/mobile/locale/ru.json b/apps/documenteditor/mobile/locale/ru.json index e3f06219a..676f21962 100644 --- a/apps/documenteditor/mobile/locale/ru.json +++ b/apps/documenteditor/mobile/locale/ru.json @@ -603,6 +603,7 @@ "textParagraphs": "Абзацы", "textPdfTagged": "PDF с тегами", "textPdfVer": "Версия PDF", + "textPdfProducer": "Производитель PDF", "textPoint": "Пункт", "textPortrait": "Книжная", "textPrint": "Печать", diff --git a/apps/documenteditor/mobile/locale/sk.json b/apps/documenteditor/mobile/locale/sk.json index a7d607ae7..08fa93d20 100644 --- a/apps/documenteditor/mobile/locale/sk.json +++ b/apps/documenteditor/mobile/locale/sk.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "Máte neuložené zmeny. Kliknite na „Zostať na tejto stránke“ a počkajte na automatické uloženie. Kliknutím na „Opustiť túto stránku“ zahodíte všetky neuložené zmeny.", diff --git a/apps/documenteditor/mobile/locale/sl.json b/apps/documenteditor/mobile/locale/sl.json index cc3ee0c00..e1fec637e 100644 --- a/apps/documenteditor/mobile/locale/sl.json +++ b/apps/documenteditor/mobile/locale/sl.json @@ -655,7 +655,8 @@ "textPdfTagged": "Tagged PDF", "textFastWV": "Fast Web View", "textYes": "Yes", - "textNo": "No" + "textNo": "No", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", diff --git a/apps/documenteditor/mobile/locale/sv.json b/apps/documenteditor/mobile/locale/sv.json index cc3ee0c00..e1fec637e 100644 --- a/apps/documenteditor/mobile/locale/sv.json +++ b/apps/documenteditor/mobile/locale/sv.json @@ -655,7 +655,8 @@ "textPdfTagged": "Tagged PDF", "textFastWV": "Fast Web View", "textYes": "Yes", - "textNo": "No" + "textNo": "No", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", diff --git a/apps/documenteditor/mobile/locale/tr.json b/apps/documenteditor/mobile/locale/tr.json index d147a198e..2035cb607 100644 --- a/apps/documenteditor/mobile/locale/tr.json +++ b/apps/documenteditor/mobile/locale/tr.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "Kaydedilmemiş değişiklikleriniz mevcut. Otomatik kaydetmeyi beklemek için 'Bu Sayfada Kal' seçeneğini tıklayın. Kaydedilmemiş tüm değişiklikleri atmak için 'Bu Sayfadan Ayrıl'ı tıklayın.", diff --git a/apps/documenteditor/mobile/locale/uk.json b/apps/documenteditor/mobile/locale/uk.json index 11705e78d..cf82c5042 100644 --- a/apps/documenteditor/mobile/locale/uk.json +++ b/apps/documenteditor/mobile/locale/uk.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "У документі є незбережені зміни. Натисніть 'Залишитись на сторінці', щоб дочекатися автозбереження. Натисніть 'Піти зі сторінки', щоб скинути всі незбережені зміни.", diff --git a/apps/documenteditor/mobile/locale/vi.json b/apps/documenteditor/mobile/locale/vi.json index cc3ee0c00..e1fec637e 100644 --- a/apps/documenteditor/mobile/locale/vi.json +++ b/apps/documenteditor/mobile/locale/vi.json @@ -655,7 +655,8 @@ "textPdfTagged": "Tagged PDF", "textFastWV": "Fast Web View", "textYes": "Yes", - "textNo": "No" + "textNo": "No", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.", diff --git a/apps/documenteditor/mobile/locale/zh.json b/apps/documenteditor/mobile/locale/zh.json index 12028855c..e3e100b0b 100644 --- a/apps/documenteditor/mobile/locale/zh.json +++ b/apps/documenteditor/mobile/locale/zh.json @@ -655,7 +655,8 @@ "textNavigation": "Navigation", "textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.", "textBeginningDocument": "Beginning of document", - "textEmptyHeading": "Empty Heading" + "textEmptyHeading": "Empty Heading", + "textPdfProducer": "PDF Producer" }, "Toolbar": { "dlgLeaveMsgText": "你有未保存的修改。点击“留在该页”可等待自动保存完成。点击“离开该页”将丢弃全部未经保存的修改。", diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index ce6156a16..76fa94912 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -704,7 +704,7 @@ class MainController extends Component { this.api.asc_registerCallback('asc_onGetDocInfoEnd', () => { clearTimeout(this.timerLoading); clearInterval(this.timerDocInfo); - storeDocumentInfo.switchIsLoaded(true); + storeDocumentInfo.changeCount(this.objectInfo); }); // Color Schemes diff --git a/apps/documenteditor/mobile/src/controller/settings/DocumentInfo.jsx b/apps/documenteditor/mobile/src/controller/settings/DocumentInfo.jsx index 72ef0f16a..6f859d051 100644 --- a/apps/documenteditor/mobile/src/controller/settings/DocumentInfo.jsx +++ b/apps/documenteditor/mobile/src/controller/settings/DocumentInfo.jsx @@ -88,6 +88,9 @@ class DocumentInfoController extends Component { value = props.Version; if(value) this.docInfoObject.version = value; + value = props.Producer; + if(value) this.docInfoObject.producer = value; + value = props.Tagged; if (value !== undefined) this.docInfoObject.tagged = (value===true ? _t.textYes : _t.textNo); @@ -120,7 +123,7 @@ class DocumentInfoController extends Component { return appName || ''; } else if (this.pdfProps) { - appName = this.pdfProps ? this.pdfProps.Producer || '' : ''; + appName = this.pdfProps ? this.pdfProps.Creator || '' : ''; return appName; } } diff --git a/apps/documenteditor/mobile/src/store/appOptions.js b/apps/documenteditor/mobile/src/store/appOptions.js index caf9cea01..794e650bd 100644 --- a/apps/documenteditor/mobile/src/store/appOptions.js +++ b/apps/documenteditor/mobile/src/store/appOptions.js @@ -114,15 +114,20 @@ export class storeAppOptions { this.canComments = this.canLicense && (permissions.comment === undefined ? this.isEdit : permissions.comment) && (this.config.mode !== 'view'); this.canComments = this.canComments && !((typeof (this.customization) == 'object') && this.customization.comments===false); this.canViewComments = this.canComments || !((typeof (this.customization) == 'object') && this.customization.comments===false); - this.canEditComments = this.isOffline || !(typeof (this.customization) == 'object' && this.customization.commentAuthorOnly); + this.canEditComments = this.isOffline || !permissions.editCommentAuthorOnly; this.canDeleteComments= this.isOffline || !permissions.deleteCommentAuthorOnly; + if ((typeof (this.customization) == 'object') && this.customization.commentAuthorOnly===true) { + console.log("Obsolete: The 'commentAuthorOnly' parameter of the 'customization' section is deprecated. Please use 'editCommentAuthorOnly' and 'deleteCommentAuthorOnly' parameters in the permissions instead."); + if (permissions.editCommentAuthorOnly===undefined && permissions.deleteCommentAuthorOnly===undefined) + this.canEditComments = this.canDeleteComments = this.isOffline; + } this.canChat = this.canLicense && !this.isOffline && (permissions.chat !== false); this.canEditStyles = this.canLicense && this.canEdit; this.canPrint = (permissions.print !== false); this.fileKey = document.key; const typeForm = /^(?:(oform))$/.exec(document.fileType); // can fill forms only in oform format this.canFillForms = this.canLicense && !!(typeForm && typeof typeForm[1] === 'string') && ((permissions.fillForms===undefined) ? this.isEdit : permissions.fillForms) && (this.config.mode !== 'view'); - this.isRestrictedEdit = !this.isEdit && (this.canComments || this.canFillForms); + this.isRestrictedEdit = !this.isEdit && (this.canComments || this.canFillForms) && isSupportEditFeature; if (this.isRestrictedEdit && this.canComments && this.canFillForms) // must be one restricted mode, priority for filling forms this.canComments = false; this.trialMode = params.asc_getLicenseMode(); diff --git a/apps/documenteditor/mobile/src/view/settings/DocumentInfo.jsx b/apps/documenteditor/mobile/src/view/settings/DocumentInfo.jsx index d45a1bf04..b414c41cd 100644 --- a/apps/documenteditor/mobile/src/view/settings/DocumentInfo.jsx +++ b/apps/documenteditor/mobile/src/view/settings/DocumentInfo.jsx @@ -28,6 +28,7 @@ const PageDocumentInfo = (props) => { modifyBy, modifyDate, author, + producer, version, tagged, fastWebView, @@ -145,9 +146,24 @@ const PageDocumentInfo = (props) => { ) : null} + {fileType === 'pdf' && author ? ( + + {t('Settings.textAuthor')} + + + + + ) : null} + { fileType === 'pdf' && producer ? ( + + {t('Settings.textPdfProducer')} + + + + + ) : null} { fileType === 'pdf' ? ( - diff --git a/apps/presentationeditor/main/app/controller/Animation.js b/apps/presentationeditor/main/app/controller/Animation.js index 9e94feb01..eda06eca8 100644 --- a/apps/presentationeditor/main/app/controller/Animation.js +++ b/apps/presentationeditor/main/app/controller/Animation.js @@ -174,7 +174,7 @@ define([ handler : function(result, value) { if (result == 'ok') { if (me.api) { - me.addNewEffect(value.activeEffect, value.activeGroupValue, value.activeGroup, replace, undefined, !Common.Utils.InternalSettings.get("pe-animation-no-preview")); + me.addNewEffect(value.activeEffect, value.activeGroupValue, value.activeGroup, replace, undefined); } } } @@ -189,7 +189,7 @@ define([ addNewEffect: function (type, group, groupName, replace, parametr, preview) { var parameter = this.view.setMenuParameters(type, groupName, parametr); - this.api.asc_AddAnimation(group, type, (parameter != undefined)?parameter:0, replace, preview); + this.api.asc_AddAnimation(group, type, (parameter != undefined)?parameter:0, replace, !Common.Utils.InternalSettings.get("pe-animation-no-auto-preview")); }, onDurationChange: function(before,combo, record, e) { diff --git a/apps/presentationeditor/main/app/view/Animation.js b/apps/presentationeditor/main/app/view/Animation.js index 49092ef33..b17125654 100644 --- a/apps/presentationeditor/main/app/view/Animation.js +++ b/apps/presentationeditor/main/app/view/Animation.js @@ -76,6 +76,12 @@ define([ me.btnPreview.on('click', _.bind(function(btn) { me.fireEvent('animation:preview', [me.btnPreview]); }, me)); + me.btnPreview.menu.on('item:click', _.bind(function(menu, item, e) { + if (item.value === 'preview') + me.fireEvent('animation:preview', [me.btnPreview]); + else if (item.value === 'auto') + Common.Utils.InternalSettings.set("pe-animation-no-auto-preview", !item.checked); + }, me)); } if(me.cmbTrigger) @@ -240,7 +246,8 @@ define([ this.btnPreview = new Common.UI.Button({ cls: 'btn-toolbar x-huge icon-top', // x-huge icon-top', caption: this.txtPreview, - split: false, + split: true, + menu: true, iconCls: 'toolbar__icon animation-preview-start', lock: [_set.slideDeleted, _set.noSlides, _set.noAnimationPreview, _set.timingLock], dataHint: '1', @@ -350,7 +357,7 @@ define([ width: 55, value: '', defaultUnit: this.txtSec, - maxValue: 300, + maxValue: 60, minValue: 0, lock: [_set.slideDeleted, _set.noSlides, _set.noGraphic, _set.noAnimation, _set.timingLock], dataHint: '1', @@ -514,6 +521,15 @@ define([ me.btnAddAnimation.menu.setInnerMenu([{menu: picker, index: 0}]); }; me.btnAddAnimation.menu.on('show:before', onShowBefore); + + me.btnPreview.setMenu( new Common.UI.Menu({ + style: "min-width: auto;", + items: [ + {caption: me.txtPreview, value: 'preview'}, + {caption: me.textAutoPreview, value: 'auto', checkable: true, checked: !Common.Utils.InternalSettings.get("pe-animation-no-auto-preview")} + ] + })); + setEvents.call(me); }); }, @@ -626,7 +642,8 @@ define([ str3: '3 s (Slow)', str2: '2 s (Medium)', str1: '1 s (Fast)', - str0_5: '0.5 s (Very Fast)' + str0_5: '0.5 s (Very Fast)', + textAutoPreview: 'AutoPreview' } }()), PE.Views.Animation || {})); diff --git a/apps/presentationeditor/main/app/view/AnimationDialog.js b/apps/presentationeditor/main/app/view/AnimationDialog.js index d8f051f78..852c1b5b6 100644 --- a/apps/presentationeditor/main/app/view/AnimationDialog.js +++ b/apps/presentationeditor/main/app/view/AnimationDialog.js @@ -44,7 +44,7 @@ define([ PE.Views.AnimationDialog = Common.UI.Window.extend(_.extend({ options: { width: 350, - height: 426, + height: 396, header: true, cls: 'animation-dlg', buttons: ['ok', 'cancel'] @@ -57,8 +57,8 @@ define([ '
', '
', '
', - '
', - '
', + '
', + // '
', '
' ].join(''); this.allEffects = Common.define.effectData.getEffectFullData(); @@ -125,11 +125,11 @@ define([ }); this.lstEffectList.on('item:select', _.bind(this.onEffectListItem,this)); - this.chPreview = new Common.UI.CheckBox({ - el : $('#animation-setpreview'), - labelText : this.textPreviewEffect, - value: !Common.Utils.InternalSettings.get("pe-animation-no-preview") - }).on('change', _.bind(this.onPreviewChange, this)); + // this.chPreview = new Common.UI.CheckBox({ + // el : $('#animation-setpreview'), + // labelText : this.textPreviewEffect, + // value: !Common.Utils.InternalSettings.get("pe-animation-no-preview") + // }).on('change', _.bind(this.onPreviewChange, this)); this.cmbGroup.setValue(this._state.activeGroupValue); this.fillLevel(); @@ -138,7 +138,7 @@ define([ }, getFocusedComponents: function() { - return [ this.cmbGroup, this.cmbLevel, this.lstEffectList, this.chPreview]; + return [ this.cmbGroup, this.cmbLevel, this.lstEffectList/*, this.chPreview*/]; }, getDefaultFocusableComponent: function () { diff --git a/apps/presentationeditor/main/app/view/ShapeSettingsAdvanced.js b/apps/presentationeditor/main/app/view/ShapeSettingsAdvanced.js index 345c0fa80..d7eda7afd 100644 --- a/apps/presentationeditor/main/app/view/ShapeSettingsAdvanced.js +++ b/apps/presentationeditor/main/app/view/ShapeSettingsAdvanced.js @@ -629,6 +629,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem this.radioFit.setDisabled(true); this.chFlipHor.setDisabled(true); this.chFlipVert.setDisabled(true); + this.btnsCategory[0].setDisabled(true); } this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(props.asc_getWidth()).toFixed(2), true); @@ -638,7 +639,8 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem this._nRatio = props.asc_getWidth()/props.asc_getHeight(); var value = props.asc_getLockAspect(); - this.btnRatio.toggle(value); + this.btnRatio.toggle(value || props.get_FromSmartArt()); + this.btnRatio.setDisabled(!!props.get_FromSmartArt()); // can resize smart art only proportionately this.cmbFromX.setValue('left'); this.cmbFromY.setValue('left'); diff --git a/apps/presentationeditor/main/locale/ca.json b/apps/presentationeditor/main/locale/ca.json index 358759a01..fc6c116aa 100644 --- a/apps/presentationeditor/main/locale/ca.json +++ b/apps/presentationeditor/main/locale/ca.json @@ -1303,6 +1303,7 @@ "PE.Views.Animation.strRewind": "Rebobina", "PE.Views.Animation.strStart": "Inici", "PE.Views.Animation.strTrigger": "Disparador", + "PE.Views.Animation.textAutoPreview": "Visualització prèvia automàtica", "PE.Views.Animation.textMoreEffects": "Mostra més efectes", "PE.Views.Animation.textMoveEarlier": "Abans", "PE.Views.Animation.textMoveLater": "Després", diff --git a/apps/presentationeditor/main/locale/cs.json b/apps/presentationeditor/main/locale/cs.json index 69aa2349f..68f172fc5 100644 --- a/apps/presentationeditor/main/locale/cs.json +++ b/apps/presentationeditor/main/locale/cs.json @@ -1303,6 +1303,7 @@ "PE.Views.Animation.strRewind": "Vrátit na začátek", "PE.Views.Animation.strStart": "Spustit", "PE.Views.Animation.strTrigger": "Spouštěč", + "PE.Views.Animation.textAutoPreview": "Automatický náhled", "PE.Views.Animation.textMoreEffects": "Zobrazit další efekty", "PE.Views.Animation.textMoveEarlier": "Přesunout dřívější", "PE.Views.Animation.textMoveLater": "Přesunout pozdější", diff --git a/apps/presentationeditor/main/locale/de.json b/apps/presentationeditor/main/locale/de.json index 7ec1d6b25..bdedaf5eb 100644 --- a/apps/presentationeditor/main/locale/de.json +++ b/apps/presentationeditor/main/locale/de.json @@ -1288,6 +1288,7 @@ "PE.Views.Animation.strRewind": "Zurückspulen", "PE.Views.Animation.strStart": "Start", "PE.Views.Animation.strTrigger": "Trigger", + "PE.Views.Animation.textAutoPreview": "AutoVorschau", "PE.Views.Animation.textMoreEffects": "Mehr Effekte anzeigen", "PE.Views.Animation.textMoveEarlier": "Früher", "PE.Views.Animation.textMoveLater": "Später", diff --git a/apps/presentationeditor/main/locale/el.json b/apps/presentationeditor/main/locale/el.json index 2b03aa53f..3c94702bf 100644 --- a/apps/presentationeditor/main/locale/el.json +++ b/apps/presentationeditor/main/locale/el.json @@ -1291,6 +1291,7 @@ "PE.Views.Animation.strRewind": "Επανάληψη", "PE.Views.Animation.strStart": "Εκκίνηση", "PE.Views.Animation.strTrigger": "Ενεργοποίηση", + "PE.Views.Animation.textAutoPreview": "Αυτόματη προεπισκόπηση", "PE.Views.Animation.textMoreEffects": "Εμφάνιση Περισσότερων Εφφέ", "PE.Views.Animation.textMoveEarlier": "Μετακίνησε Νωρίτερα", "PE.Views.Animation.textMoveLater": "Μετακίνησε Αργότερα", diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index b979b7167..e90c5e7f2 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -1308,6 +1308,7 @@ "PE.Views.Animation.strRewind": "Rewind", "PE.Views.Animation.strStart": "Start", "PE.Views.Animation.strTrigger": "Trigger", + "PE.Views.Animation.textAutoPreview": "AutoPreview", "PE.Views.Animation.textMoreEffects": "Show More Effects", "PE.Views.Animation.textMoveEarlier": "Move Earlier", "PE.Views.Animation.textMoveLater": "Move Later", diff --git a/apps/presentationeditor/main/locale/es.json b/apps/presentationeditor/main/locale/es.json index ef376c92f..0a3217fcc 100644 --- a/apps/presentationeditor/main/locale/es.json +++ b/apps/presentationeditor/main/locale/es.json @@ -1303,6 +1303,7 @@ "PE.Views.Animation.strRewind": "Rebobinar", "PE.Views.Animation.strStart": "Iniciar", "PE.Views.Animation.strTrigger": "Desencadenador", + "PE.Views.Animation.textAutoPreview": "Vista previa automática", "PE.Views.Animation.textMoreEffects": "Mostrar más efectos", "PE.Views.Animation.textMoveEarlier": "Mover antes", "PE.Views.Animation.textMoveLater": "Mover después", diff --git a/apps/presentationeditor/main/locale/fr.json b/apps/presentationeditor/main/locale/fr.json index 8aaedf8cb..9b4623071 100644 --- a/apps/presentationeditor/main/locale/fr.json +++ b/apps/presentationeditor/main/locale/fr.json @@ -1303,6 +1303,7 @@ "PE.Views.Animation.strRewind": "Rembobiner", "PE.Views.Animation.strStart": "Démarrer", "PE.Views.Animation.strTrigger": "Déclencheur", + "PE.Views.Animation.textAutoPreview": "Aperçu partiel", "PE.Views.Animation.textMoreEffects": "Afficher plus d'effets", "PE.Views.Animation.textMoveEarlier": "Déplacer avant", "PE.Views.Animation.textMoveLater": "Déplacer après", diff --git a/apps/presentationeditor/main/locale/hu.json b/apps/presentationeditor/main/locale/hu.json index 64503a9d3..78bd2b90b 100644 --- a/apps/presentationeditor/main/locale/hu.json +++ b/apps/presentationeditor/main/locale/hu.json @@ -1120,6 +1120,7 @@ "PE.Views.Animation.str20": "20 s (rendkívül lassú)", "PE.Views.Animation.str3": "3 s (lassú)", "PE.Views.Animation.str5": "5 s (nagyon lassú)", + "PE.Views.Animation.textAutoPreview": "AutoElőnézet", "PE.Views.Animation.textNoRepeat": "(nincs)", "PE.Views.Animation.textStartAfterPrevious": "Az előző után", "PE.Views.Animation.txtAddEffect": "Animáció hozzáadása", diff --git a/apps/presentationeditor/main/locale/it.json b/apps/presentationeditor/main/locale/it.json index 774fbcc08..d13bbd772 100644 --- a/apps/presentationeditor/main/locale/it.json +++ b/apps/presentationeditor/main/locale/it.json @@ -1290,6 +1290,7 @@ "PE.Views.Animation.strRewind": "Riavvolgere", "PE.Views.Animation.strStart": "Avvio", "PE.Views.Animation.strTrigger": "Grilletto", + "PE.Views.Animation.textAutoPreview": "Anteprima automatica", "PE.Views.Animation.textMoreEffects": "Mostrare più effetti", "PE.Views.Animation.textMoveEarlier": "Spostare avanti", "PE.Views.Animation.textMoveLater": "Spostare di seguito", diff --git a/apps/presentationeditor/main/locale/ja.json b/apps/presentationeditor/main/locale/ja.json index 4bac24f89..0465d0016 100644 --- a/apps/presentationeditor/main/locale/ja.json +++ b/apps/presentationeditor/main/locale/ja.json @@ -1303,6 +1303,7 @@ "PE.Views.Animation.strRewind": "巻き戻し", "PE.Views.Animation.strStart": "開始", "PE.Views.Animation.strTrigger": "トリガー", + "PE.Views.Animation.textAutoPreview": "オートプレビュー", "PE.Views.Animation.textMoreEffects": "その他の効果", "PE.Views.Animation.textMoveEarlier": "順番を早くする", "PE.Views.Animation.textMoveLater": "順番を遅くする", diff --git a/apps/presentationeditor/main/locale/ko.json b/apps/presentationeditor/main/locale/ko.json index dbd86d1b6..be65671ea 100644 --- a/apps/presentationeditor/main/locale/ko.json +++ b/apps/presentationeditor/main/locale/ko.json @@ -1303,6 +1303,7 @@ "PE.Views.Animation.strRewind": "되감기", "PE.Views.Animation.strStart": "시작", "PE.Views.Animation.strTrigger": "트리거", + "PE.Views.Animation.textAutoPreview": "자동 미리보기", "PE.Views.Animation.textMoreEffects": "더 많은 효과 표시", "PE.Views.Animation.textMoveEarlier": "더 일찍 이동", "PE.Views.Animation.textMoveLater": "나중에 이동", diff --git a/apps/presentationeditor/main/locale/lo.json b/apps/presentationeditor/main/locale/lo.json index 91ec52946..42899c5b1 100644 --- a/apps/presentationeditor/main/locale/lo.json +++ b/apps/presentationeditor/main/locale/lo.json @@ -1591,6 +1591,7 @@ "PE.Views.FileMenuPanels.Settings.strFast": "ໄວ", "PE.Views.FileMenuPanels.Settings.strFontRender": "ຕົວອັກສອນມົວ ບໍ່ເເຈ້ງ", "PE.Views.FileMenuPanels.Settings.strForcesave": "ເພີ່ມເວີຊັນໃສ່ບ່ອນເກັບຂໍ້ມູນ ຫຼັງຈາກຄລິກບັນທຶກ ຫຼື Ctrl+S", + "PE.Views.FileMenuPanels.Settings.strInputMode": "ເປີດກາຟີຣກ", "PE.Views.FileMenuPanels.Settings.strMacrosSettings": "ການຕັ້ງຄ່າ Macros", "PE.Views.FileMenuPanels.Settings.strPaste": "ຕັດ, ສຳເນົາ ແລະ ວາງ", "PE.Views.FileMenuPanels.Settings.strPasteButton": "ສະແດງປຸ່ມເລືອກວາງ ເມື່ອເນື້ອຫາໄດ້ຖືກຄັດຕິດ", diff --git a/apps/presentationeditor/main/locale/pt.json b/apps/presentationeditor/main/locale/pt.json index ba72fbaa6..9dfa47259 100644 --- a/apps/presentationeditor/main/locale/pt.json +++ b/apps/presentationeditor/main/locale/pt.json @@ -1291,6 +1291,7 @@ "PE.Views.Animation.strRewind": "Retroceder", "PE.Views.Animation.strStart": "Iniciar", "PE.Views.Animation.strTrigger": "Acionar", + "PE.Views.Animation.textAutoPreview": "AutoVisualização", "PE.Views.Animation.textMoreEffects": "Mostrar mais efeitos", "PE.Views.Animation.textMoveEarlier": "Mudança Anterior", "PE.Views.Animation.textMoveLater": "Mover-se depois", diff --git a/apps/presentationeditor/main/locale/ro.json b/apps/presentationeditor/main/locale/ro.json index 812cc89cf..76d52d52a 100644 --- a/apps/presentationeditor/main/locale/ro.json +++ b/apps/presentationeditor/main/locale/ro.json @@ -1303,6 +1303,7 @@ "PE.Views.Animation.strRewind": "Derulare înapoi", "PE.Views.Animation.strStart": "Pornire", "PE.Views.Animation.strTrigger": "Trigger", + "PE.Views.Animation.textAutoPreview": "Examinare automată", "PE.Views.Animation.textMoreEffects": "Mai multe efecte", "PE.Views.Animation.textMoveEarlier": "Mutare mai devreme", "PE.Views.Animation.textMoveLater": "Mutare mai târziu", diff --git a/apps/presentationeditor/main/locale/ru.json b/apps/presentationeditor/main/locale/ru.json index 2755ba2e8..0a0f5fe23 100644 --- a/apps/presentationeditor/main/locale/ru.json +++ b/apps/presentationeditor/main/locale/ru.json @@ -1303,6 +1303,7 @@ "PE.Views.Animation.strRewind": "Перемотка назад", "PE.Views.Animation.strStart": "Запуск", "PE.Views.Animation.strTrigger": "Триггер", + "PE.Views.Animation.textAutoPreview": "Автопросмотр", "PE.Views.Animation.textMoreEffects": "Показать больше эффектов", "PE.Views.Animation.textMoveEarlier": "Переместить назад", "PE.Views.Animation.textMoveLater": "Переместить вперед", diff --git a/apps/presentationeditor/main/locale/zh.json b/apps/presentationeditor/main/locale/zh.json index 1776cc865..06244e0d0 100644 --- a/apps/presentationeditor/main/locale/zh.json +++ b/apps/presentationeditor/main/locale/zh.json @@ -1303,6 +1303,7 @@ "PE.Views.Animation.strRewind": "后退", "PE.Views.Animation.strStart": "开始", "PE.Views.Animation.strTrigger": "触发器", + "PE.Views.Animation.textAutoPreview": "自动预览", "PE.Views.Animation.textMoreEffects": "显示其他效果", "PE.Views.Animation.textMoveEarlier": "向前移动", "PE.Views.Animation.textMoveLater": "向后移动", diff --git a/apps/presentationeditor/mobile/src/less/icons-material.less b/apps/presentationeditor/mobile/src/less/icons-material.less index 3fdb2bcff..71b95268b 100644 --- a/apps/presentationeditor/mobile/src/less/icons-material.less +++ b/apps/presentationeditor/mobile/src/less/icons-material.less @@ -448,7 +448,7 @@ &.icon-plus { width: 22px; height: 22px; - .encoded-svg-mask('', @toolbar-icons); + .encoded-svg-mask('', @fill-white); } } diff --git a/apps/presentationeditor/mobile/src/store/appOptions.js b/apps/presentationeditor/mobile/src/store/appOptions.js index 8b187331b..a79235abd 100644 --- a/apps/presentationeditor/mobile/src/store/appOptions.js +++ b/apps/presentationeditor/mobile/src/store/appOptions.js @@ -94,12 +94,17 @@ export class storeAppOptions { this.canComments = this.canLicense && (permissions.comment === undefined ? this.isEdit : permissions.comment) && (this.config.mode !== 'view'); this.canComments = this.canComments && !((typeof (this.customization) == 'object') && this.customization.comments===false); this.canViewComments = this.canComments || !((typeof (this.customization) == 'object') && this.customization.comments===false); - this.canEditComments = this.isOffline || !(typeof (this.customization) == 'object' && this.customization.commentAuthorOnly); + this.canEditComments = this.isOffline || !permissions.editCommentAuthorOnly; this.canDeleteComments= this.isOffline || !permissions.deleteCommentAuthorOnly; + if ((typeof (this.customization) == 'object') && this.customization.commentAuthorOnly===true) { + console.log("Obsolete: The 'commentAuthorOnly' parameter of the 'customization' section is deprecated. Please use 'editCommentAuthorOnly' and 'deleteCommentAuthorOnly' parameters in the permissions instead."); + if (permissions.editCommentAuthorOnly===undefined && permissions.deleteCommentAuthorOnly===undefined) + this.canEditComments = this.canDeleteComments = this.isOffline; + } this.canChat = this.canLicense && !this.isOffline && (permissions.chat !== false); this.canEditStyles = this.canLicense && this.canEdit; this.canPrint = (permissions.print !== false); - this.isRestrictedEdit = !this.isEdit && this.canComments; + this.isRestrictedEdit = !this.isEdit && this.canComments && isSupportEditFeature; this.trialMode = params.asc_getLicenseMode(); const type = /^(?:(pdf|djvu|xps|oxps))$/.exec(document.fileType); diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js index 6a5071ecb..4bbaaedf4 100644 --- a/apps/spreadsheeteditor/main/app/controller/Print.js +++ b/apps/spreadsheeteditor/main/app/controller/Print.js @@ -124,11 +124,18 @@ define([ this.api.asc_registerCallback('asc_onSheetsChanged', _.bind(this.updateSheetsInfo, this)); this.api.asc_registerCallback('asc_onPrintPreviewSheetChanged', _.bind(this.onApiChangePreviewSheet, this)); this.api.asc_registerCallback('asc_onPrintPreviewPageChanged', _.bind(this.onApiChangePreviewPage, this)); + this.api.asc_registerCallback('asc_onPrintPreviewSheetDataChanged', _.bind(this.onApiPreviewSheetDataChanged, this)); }, updateSheetsInfo: function() { if (this.printSettings.isVisible()) { this.updateSettings(this.printSettings); + this.printSettings.cmbSheet.store.each(function (item) { + var sheetIndex = item.get('value'); + if (!this._changedProps[sheetIndex]) { + this._changedProps[sheetIndex] = this.api.asc_getPageOptions(sheetIndex, true, true); + } + }, this); } else { this.isFillSheets = false; } @@ -152,15 +159,13 @@ define([ panel.cmbSheet.store.findWhere({value: this.api.asc_getActiveWorksheetIndex()}); if (item) { panel.cmbSheet.setValue(item.get('value')); + panel.updateActiveSheet && panel.updateActiveSheet(item.get('displayValue')); } }, comboSheetsChange: function(panel, combo, record) { var currentSheet = record.value; this.fillPageOptions(panel, this._changedProps[currentSheet] ? this._changedProps[currentSheet] : this.api.asc_getPageOptions(currentSheet, true), currentSheet); - if (!this._changedProps[currentSheet]) { - this._changedProps[currentSheet] = this.getPageOptions(this.printSettings, currentSheet); - } }, fillPageOptions: function(panel, props, sheet) { @@ -316,6 +321,7 @@ define([ }, onShowMainSettingsPrint: function() { + var me = this; this._changedProps = []; this.printSettings.$previewBox.removeClass('hidden'); @@ -323,10 +329,15 @@ define([ this.isFillSheets = true; this.updateSettings(this.printSettings); } + this.printSettings.cmbSheet.store.each(function (item) { + var sheetIndex = item.get('value'); + me._changedProps[sheetIndex] = me.api.asc_getPageOptions(sheetIndex, true, true); + }, this); + this.adjPrintParams.asc_setPageOptionsMap(this._changedProps); this.fillPrintOptions(this.adjPrintParams, false); - var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86); + var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86); opts.asc_setAdvancedOptions(this.adjPrintParams); var pageCount = this.api.asc_initPrintPreview('print-preview', opts); @@ -412,7 +423,7 @@ define([ this.adjPrintParams.asc_setIgnorePrintArea(this.printSettings.getIgnorePrintArea()); Common.localStorage.setItem("sse-print-settings-range", printType); - var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86); + var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86); opts.asc_setAdvancedOptions(this.adjPrintParams); this.api.asc_Print(opts); Common.NotificationCenter.trigger('edit:complete', view); @@ -711,23 +722,27 @@ define([ updatePreview: function (needUpdate) { if (this._isPreviewVisible) { + this.printSettings.$previewBox.removeClass('hidden'); + var adjPrintParams = new Asc.asc_CAdjustPrint(), printType = this.printSettings.getRange(); adjPrintParams.asc_setPrintType(printType); adjPrintParams.asc_setPageOptionsMap(this._changedProps); adjPrintParams.asc_setIgnorePrintArea(this.printSettings.getIgnorePrintArea()); - var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86); + var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86); opts.asc_setAdvancedOptions(adjPrintParams); var pageCount = this.api.asc_updatePrintPreview(opts); + this.printSettings.$previewBox.toggleClass('hidden', !pageCount); + this.printSettings.$previewEmpty.toggleClass('hidden', !!pageCount); var newPage; if (this._currentPrintType !== printType) { newPage = 0; this._currentPrintType = printType; } else if (this._navigationPreview.currentPage > pageCount - 1) { - newPage = pageCount - 1; + newPage = Math.max(0, pageCount - 1); } else { newPage = this._navigationPreview.currentPage; } @@ -740,16 +755,14 @@ define([ }, onApiChangePreviewSheet: function (index) { + var item = this.printSettings.cmbSheet.store.findWhere({value: index}); + this.printSettings.updateActiveSheet(item.get('displayValue')); + if (this.notUpdateSheetSettings) { this.notUpdateSheetSettings = false; - return - } - var item = this.printSettings.cmbSheet.store.findWhere({value: index}); - if (item) { + } else if (item) { this.printSettings.cmbSheet.setValue(item.get('value')); this.comboSheetsChange(this.printSettings, this.printSettings.cmbSheet, item.toJSON()); - var sheetName = this.api.asc_getWorksheetName(index); - this.printSettings.updateActiveSheet(sheetName); } }, @@ -786,6 +799,16 @@ define([ } }, + onApiPreviewSheetDataChanged: function (needUpdate) { + if (needUpdate) { + this.updatePreview(); + } else { + this.notUpdateSheetSettings = true; + this.api.asc_drawPrintPreview(this._navigationPreview.currentPage); + this.updateNavigationButtons(this._navigationPreview.currentPage, this._navigationPreview.pageCount); + } + }, + warnCheckMargings: 'Margins are incorrect', strAllSheets: 'All Sheets', textWarning: 'Warning', diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 585894f26..5bd64d2cd 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -3911,6 +3911,7 @@ define([ var wbtab = me.getApplication().getController('WBProtection'); $panel.append(wbtab.createToolbarPanel()); me.toolbar.addTab(tab, $panel, 7); + me.toolbar.setVisible('protect', Common.UI.LayoutManager.isElementVisible('toolbar-protect')); Array.prototype.push.apply(me.toolbar.lockControls, wbtab.getView('WBProtection').getButtons()); } } diff --git a/apps/spreadsheeteditor/main/app/view/ShapeSettingsAdvanced.js b/apps/spreadsheeteditor/main/app/view/ShapeSettingsAdvanced.js index 2bb6390e7..510be9f0b 100644 --- a/apps/spreadsheeteditor/main/app/view/ShapeSettingsAdvanced.js +++ b/apps/spreadsheeteditor/main/app/view/ShapeSettingsAdvanced.js @@ -637,6 +637,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp this.chOverflow.setDisabled(true); this.chFlipHor.setDisabled(true); this.chFlipVert.setDisabled(true); + this.btnsCategory[0].setDisabled(true); } this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(props.asc_getWidth()).toFixed(2), true); @@ -646,7 +647,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp this._nRatio = props.asc_getWidth()/props.asc_getHeight(); var value = props.asc_getLockAspect(); - this.btnRatio.toggle(value); + this.btnRatio.toggle(value || shapeprops.asc_getFromSmartArt()); + this.btnRatio.setDisabled(!!shapeprops.asc_getFromSmartArt()); // can resize smart art only proportionately this._setShapeDefaults(shapeprops); diff --git a/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx b/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx index d21cff870..8deb76aa2 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx @@ -14,6 +14,7 @@ import EditorUIController from '../lib/patch'; canComments: stores.storeAppOptions.canComments, canViewComments: stores.storeAppOptions.canViewComments, canCoAuthoring: stores.storeAppOptions.canCoAuthoring, + isRestrictedEdit: stores.storeAppOptions.isRestrictedEdit, users: stores.users, isDisconnected: stores.users.isDisconnected, storeSheets: stores.sheets, @@ -215,12 +216,12 @@ class ContextMenu extends ContextMenuController { const { t } = this.props; const _t = t("ContextMenu", { returnObjects: true }); - const { isEdit, isDisconnected } = this.props; + const { isEdit, isRestrictedEdit, isDisconnected } = this.props; if (isEdit && EditorUIController.ContextMenu) { return EditorUIController.ContextMenu.mapMenuItems(this); } else { - const {canViewComments} = this.props; + const {canViewComments, canCoAuthoring, canComments} = this.props; const api = Common.EditorApi.get(); const cellinfo = api.asc_getCellInfo(); @@ -262,6 +263,13 @@ class ContextMenu extends ContextMenuController { event: 'viewcomment' }); } + + if (iscellmenu && !api.isCellEdited && isRestrictedEdit && canCoAuthoring && canComments && hasComments && hasComments.length<1) { + itemsText.push({ + caption: _t.menuAddComment, + event: 'addcomment' + }); + } } return itemsIcon.concat(itemsText); diff --git a/apps/spreadsheeteditor/mobile/src/controller/Error.jsx b/apps/spreadsheeteditor/mobile/src/controller/Error.jsx index 1b991fc32..5a836adef 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Error.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Error.jsx @@ -222,6 +222,7 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu case Asc.c_oAscError.ID.DataValidate: errData && errData.asc_getErrorTitle() && (config.title = Common.Utils.String.htmlEncode(errData.asc_getErrorTitle())); + config.buttons = ['OK', 'Cancel']; config.msg = errData && errData.asc_getError() ? Common.Utils.String.htmlEncode(errData.asc_getError()) : _t.errorDataValidate; break; @@ -350,8 +351,9 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu Common.Gateway.reportWarning(id, config.msg); config.title = config.title || _t.notcriticalErrorTitle; - config.callback = (btn) => { - if (id == Asc.c_oAscError.ID.DataValidate) { + config.buttons = config.buttons || ['OK']; + config.callback = (_, btn) => { + if (id == Asc.c_oAscError.ID.DataValidate && btn.target.textContent !== 'OK') { api.asc_closeCellEditor(true); } storeAppOptions.changeEditingRights(false); @@ -362,12 +364,12 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu cssClass: 'error-dialog', title : config.title, text : config.msg, - buttons: [ + buttons: config.buttons.map( button => ( { - text: 'OK', - onClick: () => config.callback + text:button, + onClick: (_, btn) => config.callback(_, btn) } - ] + )) }).open(); Common.component.Analytics.trackEvent('Internal Error', id.toString()); diff --git a/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx b/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx index 5c871267f..47f114d8f 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx @@ -373,13 +373,6 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(observer(props => api.asc_showWorksheet(sheetIndex); f7.popover.close('#idx-all-list'); } - - const tab = $$('.sheet-tabs .tab').eq(sheetIndex); - if(tab.offset().left < 0) { - $$('.sheet-tabs').scrollLeft( $$('.sheet-tabs').scrollLeft() + tab.offset().left - 96, 500); - } else { - $$('.sheet-tabs').scrollLeft( $$('.sheet-tabs').scrollLeft() + (tab.offset().left + tab.width() - $$('.sheet-tabs').width()/1.5), 500); - } }; const onSetWorkSheetColor = (color) => { diff --git a/apps/spreadsheeteditor/mobile/src/store/appOptions.js b/apps/spreadsheeteditor/mobile/src/store/appOptions.js index e1dcf79c5..7c0c94181 100644 --- a/apps/spreadsheeteditor/mobile/src/store/appOptions.js +++ b/apps/spreadsheeteditor/mobile/src/store/appOptions.js @@ -94,11 +94,16 @@ export class storeAppOptions { this.canComments = this.canLicense && (permissions.comment === undefined ? this.isEdit : permissions.comment) && (this.config.mode !== 'view'); this.canComments = this.canComments && !((typeof (this.customization) == 'object') && this.customization.comments===false); this.canViewComments = this.canComments || !((typeof (this.customization) == 'object') && this.customization.comments===false); - this.canEditComments = this.isOffline || !(typeof (this.customization) == 'object' && this.customization.commentAuthorOnly); + this.canEditComments = this.isOffline || !permissions.editCommentAuthorOnly; this.canDeleteComments= this.isOffline || !permissions.deleteCommentAuthorOnly; + if ((typeof (this.customization) == 'object') && this.customization.commentAuthorOnly===true) { + console.log("Obsolete: The 'commentAuthorOnly' parameter of the 'customization' section is deprecated. Please use 'editCommentAuthorOnly' and 'deleteCommentAuthorOnly' parameters in the permissions instead."); + if (permissions.editCommentAuthorOnly===undefined && permissions.deleteCommentAuthorOnly===undefined) + this.canEditComments = this.canDeleteComments = this.isOffline; + } this.canChat = this.canLicense && !this.isOffline && (permissions.chat !== false); this.canPrint = (permissions.print !== false); - this.isRestrictedEdit = !this.isEdit && this.canComments; + this.isRestrictedEdit = !this.isEdit && this.canComments && isSupportEditFeature; this.trialMode = params.asc_getLicenseMode(); const type = /^(?:(pdf|djvu|xps|oxps))$/.exec(document.fileType); diff --git a/apps/spreadsheeteditor/mobile/src/view/Statusbar.jsx b/apps/spreadsheeteditor/mobile/src/view/Statusbar.jsx index e5aff2a69..f9e264924 100644 --- a/apps/spreadsheeteditor/mobile/src/view/Statusbar.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/Statusbar.jsx @@ -42,6 +42,22 @@ const PageAllList = (props) => { const { sheets, onTabListClick } = props; const allSheets = sheets.sheets; + useEffect(() => { + const tabs = $$('.sheet-tabs .tab'); + let tab = tabs.eq(sheets.activeWorksheet); + + if(sheets.activeWorksheet !== -1) { + if(tab.length === 0) { + tab = tabs.eq(tabs.length - 1); + $$('.sheet-tabs').scrollLeft( tab.offset().left + tab.width(), 500); + } else if(tab.offset().left < 0) { + $$('.sheet-tabs').scrollLeft( $$('.sheet-tabs').scrollLeft() + tab.offset().left - 96, 500); + } else { + $$('.sheet-tabs').scrollLeft( $$('.sheet-tabs').scrollLeft() + (tab.offset().left + tab.width() - $$('.sheet-tabs').width()), 500); + } + } + }, [sheets.activeWorksheet]); + return (