diff --git a/apps/common/mobile/resources/less/common-material.less b/apps/common/mobile/resources/less/common-material.less index b2b44f5a9..604e5bcbf 100644 --- a/apps/common/mobile/resources/less/common-material.less +++ b/apps/common/mobile/resources/less/common-material.less @@ -258,6 +258,9 @@ flex: 1; font-size: 17px; margin-left: 5px; + display: flex; + align-items: center; + justify-content: center; &:first-child { margin-left: 0; } diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index ce0f9d7ef..eee0461b7 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -444,6 +444,8 @@ "textInvalidRange": "Invalid cells range", "txtNotUrl": "This field should be a URL in the format \"http://www.example.com\"", "textFilterOptions": "Filter Options", + "txtSortLow2High": "Sort Lowest to Highest", + "txtSortHigh2Low": "Sort Highest to Lowest", "textClearFilter": "Clear Filter", "textDeleteFilter": "Delete Filter", "textSelectAll": "Select All", diff --git a/apps/spreadsheeteditor/mobile/src/controller/FilterOptions.jsx b/apps/spreadsheeteditor/mobile/src/controller/FilterOptions.jsx index 6e8b153e8..d1c950bb6 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/FilterOptions.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/FilterOptions.jsx @@ -10,7 +10,8 @@ const FilterOptionsController = () => { const [configFilter, setConfig] = useState(null); const [listVal, setListValue] = useState([]); - const [isValid, setIsValid] = useState(null) + const [isValid, setIsValid] = useState(null); + const [checkSort, setCheckSort] = useState(null); useEffect(() => { function onDocumentReady() { @@ -36,6 +37,9 @@ const FilterOptionsController = () => { setConfig(config); setClearDisable(config); + setCheckSort((config.asc_getSortState() === Asc.c_oAscSortOptions.Ascending ? 'down' : '') || + (config.asc_getSortState() === Asc.c_oAscSortOptions.Descending ? 'up' : '')); + if (Device.phone) { f7.sheet.open('.picker__sheet'); } else { @@ -128,7 +132,7 @@ const FilterOptionsController = () => { }; return ( - ) }; diff --git a/apps/spreadsheeteditor/mobile/src/less/icons-ios.less b/apps/spreadsheeteditor/mobile/src/less/icons-ios.less index 1a908bcff..719610da7 100644 --- a/apps/spreadsheeteditor/mobile/src/less/icons-ios.less +++ b/apps/spreadsheeteditor/mobile/src/less/icons-ios.less @@ -299,12 +299,12 @@ &.sortdown { width: 22px; height: 22px; - .encoded-svg-background(''); + .encoded-svg-mask(''); } &.sortup { width: 22px; height: 22px; - .encoded-svg-background(''); + .encoded-svg-mask(''); } // Formats diff --git a/apps/spreadsheeteditor/mobile/src/less/icons-material.less b/apps/spreadsheeteditor/mobile/src/less/icons-material.less index 8c80a42f0..74821ae31 100644 --- a/apps/spreadsheeteditor/mobile/src/less/icons-material.less +++ b/apps/spreadsheeteditor/mobile/src/less/icons-material.less @@ -278,12 +278,12 @@ &.sortdown { width: 22px; height: 22px; - .encoded-svg-background(''); + .encoded-svg-mask(''); } &.sortup { width: 22px; height: 22px; - .encoded-svg-background(''); + .encoded-svg-mask(''); } // Formats diff --git a/apps/spreadsheeteditor/mobile/src/view/FilterOptions.jsx b/apps/spreadsheeteditor/mobile/src/view/FilterOptions.jsx index e5d307379..621b5afb9 100644 --- a/apps/spreadsheeteditor/mobile/src/view/FilterOptions.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/FilterOptions.jsx @@ -32,18 +32,20 @@ const FilterOptions = (props) => { } + - props.onSort('sortdown')}> - + props.onSort('sortdown')}> + - props.onSort('sortup')}> - + props.onSort('sortup')}> + + {_t.textClearFilter} props.onDeleteFilter()} id="btn-delete-filter">{_t.textDeleteFilter}