From 2a43b5935d68c906dd375171d308f6441bc6fce3 Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Mon, 16 Aug 2021 16:55:24 +0300 Subject: [PATCH 1/2] [SSE] Fix re-render FilterOptions --- .../mobile/src/view/FilterOptions.jsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/src/view/FilterOptions.jsx b/apps/spreadsheeteditor/mobile/src/view/FilterOptions.jsx index 621b5afb9..7e4e30d31 100644 --- a/apps/spreadsheeteditor/mobile/src/view/FilterOptions.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/FilterOptions.jsx @@ -6,17 +6,11 @@ import { Device } from '../../../../common/mobile/utils/device'; const FilterOptions = (props) => { const { t } = useTranslation(); const _t = t('View.Edit', {returnObjects: true}); - - useEffect(() => { - const is_all_checked = props.listVal.every(item => item.check); - setAll(is_all_checked); - }); - - const [all, setAll] = useState(false); + let is_all_checked = props.listVal.every(item => item.check); const HandleClearFilter = () => { + is_all_checked = true; props.onClearFilter(); - setAll(true); props.onUpdateCell('all', true); }; @@ -51,7 +45,7 @@ const FilterOptions = (props) => { props.onDeleteFilter()} id="btn-delete-filter">{_t.textDeleteFilter} - props.onUpdateCell('all', e.target.checked)} name='filter-cellAll' checkbox checked={all}>{_t.textSelectAll} + props.onUpdateCell('all', e.target.checked)} name='filter-cellAll' checkbox checked={is_all_checked}>{_t.textSelectAll} {props.listVal.map((value) => props.onUpdateCell(value.id, e.target.checked)} key={value.value} name='filter-cell' value={value.value} title={value.cellvalue} checkbox checked={value.check} /> )} From e25c7171db3d12e83591815a70fd3d3a20756ca2 Mon Sep 17 00:00:00 2001 From: ShimaginAndrey Date: Fri, 20 Aug 2021 17:01:08 +0300 Subject: [PATCH 2/2] [SSE] Fix Bug 52060 --- .../spreadsheeteditor/mobile/src/less/icons-ios.less | 5 ++++- .../mobile/src/less/icons-material.less | 12 +++++++++++- apps/spreadsheeteditor/mobile/src/view/add/Add.jsx | 10 +++++++--- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/src/less/icons-ios.less b/apps/spreadsheeteditor/mobile/src/less/icons-ios.less index 719610da7..9f308f240 100644 --- a/apps/spreadsheeteditor/mobile/src/less/icons-ios.less +++ b/apps/spreadsheeteditor/mobile/src/less/icons-ios.less @@ -126,7 +126,7 @@ &.icon-link { width: 22px; height: 22px; - .encoded-svg-background(''); + .encoded-svg-mask(''); } &.icon-insimage { @@ -467,6 +467,9 @@ height: 24px; .encoded-svg-background(''); } + &.icon-link { + background: #fff; + } } } } diff --git a/apps/spreadsheeteditor/mobile/src/less/icons-material.less b/apps/spreadsheeteditor/mobile/src/less/icons-material.less index 74821ae31..928c5806f 100644 --- a/apps/spreadsheeteditor/mobile/src/less/icons-material.less +++ b/apps/spreadsheeteditor/mobile/src/less/icons-material.less @@ -105,7 +105,7 @@ &.icon-link { width: 24px; height: 24px; - .encoded-svg-background(''); + .encoded-svg-mask(''); } &.icon-insimage, &.icon-image-library { width: 24px; @@ -398,6 +398,16 @@ } } + .tabbar { + .link.tab-link { + i.icon { + &.icon-link { + background: #fff; + } + } + } + } + // Overwrite color for toolbar .navbar { i.icon { diff --git a/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx b/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx index 0ba851392..8721cad25 100644 --- a/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx @@ -91,6 +91,7 @@ const AddTabs = props => { const _t = t('View.Add', {returnObjects: true}); const showPanels = props.showPanels; const tabs = []; + if (!showPanels) { tabs.push({ caption: _t.textChart, @@ -131,10 +132,11 @@ const AddTabs = props => { component: }); } - if (showPanels && showPanels === 'hyperlink') { + if ((showPanels && showPanels === 'hyperlink') || props.isAddShapeHyperlink) { tabs.push({ caption: _t.textAddLink, id: 'add-link', + icon: 'icon-link', component: }); } @@ -162,10 +164,10 @@ class AddView extends Component { return ( show_popover ? this.props.onclosed()}> - + : this.props.onclosed()}> - + ) } @@ -193,6 +195,7 @@ const Add = props => { const cellinfo = api.asc_getCellInfo(); const seltype = cellinfo.asc_getSelectionType(); const iscelllocked = cellinfo.asc_getLocked(); + const isAddShapeHyperlink = api.asc_canAddShapeHyperlink(); let options; if ( !iscelllocked ) { @@ -217,6 +220,7 @@ const Add = props => { return };