diff --git a/apps/common/main/lib/component/DataView.js b/apps/common/main/lib/component/DataView.js index 65335e605..ad768a748 100644 --- a/apps/common/main/lib/component/DataView.js +++ b/apps/common/main/lib/component/DataView.js @@ -808,14 +808,14 @@ define([ }; var el = $(this.dataViewItems[0].el), - itemW = el.outerWidth() + parseInt(el.css('margin-left')) + parseInt(el.css('margin-right')), + itemW = el.outerWidth() + parseFloat(el.css('margin-left')) + parseFloat(el.css('margin-right')), offsetLeft = this.$el.offset().left, offsetTop = el.offset().top, prevtop = -1, topIdx = 0, leftIdx = 0; for (var i=0; iprevtop) { prevtop = top; this._layoutParams.itemsIndexes.push([]); @@ -1278,7 +1278,7 @@ define([ }; var el = this.dataViewItems[0].el, - itemW = el.outerWidth() + parseInt(el.css('margin-left')) + parseInt(el.css('margin-right')), + itemW = el.outerWidth() + parseFloat(el.css('margin-left')) + parseFloat(el.css('margin-right')), offsetLeft = this.$el.offset().left, offsetTop = el.offset().top, prevtop = -1, topIdx = 0, leftIdx = 0; diff --git a/apps/common/main/lib/controller/HintManager.js b/apps/common/main/lib/controller/HintManager.js index 0eab7c6e6..6476757b9 100644 --- a/apps/common/main/lib/controller/HintManager.js +++ b/apps/common/main/lib/controller/HintManager.js @@ -292,6 +292,9 @@ Common.UI.HintManager = new(function() { section = _isEditDiagram ? _currentSection[0] : _currentSection, topSection = _currentLevel !== 0 && $(section).length > 0 && !_isEditDiagram ? $(section).offset().top : 0, bottomSection = _currentLevel !== 0 && $(section).length > 0 && !_isEditDiagram ? topSection + $(section).height() : docH; + if ($(section).prop('id') === 'toolbar' && $(section).outerHeight() < $(section).find('.box-controls').outerHeight()) { + bottomSection += $(section).find('.box-controls').outerHeight(); + } if (_currentControls.length === 0) _getControls(); @@ -512,7 +515,8 @@ Common.UI.HintManager = new(function() { return; } var needOpenPanel = (curr.attr('content-target') && !$('#' + curr.attr('content-target')).is(':visible') || - (curr.parent().prop('id') === 'slot-btn-chat' && !$('#left-panel-chat').is(':visible'))); + (curr.parent().prop('id') === 'slot-btn-chat' && !$('#left-panel-chat').is(':visible')) || + (curr.parent().hasClass('ribtab') && !$('#toolbar').children('.toolbar').hasClass('expanded'))); if ((!curr.attr('content-target') && curr.parent().prop('id') !== 'slot-btn-chat') || needOpenPanel) { // need to open panel if (!($('#file-menu-panel').is(':visible') && (curr.parent().prop('id') === 'fm-btn-info' && $('#panel-info').is(':visible') || curr.parent().prop('id') === 'fm-btn-settings' && $('#panel-settings').is(':visible')))) { diff --git a/apps/common/mobile/lib/view/Search.jsx b/apps/common/mobile/lib/view/Search.jsx index 43d23b84d..d38dbd2f1 100644 --- a/apps/common/mobile/lib/view/Search.jsx +++ b/apps/common/mobile/lib/view/Search.jsx @@ -262,7 +262,7 @@ class SearchView extends Component {
{this.changeSearchQuery(e.target.value)}} /> + onChange={e => {this.changeSearchQuery(e.target.value)}} autoFocus/> {isIos ? : null} this.changeSearchQuery('')} />
diff --git a/apps/common/mobile/lib/view/collaboration/Comments.jsx b/apps/common/mobile/lib/view/collaboration/Comments.jsx index 416dd1055..7675b860f 100644 --- a/apps/common/mobile/lib/view/collaboration/Comments.jsx +++ b/apps/common/mobile/lib/view/collaboration/Comments.jsx @@ -60,7 +60,7 @@ const AddCommentPopup = inject("storeComments")(observer(props => {
{userInfo.name}
- {setText(event.target.value);}}> + {setText(event.target.value);}}>
diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 1027e4574..30d682c10 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -966,6 +966,16 @@ input[type="number"]::-webkit-inner-spin-button { height: 100%; } +.dropdown-list { + &__placeholder { + opacity: 0.6; + .item-inner { + border-bottom: 1px solid var(--f7-list-item-border-color); + } + } +} + + diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js index 521909397..697d5eb56 100644 --- a/apps/documenteditor/forms/app/controller/ApplicationController.js +++ b/apps/documenteditor/forms/app/controller/ApplicationController.js @@ -1835,6 +1835,7 @@ define([ var features = { version: '{{PRODUCT_VERSION}}', // eventloading: true, + uitype: 'fillform', uithemes: true }; var api; diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index e06e79002..eb0419b02 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -402,7 +402,7 @@ define([ this.appOptions.canRequestMailMergeRecipients = this.editorConfig.canRequestMailMergeRecipients; this.appOptions.canRequestSharingSettings = this.editorConfig.canRequestSharingSettings; this.appOptions.compatibleFeatures = (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compatibleFeatures; - this.appOptions.canFeatureComparison = !!this.api.asc_isSupportFeature("comparison"); + this.appOptions.canFeatureComparison = true; this.appOptions.canFeatureContentControl = true; this.appOptions.canFeatureForms = !!this.api.asc_isSupportFeature("forms"); diff --git a/apps/documenteditor/main/app/controller/Viewport.js b/apps/documenteditor/main/app/controller/Viewport.js index 470c9a9ec..178cef62f 100644 --- a/apps/documenteditor/main/app/controller/Viewport.js +++ b/apps/documenteditor/main/app/controller/Viewport.js @@ -370,16 +370,13 @@ define([ }, onThemeChanged: function (id) { - var document = DE.getController('Main').document; - if ( !/^pdf|djvu|xps|oxps$/.test(document.fileType) ) { - if ( this.header.menuItemsDarkMode ) { - var current_dark = Common.UI.Themes.isDarkTheme(); - var menuItem = this.header.menuItemsDarkMode; - menuItem.setVisible(current_dark); - menuItem.$el.prev('.divider')[current_dark ? 'show' : 'hide'](); + if ( this.header.menuItemsDarkMode ) { + var current_dark = Common.UI.Themes.isDarkTheme(); + var menuItem = this.header.menuItemsDarkMode; + menuItem.setVisible(current_dark); + menuItem.$el.prev('.divider')[current_dark ? 'show' : 'hide'](); - menuItem.setChecked(Common.UI.Themes.isContentThemeDark()); - } + menuItem.setChecked(Common.UI.Themes.isContentThemeDark()); } }, diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index a27a3c9b9..cabbdd748 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -278,7 +278,9 @@ define([ /** coauthoring end **/ '', '', - '', + '', + '
', + '
', '','', '', '', @@ -547,6 +549,16 @@ define([ dataHint: '2', dataHintDirection: 'bottom', dataHintOffset: 'big' + }).on('selected', function(combo, record) { + me.chDarkMode.setDisabled(record.themeType!=='dark'); + }); + + this.chDarkMode = new Common.UI.CheckBox({ + el: $markup.findById('#fms-chb-dark-mode'), + labelText: this.txtDarkMode, + dataHint: '2', + dataHintDirection: 'left', + dataHintOffset: 'small' }); this.cmbReviewHover = new Common.UI.ComboBox({ @@ -702,7 +714,7 @@ define([ var data = []; for (var t in Common.UI.Themes.map()) { - data.push({value: t, displayValue: Common.UI.Themes.get(t).text}); + data.push({value: t, displayValue: Common.UI.Themes.get(t).text, themeType: Common.UI.Themes.get(t).type}); } if ( data.length ) { @@ -710,6 +722,8 @@ define([ item = this.cmbTheme.store.findWhere({value: Common.UI.Themes.currentThemeId()}); this.cmbTheme.setValue(item ? item.get('value') : Common.UI.Themes.defaultThemeId()); } + this.chDarkMode.setValue(Common.UI.Themes.isContentThemeDark()); + this.chDarkMode.setDisabled(!Common.UI.Themes.isDarkTheme()); if (this.mode.canViewReview) { value = Common.Utils.InternalSettings.get("de-settings-review-hover-mode"); @@ -720,6 +734,8 @@ define([ applySettings: function() { Common.UI.Themes.setTheme(this.cmbTheme.getValue()); + if (!this.chDarkMode.isDisabled() && (this.chDarkMode.isChecked() !== Common.UI.Themes.isContentThemeDark())) + Common.UI.Themes.toggleContentTheme(); Common.localStorage.setItem("de-settings-inputmode", this.chInputMode.isChecked() ? 1 : 0); Common.localStorage.setItem("de-settings-zoom", this.cmbZoom.getValue()); Common.Utils.InternalSettings.set("de-settings-zoom", Common.localStorage.getItem("de-settings-zoom")); @@ -855,7 +871,8 @@ define([ txtAutoCorrect: 'AutoCorrect options...', strReviewHover: 'Track Changes Display', txtChangesTip: 'Show by hover in tooltips', - txtChangesBalloons: 'Show by click in balloons' + txtChangesBalloons: 'Show by click in balloons', + txtDarkMode: 'Turn on document dark mode' }, DE.Views.FileMenuPanels.Settings || {})); DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index cffba6e0e..cc4539eeb 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1771,6 +1771,7 @@ "DE.Views.FileMenuPanels.Settings.txtChangesBalloons": "Show by click in balloons", "DE.Views.FileMenuPanels.Settings.txtChangesTip": "Show by hover in tooltips", "DE.Views.FileMenuPanels.Settings.txtCm": "Centimeter", + "DE.Views.FileMenuPanels.Settings.txtDarkMode": "Turn on document dark mode", "DE.Views.FileMenuPanels.Settings.txtFitPage": "Fit to Page", "DE.Views.FileMenuPanels.Settings.txtFitWidth": "Fit to Width", "DE.Views.FileMenuPanels.Settings.txtInch": "Inch", diff --git a/apps/documenteditor/main/locale/es.json b/apps/documenteditor/main/locale/es.json index 310e190b5..799d5a159 100644 --- a/apps/documenteditor/main/locale/es.json +++ b/apps/documenteditor/main/locale/es.json @@ -1743,6 +1743,7 @@ "DE.Views.FileMenuPanels.Settings.txtChangesBalloons": "Mostrar con un clic en los globos", "DE.Views.FileMenuPanels.Settings.txtChangesTip": "Mostrar al mantener el puntero en la información sobre herramientas", "DE.Views.FileMenuPanels.Settings.txtCm": "Centímetro", + "DE.Views.FileMenuPanels.Settings.txtDarkMode": "Activar el modo oscuro para documentos", "DE.Views.FileMenuPanels.Settings.txtFitPage": "Ajustar a la página", "DE.Views.FileMenuPanels.Settings.txtFitWidth": "Ajustar al ancho", "DE.Views.FileMenuPanels.Settings.txtInch": "Pulgada", diff --git a/apps/documenteditor/main/locale/fr.json b/apps/documenteditor/main/locale/fr.json index 160071361..cd78bd020 100644 --- a/apps/documenteditor/main/locale/fr.json +++ b/apps/documenteditor/main/locale/fr.json @@ -1743,6 +1743,7 @@ "DE.Views.FileMenuPanels.Settings.txtChangesBalloons": "Afficher par clic dans les ballons", "DE.Views.FileMenuPanels.Settings.txtChangesTip": "Afficher lorsque le pointeur est maintenu sur l'infobulle", "DE.Views.FileMenuPanels.Settings.txtCm": "Centimètre", + "DE.Views.FileMenuPanels.Settings.txtDarkMode": "Activer le mode sombre pour les documents", "DE.Views.FileMenuPanels.Settings.txtFitPage": "Ajuster à la page", "DE.Views.FileMenuPanels.Settings.txtFitWidth": "Ajuster à la largeur", "DE.Views.FileMenuPanels.Settings.txtInch": "Pouce", diff --git a/apps/documenteditor/main/locale/ro.json b/apps/documenteditor/main/locale/ro.json index c3aa8418f..397f5ce7c 100644 --- a/apps/documenteditor/main/locale/ro.json +++ b/apps/documenteditor/main/locale/ro.json @@ -1743,6 +1743,7 @@ "DE.Views.FileMenuPanels.Settings.txtChangesBalloons": "Afișare în baloane cu un clic", "DE.Views.FileMenuPanels.Settings.txtChangesTip": "Afișarea sfaturilor ecran la trecere", "DE.Views.FileMenuPanels.Settings.txtCm": "Centimetru", + "DE.Views.FileMenuPanels.Settings.txtDarkMode": "Activează modul întunecat la nivel de document", "DE.Views.FileMenuPanels.Settings.txtFitPage": "Portivire la pagina", "DE.Views.FileMenuPanels.Settings.txtFitWidth": "Potrivire lățime", "DE.Views.FileMenuPanels.Settings.txtInch": "Inch", diff --git a/apps/documenteditor/main/locale/ru.json b/apps/documenteditor/main/locale/ru.json index c06afc532..1a71047e8 100644 --- a/apps/documenteditor/main/locale/ru.json +++ b/apps/documenteditor/main/locale/ru.json @@ -1743,6 +1743,7 @@ "DE.Views.FileMenuPanels.Settings.txtChangesBalloons": "Показывать при клике в выносках", "DE.Views.FileMenuPanels.Settings.txtChangesTip": "Показывать при наведении в подсказках", "DE.Views.FileMenuPanels.Settings.txtCm": "Сантиметр", + "DE.Views.FileMenuPanels.Settings.txtDarkMode": "Включить темный режим", "DE.Views.FileMenuPanels.Settings.txtFitPage": "По размеру страницы", "DE.Views.FileMenuPanels.Settings.txtFitWidth": "По ширине", "DE.Views.FileMenuPanels.Settings.txtInch": "Дюйм", diff --git a/apps/documenteditor/mobile/src/view/DropdownList.jsx b/apps/documenteditor/mobile/src/view/DropdownList.jsx index 527c29313..faeb7866e 100644 --- a/apps/documenteditor/mobile/src/view/DropdownList.jsx +++ b/apps/documenteditor/mobile/src/view/DropdownList.jsx @@ -1,71 +1,71 @@ -import React, {Component, useEffect, useState} from 'react'; -import { f7, Page, Navbar, List, ListItem, BlockTitle, ListButton, Popover, Popup, View, Link, Sheet } from "framework7-react"; -import { Device } from '../../../../common/mobile/utils/device'; - -const PageDropdownList = props => { - const listItems = props.listItems; - - return ( - - - - {listItems.length && listItems.map((elem, index) => ( - props.onChangeItemList(elem.value)}> - ))} - - - - ); -}; - -class DropdownListView extends Component { - constructor(props) { - super(props); - } - - render() { - return ( - Device.isPhone ? - - - - : - - - - - ); - } -} - - -const DropdownList = props => { - useEffect(() => { - if(Device.isPhone) { - f7.sheet.open('#dropdown-list-sheet', true); - } else { - f7.popover.open('#dropdown-list-popover', '#dropdown-list-target'); - } - - return () => {} - }); - - return ( - - ); -}; - +import React, {Component, useEffect, useState} from 'react'; +import { f7, Page, Navbar, List, ListItem, BlockTitle, ListButton, Popover, Popup, View, Link, Sheet } from "framework7-react"; +import { Device } from '../../../../common/mobile/utils/device'; + +const PageDropdownList = props => { + const listItems = props.listItems; + + return ( + + + + {listItems.length && listItems.map((elem, index) => ( + props.onChangeItemList(elem.value)}> + ))} + + + + ); +}; + +class DropdownListView extends Component { + constructor(props) { + super(props); + } + + render() { + return ( + Device.isPhone ? + + + + : + + + + + ); + } +} + + +const DropdownList = props => { + useEffect(() => { + if(Device.isPhone) { + f7.sheet.open('#dropdown-list-sheet', true); + } else { + f7.popover.open('#dropdown-list-popover', '#dropdown-list-target'); + } + + return () => {} + }); + + return ( + + ); +}; + export default DropdownList; \ No newline at end of file diff --git a/apps/documenteditor/mobile/src/view/edit/EditShape.jsx b/apps/documenteditor/mobile/src/view/edit/EditShape.jsx index 874dc135a..2a1d7a641 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditShape.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditShape.jsx @@ -505,6 +505,7 @@ const PageReorder = props => { const EditShape = props => { const { t } = useTranslation(); const _t = t('Edit', {returnObjects: true}); + const api = Common.EditorApi.get(); const canFill = props.storeFocusObjects.shapeObject.get_ShapeProperties().get_CanFill(); const shapeObject = props.storeFocusObjects.shapeObject; const wrapType = props.storeShapeSettings.getWrapType(shapeObject); @@ -515,23 +516,32 @@ const EditShape = props => { || shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5' || shapeType=='straightConnector1'; + let controlProps = api && api.asc_IsContentControl() ? api.asc_GetContentControlProperties() : null, + fixedSize = false; + + if (controlProps) { + let spectype = controlProps.get_SpecificType(); + fixedSize = (spectype == Asc.c_oAscContentControlSpecificType.CheckBox || spectype == Asc. c_oAscContentControlSpecificType.ComboBox || spectype == Asc.c_oAscContentControlSpecificType.DropDownList || spectype == Asc.c_oAscContentControlSpecificType.None || spectype == Asc.c_oAscContentControlSpecificType.Picture) && controlProps.get_FormPr() && controlProps.get_FormPr().get_Fixed(); + } + let disableRemove = !!props.storeFocusObjects.paragraphObject; return ( - {canFill ? - : - - } + {!fixedSize ? + canFill ? + : + + : null} { onOverlap: props.onOverlap, onWrapDistance: props.onWrapDistance }}> - { !hideChangeType && + {(!hideChangeType && !fixedSize) && } - { wrapType !== 'inline' && } diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index d63640e0f..2ec3f8c7b 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -404,7 +404,7 @@ define([ this.appOptions.mentionShare = !((typeof (this.appOptions.customization) == 'object') && (this.appOptions.customization.mentionShare==false)); this.appOptions.canMakeActionLink = this.editorConfig.canMakeActionLink; this.appOptions.canFeaturePivot = true; - this.appOptions.canFeatureViews = !!this.api.asc_isSupportFeature("sheet-views"); + this.appOptions.canFeatureViews = true; if (this.appOptions.user.guest && this.appOptions.canRenameAnonymous && !this.appOptions.isEditDiagram && !this.appOptions.isEditMailMerge) Common.NotificationCenter.on('user:rename', _.bind(this.showRenameUserDialog, this)); diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx index 69f6bd5a2..f7354726f 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx @@ -366,35 +366,35 @@ const EditTabs = props => { component: }) } - if (!store.isLockedShape && settings.indexOf('shape') > -1) { + if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('shape') > -1) { editors.push({ caption: _t.textShape, id: 'edit-shape', component: }) } + if (!(wsProps.Objects && store.isLockedText) && settings.indexOf('text') > -1) { + editors.push({ + caption: _t.textText, + id: 'edit-text', + component: + }) + } + if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('chart') > -1) { + editors.push({ + caption: _t.textChart, + id: 'edit-chart', + component: + }) + } + if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('image') > -1) { + editors.push({ + caption: _t.textImage, + id: 'edit-image', + component: + }) + } if(!wsProps.Objects) { - if (settings.indexOf('image') > -1) { - editors.push({ - caption: _t.textImage, - id: 'edit-image', - component: - }) - } - if (settings.indexOf('text') > -1) { - editors.push({ - caption: _t.textText, - id: 'edit-text', - component: - }) - } - if (settings.indexOf('chart') > -1) { - editors.push({ - caption: _t.textChart, - id: 'edit-chart', - component: - }) - } if (settings.indexOf('hyperlink') > -1 || (props.hyperinfo && props.isAddShapeHyperlink)) { editors.push({ caption: _t.textHyperlink,