diff --git a/apps/common/mobile/resources/less/common-ios.less b/apps/common/mobile/resources/less/common-ios.less index 5bea40077..396a2051a 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 4a6742756..c3cf6f0d3 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 064aa53da..36c235bea 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 066f03c8a..1fed2d95a 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 8239d3819..479ed3603 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 0ea3485a1..f32b48ae0 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 4a013cf20..a539c9339 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 b05207cc8..9509f0a54 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 26795d0e3..d87558efc 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()}}> @@ -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 }}> - @@ -254,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 093bb735a..bd7168253 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 e1eb03bd4..85f24591b 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 7d1b3bcaf..4894ac965 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 9ffbb2c43..2112aa589 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx @@ -392,7 +392,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 f8d207902..fdc0f3ece 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 ( - @@ -24,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 1f2572e2b..00f233d6c 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditLink.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditLink.jsx @@ -195,7 +195,7 @@ const PageLink = props => { /> - { props.onEditLink(typeLink, (typeLink === 1 ? @@ -203,8 +203,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 4a05bdfae..140d28d59 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 0c206c91d..4557b9f72 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 86b34e06f..2237d5aa2 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx @@ -501,7 +501,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/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index 86fbc28a4..afedbcdc0 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -223,6 +223,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 55d1b8e3a..b560d9519 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 3fd709181..b98e305ce 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"; diff --git a/apps/spreadsheeteditor/mobile/src/view/add/AddImage.jsx b/apps/spreadsheeteditor/mobile/src/view/add/AddImage.jsx index c71fbc56b..a23ad9a3c 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 2b2086bc1..bb107b16e 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 539fdc2e8..7662e68fa 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 a71943fa3..800494c90 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 ( - @@ -20,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 24db43a7c..5b8772a34 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 f4fcb7c19..985780506 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} )