From 3c05927fbc8621ca121b4df1cbe2de877f22c363 Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Wed, 26 May 2021 14:45:05 +0300 Subject: [PATCH 01/13] Fix Bug 48186 --- apps/common/mobile/resources/less/common.less | 1 + apps/common/mobile/resources/less/dataview.less | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 0b2f9ae4b5..5a0e5d461a 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -484,6 +484,7 @@ .row { &, li { margin-bottom: 12px; + padding-left: 5px; } } diff --git a/apps/common/mobile/resources/less/dataview.less b/apps/common/mobile/resources/less/dataview.less index 104d04836c..25e7a9c647 100644 --- a/apps/common/mobile/resources/less/dataview.less +++ b/apps/common/mobile/resources/less/dataview.less @@ -2,7 +2,7 @@ .dataview { .row { - justify-content: space-around; + justify-content: flex-start; } ul { From c51221e46e2397386e9de88a974dfd3c5282d8f2 Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Wed, 26 May 2021 20:25:04 +0300 Subject: [PATCH 02/13] Fix Bug 48186 addition --- apps/common/mobile/resources/less/common.less | 7 ++- .../mobile/resources/less/dataview.less | 2 +- .../mobile/src/view/edit/EditTable.jsx | 43 ++++++------------- 3 files changed, 21 insertions(+), 31 deletions(-) diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 5a0e5d461a..ae4d8caa48 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -484,7 +484,6 @@ .row { &, li { margin-bottom: 12px; - padding-left: 5px; } } @@ -500,6 +499,12 @@ } } +#edit-table-style { + .list ul ul { + padding-left: 0; + } +} + // Cell styles .cell-styles-list { diff --git a/apps/common/mobile/resources/less/dataview.less b/apps/common/mobile/resources/less/dataview.less index 25e7a9c647..104d04836c 100644 --- a/apps/common/mobile/resources/less/dataview.less +++ b/apps/common/mobile/resources/less/dataview.less @@ -2,7 +2,7 @@ .dataview { .row { - justify-content: flex-start; + justify-content: space-around; } ul { diff --git a/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx b/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx index bd05449063..d100f60fec 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx @@ -7,45 +7,30 @@ import {CustomColorPicker, ThemeColorPalette} from "../../../../../common/mobile // Style -const StyleTemplates = inject("storeFocusObjects")(observer(({templates, onStyleClick, storeFocusObjects}) => { +const StyleTemplates = inject("storeFocusObjects","storeTableSettings")(observer(({onStyleClick,storeTableSettings,storeFocusObjects}) => { const tableObject = storeFocusObjects.tableObject; const styleId = tableObject ? tableObject.get_TableStyle() : null; const [stateId, setId] = useState(styleId); - - const widthContainer = document.querySelector(".page-content").clientWidth; - const columns = parseInt((widthContainer - 47) / 70); // magic - const styles = []; - let row = -1; - templates.forEach((style, index) => { - if (0 == index % columns) { - styles.push([]); - row++ - } - styles[row].push(style); - }); + const styles = storeTableSettings.styles; if (!tableObject && Device.phone) { $$('.sheet-modal.modal-in').length > 0 && f7.sheet.close(); return null; } - + return (
- {styles.map((row, rowIndex) => { - return ( -
- {row.map((style, index)=>{ - return( -
{onStyleClick(style.templateId); setId(style.templateId)}}> - -
- ) - })} -
- ) - })} +
    + {styles.map((style, index) => { + return ( +
  • {onStyleClick(style.templateId); setId(style.templateId)}}> + +
  • + ) + })} +
) })); From a65bb211d71342218d5047aa8e48bf7e05fe1471 Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Thu, 27 May 2021 12:28:16 +0300 Subject: [PATCH 03/13] Fix Bug 48186 doc --- .../mobile/src/view/edit/EditTable.jsx | 41 ++++++------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/apps/documenteditor/mobile/src/view/edit/EditTable.jsx b/apps/documenteditor/mobile/src/view/edit/EditTable.jsx index e1eb03bd48..0d7ed4c088 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditTable.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditTable.jsx @@ -173,40 +173,25 @@ const PageWrap = props => { // Style -const StyleTemplates = inject("storeFocusObjects")(observer(({templates, onStyleClick, storeFocusObjects}) => { +const StyleTemplates = inject("storeFocusObjects","storeTableSettings")(observer(({onStyleClick,storeTableSettings,storeFocusObjects}) => { const tableObject = storeFocusObjects.tableObject; const styleId = tableObject && tableObject.get_TableStyle(); const [stateId, setId] = useState(styleId); - - const widthContainer = document.querySelector(".page-content").clientWidth; - const columns = parseInt((widthContainer - 47) / 70); // magic - const styles = []; - let row = -1; - templates.forEach((style, index) => { - if (0 == index % columns) { - styles.push([]); - row++ - } - styles[row].push(style); - }); + const styles = storeTableSettings.styles; return (
- {styles.map((row, rowIndex) => { - return ( -
- {row.map((style, index)=>{ - return( -
{onStyleClick(style.templateId); setId(style.templateId)}}> - -
- ) - })} -
- ) - })} +
    + {styles.map((style, index) => { + return ( +
  • {onStyleClick(style.templateId); setId(style.templateId)}}> + +
  • + ) + })} +
) })); From 552362ed5542c03d128af7050574414683badfae Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Thu, 27 May 2021 20:54:43 +0300 Subject: [PATCH 04/13] Fix Bug 49343 --- apps/documenteditor/mobile/src/controller/ContextMenu.jsx | 8 +++++++- apps/documenteditor/mobile/src/controller/Error.jsx | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/documenteditor/mobile/src/controller/ContextMenu.jsx b/apps/documenteditor/mobile/src/controller/ContextMenu.jsx index 136679559e..54d0b7c63d 100644 --- a/apps/documenteditor/mobile/src/controller/ContextMenu.jsx +++ b/apps/documenteditor/mobile/src/controller/ContextMenu.jsx @@ -25,6 +25,7 @@ class ContextMenu extends ContextMenuController { this.onApiHideComment = this.onApiHideComment.bind(this); this.onApiShowChange = this.onApiShowChange.bind(this); this.getUserName = this.getUserName.bind(this); + this.ShowModal = this.ShowModal.bind(this); } static closeContextMenu() { @@ -43,9 +44,13 @@ class ContextMenu extends ContextMenuController { api.asc_unregisterCallback('asc_onShowComment', this.onApiShowComment); api.asc_unregisterCallback('asc_onHideComment', this.onApiHideComment); api.asc_unregisterCallback('asc_onShowRevisionsChange', this.onApiShowChange); + Common.Notifications.off('showSplitModal', this.ShowModal); } - + ShowModal() { + this.showSplitModal() + } + onApiShowComment(comments) { this.isComments = comments && comments.length > 0; } @@ -199,6 +204,7 @@ class ContextMenu extends ContextMenuController { api.asc_registerCallback('asc_onShowComment', this.onApiShowComment); api.asc_registerCallback('asc_onHideComment', this.onApiHideComment); api.asc_registerCallback('asc_onShowRevisionsChange', this.onApiShowChange); + Common.Notifications.on('showSplitModal', this.ShowModal); } initMenuItems() { diff --git a/apps/documenteditor/mobile/src/controller/Error.jsx b/apps/documenteditor/mobile/src/controller/Error.jsx index ff499f2515..21b8d35e4e 100644 --- a/apps/documenteditor/mobile/src/controller/Error.jsx +++ b/apps/documenteditor/mobile/src/controller/Error.jsx @@ -199,14 +199,18 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu Common.Gateway.reportWarning(id, config.msg); config.title = _t.notcriticalErrorTitle; + config.callback = (btn) => { if (id === Asc.c_oAscError.ID.Warning && btn === 'ok' && (storeAppOptions.canDownload || storeAppOptions.canDownloadOrigin)) { api.asc_DownloadOrigin(); + } else if(id === Asc.c_oAscError.ID.SplitCellMaxRows || + Asc.c_oAscError.ID.SplitCellMaxCols || + Asc.c_oAscError.ID.SplitCellRowsDivider && btn === 'ok' && (storeAppOptions.canDownload || storeAppOptions.canDownloadOrigin)) { + Common.Notifications.trigger('showSplitModal',true); } storeAppOptions.changeEditingRights(false); }; } - f7.dialog.create({ cssClass: 'error-dialog', title : config.title, From 98884306914d694296c55666754eaf6475dc08a7 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Fri, 28 May 2021 12:18:26 +0300 Subject: [PATCH 05/13] [DE PE SSE mobile] Bug 48861 --- apps/documenteditor/mobile/src/view/edit/EditImage.jsx | 6 +++++- apps/presentationeditor/mobile/src/view/edit/EditImage.jsx | 5 ++++- apps/spreadsheeteditor/mobile/src/view/edit/EditImage.jsx | 5 ++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/mobile/src/view/edit/EditImage.jsx b/apps/documenteditor/mobile/src/view/edit/EditImage.jsx index 26795d0e35..9d662f30fe 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditImage.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditImage.jsx @@ -236,6 +236,10 @@ const PageReorder = props => { const EditImage = props => { const { t } = useTranslation(); const _t = t('Edit', {returnObjects: true}); + const storeFocusObjects = props.storeFocusObjects; + const imageObject = storeFocusObjects.imageObject; + const pluginGuid = imageObject.asc_getPluginGuid(); + return ( @@ -246,7 +250,7 @@ const EditImage = props => { onOverlap: props.onOverlap, onWrapDistance: props.onWrapDistance }}> - diff --git a/apps/presentationeditor/mobile/src/view/edit/EditImage.jsx b/apps/presentationeditor/mobile/src/view/edit/EditImage.jsx index e5ca3d134c..436735fcd9 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditImage.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditImage.jsx @@ -8,11 +8,14 @@ import {Device} from '../../../../../common/mobile/utils/device'; const EditImage = props => { const { t } = useTranslation(); const _t = t('View.Edit', {returnObjects: true}); + const storeFocusObjects = props.storeFocusObjects; + const imageObject = storeFocusObjects.imageObject; + const pluginGuid = imageObject.asc_getPluginGuid(); return ( - diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/EditImage.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/EditImage.jsx index a71943fa31..f1662a2e6f 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/EditImage.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/EditImage.jsx @@ -7,11 +7,14 @@ import {Device} from '../../../../../common/mobile/utils/device'; const EditImage = props => { const { t } = useTranslation(); const _t = t('View.Edit', {returnObjects: true}); + const storeFocusObjects = props.storeFocusObjects; + const imageObject = storeFocusObjects.imageObject; + const pluginGuid = imageObject.asc_getPluginGuid(); return ( - From edd4ed6629590dbb958a343922e79611e5289750 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Fri, 28 May 2021 15:12:21 +0300 Subject: [PATCH 06/13] [SSE mobile] Bug 48058 --- apps/spreadsheeteditor/mobile/locale/en.json | 2 ++ .../mobile/src/controller/add/AddChart.jsx | 27 +++++++++++++++---- .../mobile/src/view/add/Add.jsx | 2 +- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index 49889fc507..c2662e79b7 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -222,6 +222,8 @@ "txtNotUrl": "This field should be a URL in the format \"http://www.example.com\"", "textEmptyImgUrl": "You need to specify image URL.", "notcriticalErrorTitle": "Warning", + "errorStockChart": "Incorrect row order. To build a stock chart place the data on the sheet in the following order:
opening price, max price, min price, closing price.", + "errorMaxRows": "ERROR! The maximum number of data series per chart is 255.", "textLink": "Link", "textAddLink": "Add Link", "textLinkType": "Link Type", diff --git a/apps/spreadsheeteditor/mobile/src/controller/add/AddChart.jsx b/apps/spreadsheeteditor/mobile/src/controller/add/AddChart.jsx index 55d1b8e3af..b560d95199 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/add/AddChart.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/add/AddChart.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react'; import { f7 } from 'framework7-react'; import {Device} from '../../../../../common/mobile/utils/device'; +import { withTranslation } from 'react-i18next'; import AddChart from '../../view/add/AddChart'; @@ -20,10 +21,24 @@ class AddChartController extends Component { onInsertChart (type) { const api = Common.EditorApi.get(); - const settings = api.asc_getChartObject(); - settings.changeType(type); - api.asc_addChartDrawingObject(settings); - this.closeModal(); + const { t } = this.props; + const _t = t('View.Add', {returnObjects: true}); + const settings = api.asc_getChartObject(true); + const info = api.asc_getCellInfo(); + const selType = info.asc_getSelectionType(); + const isChartEdit = (selType == Asc.c_oAscSelectionType.RangeChart || selType == Asc.c_oAscSelectionType.RangeChartText); + + if (settings) { + isChartEdit ? settings.changeType(type) : settings.putType(type); + let range = settings.getRange(), + isValid = !!range ? api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, range, true, !settings.getInColumns(), settings.getType()) : Asc.c_oAscError.ID.No; + if (isValid == Asc.c_oAscError.ID.No) { + isChartEdit ? api.asc_editChartDrawingObject(settings) : api.asc_addChartDrawingObject(settings); + this.closeModal(); + } else { + f7.dialog.alert((isValid == Asc.c_oAscError.ID.StockChartError) ? _t.errorStockChart : ((isValid == Asc.c_oAscError.ID.MaxDataSeriesError) ? _t.errorMaxRows : _t.txtInvalidRange), _t.notcriticalErrorTitle); + } + } } render () { @@ -34,4 +49,6 @@ class AddChartController extends Component { } } -export default AddChartController; \ No newline at end of file +const AddChartControllerTranslated = withTranslation()(AddChartController); + +export {AddChartControllerTranslated as AddChartController}; \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx b/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx index 3fd7091813..b98e305ce9 100644 --- a/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx @@ -5,7 +5,7 @@ import {f7} from 'framework7-react'; import { observer, inject } from "mobx-react"; import {Device} from '../../../../../common/mobile/utils/device'; -import AddChartController from "../../controller/add/AddChart"; +import {AddChartController} from "../../controller/add/AddChart"; import {AddFunctionController} from "../../controller/add/AddFunction"; import {PageFunctionGroup, PageFunctionInfo} from "./AddFunction"; import AddShapeController from "../../controller/add/AddShape"; From c43062883b0b353313a86a9305632994b4f6b736 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Sat, 29 May 2021 20:40:36 +0300 Subject: [PATCH 07/13] [PE mobile] Correct navbars --- .../mobile/src/view/edit/EditChart.jsx | 62 +++++++++++++-- .../mobile/src/view/edit/EditImage.jsx | 42 ++++++++-- .../mobile/src/view/edit/EditLink.jsx | 32 +++++++- .../mobile/src/view/edit/EditSlide.jsx | 78 +++++++++++++------ .../mobile/src/view/edit/EditTable.jsx | 69 ++++++++++++++-- .../mobile/src/view/edit/EditText.jsx | 72 +++++++++++++++-- 6 files changed, 298 insertions(+), 57 deletions(-) diff --git a/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx b/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx index 7371610c26..9ffbb2c437 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {List, ListItem, ListButton, Icon, Row, Page, Navbar, BlockTitle, Toggle, Range, Link, Tabs, Tab} from 'framework7-react'; +import {List, ListItem, ListButton, Icon, Row, Page, Navbar, BlockTitle, Toggle, Range, Link, Tabs, Tab, NavRight} from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; import {CustomColorPicker, ThemeColorPalette} from "../../../../../common/mobile/lib/component/ThemeColorPalette.jsx"; @@ -24,7 +24,15 @@ const PageCustomFillColor = props => { return ( - + + {Device.phone && + + + + + + } + ) @@ -84,7 +92,15 @@ const PageCustomBorderColor = props => { return ( - + + {Device.phone && + + + + + + } + ) @@ -114,7 +130,15 @@ const PageBorderColor = props => { return ( - + + {Device.phone && + + + + + + } + { const styles = storeChartSettings.styles; const shapeObject = props.storeFocusObjects.shapeObject; const chartStyles = storeChartSettings.chartStyles; - // console.log(chartStyles, curType); - // console.log(Asc.c_oAscChartTypeSettings.comboBarLine, Asc.c_oAscChartTypeSettings.comboBarLineSecondary, Asc.c_oAscChartTypeSettings.comboAreaBar, Asc.c_oAscChartTypeSettings.comboCustom); let borderSize, borderType, borderColor; @@ -173,6 +195,13 @@ const PageStyle = props => { {_t.textFill} {_t.textBorder} + {Device.phone && + + + + + + } @@ -262,7 +291,15 @@ const PageReorder = props => { return ( - + + {Device.phone && + + + + + + } + {props.onReorder('all-up')}} link='#' className='no-indicator'> @@ -293,7 +330,15 @@ const PageAlign = props => { return ( - + + {Device.phone && + + + + + + } + {props.onAlign('align-left')}} className='no-indicator'> @@ -329,6 +374,7 @@ const PageAlign = props => { const EditChart = props => { const { t } = useTranslation(); const _t = t('View.Edit', {returnObjects: true}); + return ( diff --git a/apps/presentationeditor/mobile/src/view/edit/EditImage.jsx b/apps/presentationeditor/mobile/src/view/edit/EditImage.jsx index e5ca3d134c..f8d207902a 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditImage.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditImage.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {f7, Page, Navbar, List, ListItem, Row, BlockTitle, Link, Toggle, Icon, View, NavRight, ListItemCell, Range, Button, Segmented, Tab, Tabs, ListInput, ListButton} from 'framework7-react'; +import {f7, Page, Navbar, List, ListItem, Row, BlockTitle, Link, Toggle, Icon, View, ListItemCell, Range, Button, Segmented, Tab, Tabs, ListInput, ListButton, NavRight} from 'framework7-react'; import { ThemeColorPalette, CustomColorPicker } from '../../../../../common/mobile/lib/component/ThemeColorPalette.jsx'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; @@ -43,7 +43,15 @@ const PageReorder = props => { return ( - + + {Device.phone && + + + + + + } + {props.onReorder('all-up')}} className='no-indicator'> @@ -74,7 +82,15 @@ const PageAlign = props => { return ( - + + {Device.phone && + + + + + + } + {props.onAlign('align-left')}} className='no-indicator'> @@ -119,7 +135,15 @@ const PageReplace = props => { return ( - + + {Device.phone && + + + + + + } + {props.onReplaceByFile()}}> @@ -152,7 +176,15 @@ const PageLinkSettings = props => { }; return ( - + + {Device.phone && + + + + + + } + {_t.textAddress} { return ( - + + {Device.phone && + + + + + + } + {setTypeLink(1); props.changeType(1);}}> {setTypeLink(0); props.changeType(0);}}> @@ -62,7 +70,15 @@ const PageLinkTo = props => { return ( - + + {Device.phone && + + + + + + } + {changeTypeTo(0)}}> {changeTypeTo(1)}}> @@ -134,7 +150,15 @@ const PageLink = props => { return ( - + + {Device.phone && + + + + + + } + { const defaultThemes = arrayThemes[0]; const docThemes = arrayThemes[1]; - console.log(arrayThemes); - - // console.log(slideThemeIndex); - // console.log(arrayThemes); - return ( - - - + {Device.phone && + + + + + + } {arrayThemes.length ? ( @@ -99,15 +98,16 @@ const PageLayout = props => { const arrayLayouts = storeSlideSettings.arrayLayouts; const slideLayoutIndex = storeSlideSettings.slideLayoutIndex; - // console.log(slideLayoutIndex); - // console.log(arrayLayouts); - return ( - - - + {Device.phone && + + + + + + } {arrayLayouts.length ? ( @@ -234,9 +234,13 @@ const PageTransition = props => { return ( - - - + {Device.phone && + + + + + + } { return ( - + + {Device.phone && + + + + + + } + {_arrEffect.length ? ( {_arrEffect.map((elem, index) => { @@ -354,9 +366,13 @@ const PageType= props => { return ( - - - + {Device.phone && + + + + + + } {_arrCurrentEffectTypes.length ? ( @@ -406,9 +422,13 @@ const PageFillColor = props => { return ( - - - + {Device.phone && + + + + + + } @@ -439,7 +459,15 @@ const PageCustomFillColor = props => { return ( - + + {Device.phone && + + + + + + } + ) diff --git a/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx b/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx index bd05449063..86b34e06f7 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {f7, Page, Navbar, List, ListItem, ListButton, Row, BlockTitle, Range, Toggle, Icon, Link, Tabs, Tab} from 'framework7-react'; +import {f7, Page, Navbar, List, ListItem, ListButton, Row, BlockTitle, Range, Toggle, Icon, Link, Tabs, Tab, NavRight} from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; import {CustomColorPicker, ThemeColorPalette} from "../../../../../common/mobile/lib/component/ThemeColorPalette.jsx"; @@ -68,7 +68,15 @@ const PageStyleOptions = props => { return ( - + + {Device.phone && + + + + + + } + {props.onCheckTemplateChange(tableLook, 0, !isFirstRow)}}/> @@ -113,7 +121,15 @@ const PageCustomFillColor = props => { return( - + + {Device.phone && + + + + + + } + ) @@ -169,7 +185,15 @@ const PageCustomBorderColor = props => { return ( - + + {Device.phone && + + + + + + } + ) @@ -198,7 +222,15 @@ const PageBorderColor = props => { return ( - + + {Device.phone && + + + + + + } + @@ -305,6 +337,13 @@ const PageStyle = props => { {_t.textFill} {_t.textBorder} + {Device.phone && + + + + + + } @@ -342,7 +381,15 @@ const PageReorder = props => { return ( - + + {Device.phone && + + + + + + } + {props.onReorder('all-up')}} className='no-indicator'> @@ -373,7 +420,15 @@ const PageAlign = props => { return ( - + + {Device.phone && + + + + + + } + {props.onAlign('align-left')}} className='no-indicator'> diff --git a/apps/presentationeditor/mobile/src/view/edit/EditText.jsx b/apps/presentationeditor/mobile/src/view/edit/EditText.jsx index a9c780e184..d7bd881f53 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditText.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditText.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {f7, List, ListItem, Icon, Row, Button, Page, Navbar, Segmented, BlockTitle} from 'framework7-react'; +import {f7, List, ListItem, Icon, Row, Button, Page, Navbar, Segmented, BlockTitle, NavRight, Link} from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; import { ThemeColorPalette, CustomColorPicker } from '../../../../../common/mobile/lib/component/ThemeColorPalette.jsx'; @@ -201,7 +201,15 @@ const PageFonts = props => { return ( - + + {Device.phone && + + + + + + } + {!isAndroid &&
{displaySize}
} @@ -267,7 +275,15 @@ const PageFontColor = props => { return ( - + + {Device.phone && + + + + + + } + { }; return( - + + {Device.phone && + + + + + + } + ) @@ -334,7 +358,15 @@ const PageAdditionalFormatting = props => { return ( - + + {Device.phone && + + + + + + } + {props.onAdditionalStrikethrough('strikethrough', !isStrikeout)}}/> {props.onAdditionalStrikethrough('dbStrikethrough', !isDStrikeout)}}/> @@ -391,7 +423,15 @@ const PageBullets = props => { return ( - + + {Device.phone && + + + + + + } + {bulletArrays.map((bullets, index) => (
    {bullets.map((bullet) => ( @@ -439,7 +479,15 @@ const PageNumbers = props => { return ( - + + {Device.phone && + + + + + + } + {numberArrays.map((numbers, index) => (
      {numbers.map((number) => ( @@ -472,7 +520,15 @@ const PageLineSpacing = props => { return ( - + + {Device.phone && + + + + + + } + {props.onLineSpacing(1.0)}}> {props.onLineSpacing(1.15)}}> From e9eb6fceda63ac31d9d8a29deea71750a828b8d3 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Sun, 30 May 2021 16:34:15 +0300 Subject: [PATCH 08/13] [DE PE SSE mobile] Corrected buttons --- .../mobile/resources/less/common-ios.less | 4 +++ .../resources/less/common-material.less | 27 ++++++++++++------- apps/common/mobile/resources/less/common.less | 6 ++--- .../mobile/src/view/add/AddImage.jsx | 2 +- .../mobile/src/view/add/AddLink.jsx | 2 +- .../mobile/src/view/add/AddOther.jsx | 2 +- .../mobile/src/view/edit/EditChart.jsx | 2 +- .../mobile/src/view/edit/EditHyperlink.jsx | 2 +- .../mobile/src/view/edit/EditImage.jsx | 4 +-- .../mobile/src/view/edit/EditShape.jsx | 2 +- .../mobile/src/view/edit/EditTable.jsx | 4 ++- .../mobile/src/view/add/AddImage.jsx | 2 +- .../mobile/src/view/add/AddLink.jsx | 2 +- .../mobile/src/view/edit/EditChart.jsx | 2 +- .../mobile/src/view/edit/EditImage.jsx | 4 +-- .../mobile/src/view/edit/EditLink.jsx | 6 ++--- .../mobile/src/view/edit/EditShape.jsx | 4 +-- .../mobile/src/view/edit/EditSlide.jsx | 6 ++--- .../mobile/src/view/edit/EditTable.jsx | 2 +- .../mobile/src/view/add/AddImage.jsx | 2 +- .../mobile/src/view/add/AddLink.jsx | 2 +- .../mobile/src/view/edit/EditChart.jsx | 2 +- .../mobile/src/view/edit/EditImage.jsx | 4 +-- .../mobile/src/view/edit/EditLink.jsx | 4 +-- .../mobile/src/view/edit/EditShape.jsx | 4 +-- 25 files changed, 58 insertions(+), 45 deletions(-) diff --git a/apps/common/mobile/resources/less/common-ios.less b/apps/common/mobile/resources/less/common-ios.less index 5bea40077f..396a2051a9 100644 --- a/apps/common/mobile/resources/less/common-ios.less +++ b/apps/common/mobile/resources/less/common-ios.less @@ -355,6 +355,10 @@ color: red; } + .list-button { + position: initial; + } + .block-title { position: relative; overflow: hidden; diff --git a/apps/common/mobile/resources/less/common-material.less b/apps/common/mobile/resources/less/common-material.less index 4a67427569..c3cf6f0d3d 100644 --- a/apps/common/mobile/resources/less/common-material.less +++ b/apps/common/mobile/resources/less/common-material.less @@ -103,7 +103,8 @@ .button-fill { color: @white; - background-color: @themeColor; + // background-color: @themeColor; + background-color: transparent; } .button-raised { @@ -116,14 +117,19 @@ } .buttons-list { - li { - margin: 20px 16px; - color: @white; - border-radius: 2px; - text-transform: uppercase; - height: 36px; - min-height: 36px; - font-size: 14px; + ul { + &::before, &::after { + display: none; + } + li { + margin: 20px 16px; + color: @white; + border-radius: 2px; + text-transform: uppercase; + height: 36px; + min-height: 36px; + font-size: 14px; + } } } @@ -142,7 +148,8 @@ font-size: 14px; font-weight: 500; border-radius: 2px; - margin: 20px 16px; + // margin: 20px 16px; + margin: 0; } .button-raised .list-button { box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.24); diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 77219dcec6..39db52afd8 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -339,9 +339,9 @@ .buttons-list { ul { - &::before, &::after { - display: none; - } + // &::before, &::after { + // display: none; + // } li { border: 0; font-weight: normal; diff --git a/apps/documenteditor/mobile/src/view/add/AddImage.jsx b/apps/documenteditor/mobile/src/view/add/AddImage.jsx index 066f03c8ac..1fed2d95a5 100644 --- a/apps/documenteditor/mobile/src/view/add/AddImage.jsx +++ b/apps/documenteditor/mobile/src/view/add/AddImage.jsx @@ -20,7 +20,7 @@ const PageLinkSettings = props => { > - + {props.onInsertByUrl(stateValue)}}> diff --git a/apps/documenteditor/mobile/src/view/add/AddLink.jsx b/apps/documenteditor/mobile/src/view/add/AddLink.jsx index 8239d3819b..479ed36036 100644 --- a/apps/documenteditor/mobile/src/view/add/AddLink.jsx +++ b/apps/documenteditor/mobile/src/view/add/AddLink.jsx @@ -39,7 +39,7 @@ const PageLink = props => { onChange={(event) => {setTip(event.target.value)}} > - + { props.onInsertLink(stateLink, stateDisplay, stateTip) }}> diff --git a/apps/documenteditor/mobile/src/view/add/AddOther.jsx b/apps/documenteditor/mobile/src/view/add/AddOther.jsx index 0ea3485a11..f32b48ae01 100644 --- a/apps/documenteditor/mobile/src/view/add/AddOther.jsx +++ b/apps/documenteditor/mobile/src/view/add/AddOther.jsx @@ -141,7 +141,7 @@ const PageFootnote = props => { ) })} - + { props.onInsertFootnote(stateFormat, stateStartAt, stateLocation); }}> diff --git a/apps/documenteditor/mobile/src/view/edit/EditChart.jsx b/apps/documenteditor/mobile/src/view/edit/EditChart.jsx index 4a013cf20e..a539c9339b 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditChart.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditChart.jsx @@ -446,7 +446,7 @@ const EditChart = props => { onReorder: props.onReorder }}> - + {props.onRemoveChart()}} className='button-red button-fill button-raised'/> diff --git a/apps/documenteditor/mobile/src/view/edit/EditHyperlink.jsx b/apps/documenteditor/mobile/src/view/edit/EditHyperlink.jsx index b05207cc8b..9509f0a543 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditHyperlink.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditHyperlink.jsx @@ -38,7 +38,7 @@ const EditHyperlink = props => { onChange={(event) => {setTip(event.target.value)}} > - + { props.onEditLink(stateLink, stateDisplay, stateTip) }}> diff --git a/apps/documenteditor/mobile/src/view/edit/EditImage.jsx b/apps/documenteditor/mobile/src/view/edit/EditImage.jsx index 9d662f30fe..d87558efc8 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditImage.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditImage.jsx @@ -156,7 +156,7 @@ const PageLinkSettings = props => { > - + {onReplace()}}> @@ -258,7 +258,7 @@ const EditImage = props => { onReorder: props.onReorder }}> - + {props.onDefaulSize()}}/> {props.onRemoveImage()}}/> diff --git a/apps/documenteditor/mobile/src/view/edit/EditShape.jsx b/apps/documenteditor/mobile/src/view/edit/EditShape.jsx index 093bb735a0..bd7168253b 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditShape.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditShape.jsx @@ -536,7 +536,7 @@ const EditShape = props => { onReorder: props.onReorder }}> - + {props.onRemoveShape()}} className='button-red button-fill button-raised'/> diff --git a/apps/documenteditor/mobile/src/view/edit/EditTable.jsx b/apps/documenteditor/mobile/src/view/edit/EditTable.jsx index e1eb03bd48..85f24591b1 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditTable.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditTable.jsx @@ -560,7 +560,9 @@ const EditTable = props => { - {props.onRemoveTable()}} className='button-red button-fill button-raised'> + + {props.onRemoveTable()}} className='button-red button-fill button-raised'> + { > - + {props.onInsertByUrl(stateValue)}}> diff --git a/apps/presentationeditor/mobile/src/view/add/AddLink.jsx b/apps/presentationeditor/mobile/src/view/add/AddLink.jsx index 7d1b3bcaf2..4894ac9650 100644 --- a/apps/presentationeditor/mobile/src/view/add/AddLink.jsx +++ b/apps/presentationeditor/mobile/src/view/add/AddLink.jsx @@ -143,7 +143,7 @@ const PageLink = props => { /> - { props.onInsertLink(typeLink, (typeLink === 1 ? diff --git a/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx b/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx index 7371610c26..abb6e96a7b 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx @@ -346,7 +346,7 @@ const EditChart = props => { onAlign: props.onAlign }}> - + {props.onRemoveChart()}} className='button-red button-fill button-raised'/> diff --git a/apps/presentationeditor/mobile/src/view/edit/EditImage.jsx b/apps/presentationeditor/mobile/src/view/edit/EditImage.jsx index 436735fcd9..21ab126e10 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditImage.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditImage.jsx @@ -27,8 +27,8 @@ const EditImage = props => { }}> - {_t.textActualSize} - {_t.textRemoveImage} + {_t.textActualSize} + {_t.textRemoveImage} ) diff --git a/apps/presentationeditor/mobile/src/view/edit/EditLink.jsx b/apps/presentationeditor/mobile/src/view/edit/EditLink.jsx index 04534f3cf3..0eb57f819a 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditLink.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditLink.jsx @@ -171,7 +171,7 @@ const PageLink = props => { /> - { props.onEditLink(typeLink, (typeLink === 1 ? @@ -179,8 +179,8 @@ const PageLink = props => { {linkTo: linkTo, numberTo: numberTo, display: stateDisplay, tip: screenTip, displayDisabled: displayDisabled})); }} /> - { props.onRemoveLink() }} diff --git a/apps/presentationeditor/mobile/src/view/edit/EditShape.jsx b/apps/presentationeditor/mobile/src/view/edit/EditShape.jsx index 5f93af3297..e34641ddc4 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditShape.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditShape.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {f7, Page, Navbar, List, ListItem, Row, BlockTitle, Link, Toggle, Icon, View, NavRight, ListItemCell, Range, Button, Segmented, Tab, Tabs} from 'framework7-react'; +import {f7, Page, Navbar, List, ListItem, Row, BlockTitle, Link, Toggle, Icon, View, NavRight, ListItemCell, Range, Button, Segmented, Tab, Tabs, ListButton} from 'framework7-react'; import { ThemeColorPalette, CustomColorPicker } from '../../../../../common/mobile/lib/component/ThemeColorPalette.jsx'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; @@ -39,7 +39,7 @@ const EditShape = props => { }}> - {_t.textRemoveShape} + {_t.textRemoveShape} ) diff --git a/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx b/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx index 07685bd1ed..8e19275677 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {f7, Page, Navbar, List, ListItem, Row, BlockTitle, Link, Toggle, Icon, View, NavRight, ListItemCell, Range, Button, Segmented} from 'framework7-react'; +import {f7, Page, Navbar, List, ListItem, Row, BlockTitle, Link, Toggle, Icon, View, NavRight, ListItemCell, Range, Button, Segmented, ListButton} from 'framework7-react'; import { ThemeColorPalette, CustomColorPicker } from '../../../../../common/mobile/lib/component/ThemeColorPalette.jsx'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; @@ -32,8 +32,8 @@ const EditSlide = props => { }}> - {_t.textDuplicateSlide} - {_t.textDeleteSlide} + {_t.textDuplicateSlide} + {_t.textDeleteSlide} ) diff --git a/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx b/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx index bd05449063..5adbad185e 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx @@ -446,7 +446,7 @@ const EditTable = props => { - {props.onRemoveTable()}} className='button button-raised button-red'> + {props.onRemoveTable()}} className='button-red button-fill button-raised'> diff --git a/apps/spreadsheeteditor/mobile/src/view/add/AddImage.jsx b/apps/spreadsheeteditor/mobile/src/view/add/AddImage.jsx index c71fbc56be..a23ad9a3c2 100644 --- a/apps/spreadsheeteditor/mobile/src/view/add/AddImage.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/add/AddImage.jsx @@ -36,7 +36,7 @@ const PageLinkSettings = props => { > - + {props.onInsertByUrl(stateValue)}}> diff --git a/apps/spreadsheeteditor/mobile/src/view/add/AddLink.jsx b/apps/spreadsheeteditor/mobile/src/view/add/AddLink.jsx index 2b2086bc1d..bb107b16e1 100644 --- a/apps/spreadsheeteditor/mobile/src/view/add/AddLink.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/add/AddLink.jsx @@ -129,7 +129,7 @@ const AddLinkView = props => { className={isIos ? 'list-input-right' : ''} /> - + {props.onInsertLink(typeLink === 'ext' ? diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/EditChart.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/EditChart.jsx index 539fdc2e8b..7662e68fa3 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/EditChart.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/EditChart.jsx @@ -1466,7 +1466,7 @@ const EditChart = props => { onReorder: props.onReorder }}> - + {props.onRemoveChart()}} className='button-red button-fill button-raised'/> diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/EditImage.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/EditImage.jsx index f1662a2e6f..800494c905 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/EditImage.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/EditImage.jsx @@ -23,8 +23,8 @@ const EditImage = props => { }}> - {_t.textActualSize} - {_t.textRemoveImage} + {_t.textActualSize} + {_t.textRemoveImage} ) diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/EditLink.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/EditLink.jsx index 24db43a7c8..5b8772a342 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/EditLink.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/EditLink.jsx @@ -157,7 +157,7 @@ const EditLink = props => { className={isIos ? 'list-input-right' : ''} /> - + {props.onEditLink(typeLink === 1 ? @@ -165,7 +165,7 @@ const EditLink = props => { {type: 2, url: range, sheet: curSheet, text: stateDisplayText, tooltip: screenTip})}} /> props.onRemoveLink()} /> diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx index f4fcb7c197..9857805068 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {f7, Page, Navbar, NavRight, List, ListItem, Link, Icon, Range, Tab, Tabs} from 'framework7-react'; +import {f7, Page, Navbar, NavRight, List, ListItem, Link, Icon, Range, Tab, Tabs, ListButton} from 'framework7-react'; import { ThemeColorPalette, CustomColorPicker } from '../../../../../common/mobile/lib/component/ThemeColorPalette.jsx'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; @@ -36,7 +36,7 @@ const EditShape = props => { }}> - {_t.textRemoveShape} + {_t.textRemoveShape} ) From 06da18294a05b55dbba5488fd0aa559da904d263 Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Mon, 31 May 2021 12:51:18 +0300 Subject: [PATCH 09/13] Disable button in doc --- apps/documenteditor/mobile/src/view/edit/EditShape.jsx | 7 ++++++- apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/documenteditor/mobile/src/view/edit/EditShape.jsx b/apps/documenteditor/mobile/src/view/edit/EditShape.jsx index 093bb735a0..c3abf01c90 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditShape.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditShape.jsx @@ -507,6 +507,10 @@ const EditShape = props => { const storeShapeSettings = props.storeShapeSettings; const shapeObject = props.storeFocusObjects.shapeObject; const wrapType = storeShapeSettings.getWrapType(shapeObject); + + let setDisabled = true; + props.storeFocusObjects.paragraphObject ? setDisabled = true : setDisabled = false; + return ( @@ -537,7 +541,8 @@ const EditShape = props => { }}> - {props.onRemoveShape()}} className='button-red button-fill button-raised'/> + {props.onRemoveShape()}} + className={`button-red button-fill button-raised ${setDisabled ? 'disabled' : ''}`} /> ) diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx index f4fcb7c197..67540141e3 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx @@ -11,6 +11,7 @@ const EditShape = props => { const storeFocusObjects = props.storeFocusObjects; const shapeObject = storeFocusObjects.shapeObject; const canFill = shapeObject && shapeObject.get_ShapeProperties().asc_getCanFill(); + let setDisabled = true; return ( From a7e8f1812e4738378fad9972a2ebfb3d4324bb83 Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Mon, 31 May 2021 15:50:56 +0300 Subject: [PATCH 10/13] Fix Bug 44360 --- apps/documenteditor/mobile/src/view/edit/EditShape.jsx | 7 +++---- apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx | 6 ++++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/documenteditor/mobile/src/view/edit/EditShape.jsx b/apps/documenteditor/mobile/src/view/edit/EditShape.jsx index c3abf01c90..60dff32620 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditShape.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditShape.jsx @@ -507,9 +507,8 @@ const EditShape = props => { const storeShapeSettings = props.storeShapeSettings; const shapeObject = props.storeFocusObjects.shapeObject; const wrapType = storeShapeSettings.getWrapType(shapeObject); - - let setDisabled = true; - props.storeFocusObjects.paragraphObject ? setDisabled = true : setDisabled = false; + + let disableRemove = !!props.storeFocusObjects.paragraphObject; return ( @@ -542,7 +541,7 @@ const EditShape = props => { {props.onRemoveShape()}} - className={`button-red button-fill button-raised ${setDisabled ? 'disabled' : ''}`} /> + className={`button-red button-fill button-raised ${disableRemove ? 'disabled' : ''}`} /> ) diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx index 67540141e3..f2e77639f2 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/EditShape.jsx @@ -11,7 +11,8 @@ const EditShape = props => { const storeFocusObjects = props.storeFocusObjects; const shapeObject = storeFocusObjects.shapeObject; const canFill = shapeObject && shapeObject.get_ShapeProperties().asc_getCanFill(); - let setDisabled = true; + + let disableRemove = storeFocusObjects.selections.indexOf('text') > -1; return ( @@ -37,7 +38,8 @@ const EditShape = props => { }}> - {_t.textRemoveShape} + {_t.textRemoveShape} ) From ac56abf8d3598673cd179461e76b5396c12b05ec Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Mon, 31 May 2021 16:52:34 +0300 Subject: [PATCH 11/13] Fix Bug 44360 presentation --- apps/presentationeditor/mobile/src/view/edit/EditShape.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/presentationeditor/mobile/src/view/edit/EditShape.jsx b/apps/presentationeditor/mobile/src/view/edit/EditShape.jsx index 5f93af3297..82560418d1 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditShape.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditShape.jsx @@ -12,6 +12,8 @@ const EditShape = props => { const shapeObject = storeFocusObjects.shapeObject; const canFill = shapeObject && shapeObject.get_CanFill(); + let disableRemove = !!props.storeFocusObjects.paragraphObject; + return ( @@ -39,7 +41,8 @@ const EditShape = props => { }}> - {_t.textRemoveShape} + {_t.textRemoveShape} ) From 36f75e01edf472194b43fed2c3a4e2a16203f654 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Mon, 31 May 2021 17:14:51 +0300 Subject: [PATCH 12/13] [PE mobile] Removed ignore format error --- apps/presentationeditor/mobile/src/controller/Error.jsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/presentationeditor/mobile/src/controller/Error.jsx b/apps/presentationeditor/mobile/src/controller/Error.jsx index a8cd9213ee..3012bb9d24 100644 --- a/apps/presentationeditor/mobile/src/controller/Error.jsx +++ b/apps/presentationeditor/mobile/src/controller/Error.jsx @@ -18,8 +18,6 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu }); const onError = (id, level, errData) => { - if (id === -82) return; // format error - if (id === Asc.c_oAscError.ID.LoadingScriptError) { f7.notification.create({ title: _t.criticalErrorTitle, From 27dc6495a4e91013a3f9775de1dfb7f7ab8fff95 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Mon, 31 May 2021 18:08:02 +0300 Subject: [PATCH 13/13] [PE mobile] Bug 47978 --- .../mobile/lib/controller/collaboration/Comments.jsx | 12 +++++++++++- .../mobile/lib/view/collaboration/Comments.jsx | 5 +++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/apps/common/mobile/lib/controller/collaboration/Comments.jsx b/apps/common/mobile/lib/controller/collaboration/Comments.jsx index 1251123393..e1ebcda4be 100644 --- a/apps/common/mobile/lib/controller/collaboration/Comments.jsx +++ b/apps/common/mobile/lib/controller/collaboration/Comments.jsx @@ -558,10 +558,20 @@ class ViewCommentsController extends Component { break; } } + + showComment (comment) { + const api = Common.EditorApi.get(); + + api.asc_selectComment(comment.uid); + api.asc_showComment(comment.uid, false); + } + + render() { return( - {this.props.allComments && } + {this.props.allComments && } {this.state.isOpenViewCurComments && { } // View comments -const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onResolveComment}) => { +const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onResolveComment, showComment}) => { const { t } = useTranslation(); const _t = t('Common.Collaboration', {returnObjects: true}); const isAndroid = Device.android; @@ -657,7 +657,8 @@ const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onRes {sortComments.map((comment, indexComment) => { return ( - + { + !e.target.closest('.comment-menu') && !e.target.closest('.reply-menu') ? showComment(comment) : null}}>
      {isAndroid &&
      {comment.userInitials}
      }