diff --git a/apps/common/mobile/lib/view/Search.jsx b/apps/common/mobile/lib/view/Search.jsx index ae026d894..72f69836c 100644 --- a/apps/common/mobile/lib/view/Search.jsx +++ b/apps/common/mobile/lib/view/Search.jsx @@ -9,7 +9,8 @@ import { observable, runInAction } from "mobx"; import { observer } from "mobx-react"; const searchOptions = observable({ - usereplace: false + usereplace: false, + isReplaceAll: false }); const popoverStyle = { @@ -31,15 +32,20 @@ class SearchSettingsView extends Component { searchBy: 1, lookIn: 1, isMatchCase: false, - isMatchCell: false + isMatchCell: false, + isReplaceAll: false }; } onFindReplaceClick(action) { - runInAction(() => searchOptions.usereplace = action == 'replace'); + runInAction(() => { + searchOptions.usereplace = action == 'replace'; + searchOptions.isReplaceAll = action == 'replace-all'; + }); this.setState({ - useReplace: searchOptions.usereplace + useReplace: searchOptions.usereplace, + isReplaceAll: searchOptions.isReplaceAll }); if (this.onReplaceChecked) {} @@ -251,14 +257,15 @@ class SearchView extends Component { render() { const usereplace = searchOptions.usereplace; + const isReplaceAll = searchOptions.isReplaceAll; const hidden = {display: "none"}; const searchQuery = this.state.searchQuery; - const replaceQuery = this.state.replaceQuery; + // const replaceQuery = this.state.replaceQuery; const isIos = Device.ios; const { _t } = this.props; if(this.searchbar && this.searchbar.enabled) { - usereplace ? this.searchbar.el.classList.add('replace') : this.searchbar.el.classList.remove('replace'); + usereplace || isReplaceAll ? this.searchbar.el.classList.add('replace') : this.searchbar.el.classList.remove('replace'); } return ( @@ -272,22 +279,30 @@ class SearchView extends Component {
- {this.changeSearchQuery(e.target.value)}} /> {isIos ? : null} - -
-
- {this.changeReplaceQuery(e.target.value)}} /> - {isIos ? : null} - + this.changeSearchQuery('')} />
+ {/* {usereplace || isReplaceAll ? */} +
+ {/* style={!usereplace ? hidden: null} */} + {this.changeReplaceQuery(e.target.value)}} /> + {isIos ? : null} + this.changeReplaceQuery('')} /> +
+ {/* */}
- this.onReplaceClick()}>{_t.textReplace} - this.onReplaceAllClick()}>{_t.textReplaceAll} + {/* this.onReplaceClick()}>{_t.textReplace} + this.onReplaceAllClick()}>{_t.textReplaceAll} */} + {isReplaceAll ? ( + this.onReplaceAllClick()}>{_t.textReplaceAll} + ) : usereplace ? ( + this.onReplaceClick()}>{_t.textReplace} + ) : null}
this.onSearchClick(SEARCH_BACKWARD)}> diff --git a/apps/common/mobile/resources/less/common-ios.less b/apps/common/mobile/resources/less/common-ios.less index 2dc225ede..5bea40077 100644 --- a/apps/common/mobile/resources/less/common-ios.less +++ b/apps/common/mobile/resources/less/common-ios.less @@ -435,6 +435,9 @@ // Find and Replace .navbar { + .searchbar { + background: var(--f7-navbar-bg-color); + } .searchbar-input-wrap { margin-right: 10px; height: 28px; @@ -462,6 +465,10 @@ } .searchbar-inner { + &__left { + margin-right: 10px; + justify-content: center; + } &__right { .buttons-row a.next { margin-left: 15px; @@ -469,14 +476,25 @@ } } - @media(max-width: 550px) - { + .searchbar-expandable.searchbar-enabled { + &.replace { + .searchbar-inner { + &__right { + width: 28%; + } + } + } + } + + @media(max-width: 550px) { + .navbar { + .searchbar-input-wrap { + margin-right: 0; + } + } .searchbar-expandable.searchbar-enabled { top: 0; .searchbar-inner { - &__left { - margin-right: 15px; - } &__center { flex-direction: column; } @@ -494,6 +512,14 @@ margin: 8px 0; } } + &__right { + width: auto; + height: 100%; + justify-content: space-between; + .buttons-row-replace { + height: 50%; + } + } } } } diff --git a/apps/common/mobile/resources/less/common-material.less b/apps/common/mobile/resources/less/common-material.less index 4bec965e1..512fe7a08 100644 --- a/apps/common/mobile/resources/less/common-material.less +++ b/apps/common/mobile/resources/less/common-material.less @@ -344,13 +344,9 @@ &__center { flex-wrap: wrap; } - &__left { - padding-top: 4px; - } - } - - .buttons-row-replace a { - color: @white; + // &__left { + // padding-top: 4px; + // } } .navbar { @@ -434,6 +430,7 @@ } .buttons-row-replace a { color: @white; + padding: 0; } .searchbar .buttons-row { align-self: flex-start; diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 0878be6ca..51ddd56ca 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -133,13 +133,6 @@ } } -.dialog { - z-index: 13700; - .content-block { - padding: 0; - } -} - .about { .content-block { margin: 0 auto 15px; @@ -751,23 +744,28 @@ input[type="number"]::-webkit-inner-spin-button { } } - -.picker-3d { - .picker-item { +.dlg-adv-options { + z-index: 13700; + .content-block { padding: 0; - text-align: left; - font-size: 16px; - span { + } + .picker-3d { + .picker-item { padding: 0; + text-align: left; + font-size: 16px; + span { + padding: 0; + } } } + .picker-center-highlight { + width: 100%; + left: 0; + right: 0; + } } -.picker-center-highlight { - width: 100%; - left: 0; - right: 0; -} diff --git a/apps/common/mobile/resources/less/search.less b/apps/common/mobile/resources/less/search.less index caf870f49..f322929d1 100644 --- a/apps/common/mobile/resources/less/search.less +++ b/apps/common/mobile/resources/less/search.less @@ -15,10 +15,11 @@ } .searchbar-inner { + justify-content: space-between; &__center { display: flex; align-items: center; - width: 100%; + width: 81%; } &__right { display: flex; @@ -34,7 +35,9 @@ display: flex; flex-direction: column; align-items: center; - width: max-content; + // width: max-content; + width: 100%; + justify-content: center; a { font-size: 15px; height: auto; diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index 2701603f2..6bd1dfcf8 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -337,7 +337,8 @@ "textSearch": "Search", "textMarginsW": "Left and right margins are too high for a given page width", "textMarginsH": "Top and bottom margins are too high for a given page height", - "textCollaboration": "Collaboration" + "textCollaboration": "Collaboration", + "textFindAndReplaceAll": "Find and Replace All" }, "Edit": { "textClose": "Close", diff --git a/apps/documenteditor/mobile/src/controller/Search.jsx b/apps/documenteditor/mobile/src/controller/Search.jsx index 4184133cc..a61230b9f 100644 --- a/apps/documenteditor/mobile/src/controller/Search.jsx +++ b/apps/documenteditor/mobile/src/controller/Search.jsx @@ -35,6 +35,8 @@ class SearchSettings extends SearchSettingsView { this.onFindReplaceClick('find')} /> this.onFindReplaceClick('replace')} /> + this.onFindReplaceClick('replace-all')}> diff --git a/apps/documenteditor/mobile/src/less/icons-material.less b/apps/documenteditor/mobile/src/less/icons-material.less index 3d746f4db..79eaa86d6 100644 --- a/apps/documenteditor/mobile/src/less/icons-material.less +++ b/apps/documenteditor/mobile/src/less/icons-material.less @@ -52,6 +52,11 @@ height: 24px; .encoded-svg-background(''); } + &.icon-search { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } } } i.icon { diff --git a/apps/documenteditor/mobile/src/store/textSettings.js b/apps/documenteditor/mobile/src/store/textSettings.js index 9c794163c..44fd4cd43 100644 --- a/apps/documenteditor/mobile/src/store/textSettings.js +++ b/apps/documenteditor/mobile/src/store/textSettings.js @@ -36,7 +36,8 @@ export class storeTextSettings { resetTextColor: action, changeCustomTextColors: action, resetLineSpacing: action, - resetBackgroundColor: action + resetBackgroundColor: action, + changeFontFamily: action }); } @@ -156,6 +157,10 @@ export class storeTextSettings { this.customTextColors = colors; } + changeFontFamily(name) { + this.fontName = name; + } + resetLineSpacing (vc) { let line = (vc.get_Line() === null || vc.get_LineRule() === null || vc.get_LineRule() != 1) ? -1 : vc.get_Line(); this.lineSpacing = line; diff --git a/apps/documenteditor/mobile/src/view/Toolbar.jsx b/apps/documenteditor/mobile/src/view/Toolbar.jsx index 25171c0aa..a49d002a8 100644 --- a/apps/documenteditor/mobile/src/view/Toolbar.jsx +++ b/apps/documenteditor/mobile/src/view/Toolbar.jsx @@ -9,7 +9,7 @@ const ToolbarView = props => { {props.isShowBack && } - {props.isEdit && EditorUIController.getUndoRedo && EditorUIController.getUndoRedo({ + {Device.ios && props.isEdit && EditorUIController.getUndoRedo && EditorUIController.getUndoRedo({ disabledUndo: !props.isCanUndo, disabledRedo: !props.isCanRedo, onUndoClick: props.onUndo, @@ -18,6 +18,12 @@ const ToolbarView = props => { {!Device.phone && {props.docTitle}} + {Device.android && props.isEdit && EditorUIController.getUndoRedo && EditorUIController.getUndoRedo({ + disabledUndo: !props.isCanUndo, + disabledRedo: !props.isCanRedo, + onUndoClick: props.onUndo, + onRedoClick: props.onRedo + })} {props.isEdit && EditorUIController.getToolbarOptions && EditorUIController.getToolbarOptions({ disabled: disableEditBtn || props.disabledControls, onEditClick: e => props.openOptions('edit'), diff --git a/apps/documenteditor/mobile/src/view/edit/EditText.jsx b/apps/documenteditor/mobile/src/view/edit/EditText.jsx index 5e6810182..3cad9d774 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditText.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditText.jsx @@ -28,6 +28,9 @@ const PageFonts = props => { }} }); }; + + console.log(curFontName); + return ( @@ -60,7 +63,7 @@ const PageFonts = props => { checked={curFontName === item.name} title={item.name} style={{fontFamily: `${item.name}`}} - onClick={() => {props.changeFontFamily(item.name)}} + onClick={() => {storeTextSettings.changeFontFamily(item.name); props.changeFontFamily(item.name)}} > ))} diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json index 2b1d429dc..768aafced 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -150,7 +150,8 @@ "Settings": { "textDone": "Done", "textSettings": "Settings", - "textFindAndReplace": "Find and replace", + "textFindAndReplace": "Find and Replace", + "textFindAndReplaceAll": "Find and Replace All", "textPresentationSettings": "Presentation Settings", "textApplicationSettings": "Application Settings", "textDownload": "Download", diff --git a/apps/presentationeditor/mobile/src/controller/Search.jsx b/apps/presentationeditor/mobile/src/controller/Search.jsx index d99567a2d..3f9706fb2 100644 --- a/apps/presentationeditor/mobile/src/controller/Search.jsx +++ b/apps/presentationeditor/mobile/src/controller/Search.jsx @@ -28,6 +28,8 @@ class SearchSettings extends SearchSettingsView { this.onFindReplaceClick('find')} /> this.onFindReplaceClick('replace')} /> + this.onFindReplaceClick('replace-all')}> diff --git a/apps/presentationeditor/mobile/src/less/icons-material.less b/apps/presentationeditor/mobile/src/less/icons-material.less index 57d5589c6..199f3c59c 100644 --- a/apps/presentationeditor/mobile/src/less/icons-material.less +++ b/apps/presentationeditor/mobile/src/less/icons-material.less @@ -476,6 +476,11 @@ height: 24px; .encoded-svg-background(''); } + &.icon-plus { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } } // Overwrite color for toolbar diff --git a/apps/presentationeditor/mobile/src/view/Toolbar.jsx b/apps/presentationeditor/mobile/src/view/Toolbar.jsx index 32c729891..cc053e6ae 100644 --- a/apps/presentationeditor/mobile/src/view/Toolbar.jsx +++ b/apps/presentationeditor/mobile/src/view/Toolbar.jsx @@ -8,7 +8,7 @@ const ToolbarView = props => { {props.isShowBack && } - {props.isEdit && EditorUIController.getUndoRedo && EditorUIController.getUndoRedo({ + {Device.ios && props.isEdit && EditorUIController.getUndoRedo && EditorUIController.getUndoRedo({ disabledUndo: !props.isCanUndo, disabledRedo: !props.isCanRedo, onUndoClick: props.onUndo, @@ -17,6 +17,12 @@ const ToolbarView = props => { {!Device.phone && {props.docTitle}} + {Device.android && props.isEdit && EditorUIController.getUndoRedo && EditorUIController.getUndoRedo({ + disabledUndo: !props.isCanUndo, + disabledRedo: !props.isCanRedo, + onUndoClick: props.onUndo, + onRedoClick: props.onRedo + })} {props.openOptions('preview')}}> {props.isEdit && EditorUIController.getToolbarOptions && EditorUIController.getToolbarOptions({ disabledAdd: props.disabledAdd || props.disabledControls, diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index 9c07b0773..53cd61ec1 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -402,6 +402,7 @@ }, "Settings": { "textFindAndReplace": "Find and Replace", + "textFindAndReplaceAll": "Find and Replace All", "textSpreadsheetSettings": "Spreadsheet Settings", "textApplicationSettings": "Application Settings", "textDownload": "Download", diff --git a/apps/spreadsheeteditor/mobile/src/controller/Search.jsx b/apps/spreadsheeteditor/mobile/src/controller/Search.jsx index c5da9a6b1..6deb8480e 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Search.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Search.jsx @@ -36,6 +36,8 @@ class SearchSettings extends SearchSettingsView { this.onFindReplaceClick('find')} /> this.onFindReplaceClick('replace')} /> + this.onFindReplaceClick('replace-all')}> {_t.textSearchIn} diff --git a/apps/spreadsheeteditor/mobile/src/less/icons-material.less b/apps/spreadsheeteditor/mobile/src/less/icons-material.less index 5c5fed65c..046876ee2 100644 --- a/apps/spreadsheeteditor/mobile/src/less/icons-material.less +++ b/apps/spreadsheeteditor/mobile/src/less/icons-material.less @@ -391,6 +391,11 @@ height: 24px; .encoded-svg-background(''); } + &.icon-plus { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } } // Overwrite color for toolbar diff --git a/apps/spreadsheeteditor/mobile/src/view/Toolbar.jsx b/apps/spreadsheeteditor/mobile/src/view/Toolbar.jsx index d6625cc27..2680d752b 100644 --- a/apps/spreadsheeteditor/mobile/src/view/Toolbar.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/Toolbar.jsx @@ -4,19 +4,21 @@ import { Device } from '../../../../common/mobile/utils/device'; import EditorUIController from '../lib/patch' const ToolbarView = props => { + const undo_box = props.isEdit && EditorUIController.toolbarOptions ? EditorUIController.toolbarOptions.getUndoRedo({ + disabledUndo: !props.isCanUndo, + disabledRedo: !props.isCanRedo, + onUndoClick: props.onUndo, + onRedoClick: props.onRedo + }) : null; return ( {props.isShowBack && } - {props.isEdit && EditorUIController.toolbarOptions && EditorUIController.toolbarOptions.getUndoRedo({ - disabledUndo: !props.isCanUndo, - disabledRedo: !props.isCanRedo, - onUndoClick: props.onUndo, - onRedoClick: props.onRedo - })} + {Device.ios && undo_box} {!Device.phone && {props.docTitle}} + {Device.android && undo_box} {props.isEdit && EditorUIController.toolbarOptions && EditorUIController.toolbarOptions.getEditOptions({ disabled: props.disabledEditControls || props.disabledControls, onEditClick: () => props.openOptions('edit'),