diff --git a/apps/common/mobile/resources/less/common-ios.less b/apps/common/mobile/resources/less/common-ios.less
index c6f4ec509d..c3d834f893 100644
--- a/apps/common/mobile/resources/less/common-ios.less
+++ b/apps/common/mobile/resources/less/common-ios.less
@@ -52,6 +52,12 @@
ul {
border-radius: 0;
}
+
+ li:first-child, li:last-child {
+ > label {
+ border-radius: 0;
+ }
+ }
}
}
diff --git a/apps/documenteditor/mobile/src/controller/Search.jsx b/apps/documenteditor/mobile/src/controller/Search.jsx
new file mode 100644
index 0000000000..6c662c5f3c
--- /dev/null
+++ b/apps/documenteditor/mobile/src/controller/Search.jsx
@@ -0,0 +1,8 @@
+import React from 'react';
+import SearchView, {SearchSettingsView} from '../view/Search'
+
+const SearchController = props => {
+ return
+};
+
+export {SearchController as Search, SearchSettingsView as SearchSettings};
diff --git a/apps/documenteditor/mobile/src/pages/home.jsx b/apps/documenteditor/mobile/src/pages/home.jsx
index 05a9efe60a..0398500961 100644
--- a/apps/documenteditor/mobile/src/pages/home.jsx
+++ b/apps/documenteditor/mobile/src/pages/home.jsx
@@ -4,8 +4,9 @@ import { Page, View, Navbar, NavLeft, NavRight, Link, Icon } from 'framework7-re
import EditOptions from '../view/edit/Edit';
import AddOptions from '../view/add/Add';
import Settings from '../view/settings/Settings';
-import SearchView from '../view/search';
import CollaborationView from '../../../../common/mobile/lib/view/Collaboration.jsx'
+import { Device } from '../../../../common/mobile/utils/device'
+import { Search, SearchSettings } from '../controller/Search';
export default class Home extends Component {
constructor(props) {
@@ -59,16 +60,19 @@ export default class Home extends Component {
this.handleClickToOpenOptions('edit')}>
this.handleClickToOpenOptions('add')}>
-
+ { Device.phone ? null : }
this.handleClickToOpenOptions('coauth')}>
this.handleClickToOpenOptions('settings')}>
-
+ { Device.phone ? null : }
{/* Page content */}
+ {
+ Device.phone ? null :
+ }
{
!this.state.editOptionsVisible ? null :
diff --git a/apps/documenteditor/mobile/src/view/Search.jsx b/apps/documenteditor/mobile/src/view/Search.jsx
new file mode 100644
index 0000000000..dcbcb6de21
--- /dev/null
+++ b/apps/documenteditor/mobile/src/view/Search.jsx
@@ -0,0 +1,116 @@
+import React, { Component } from 'react';
+import { Searchbar, Popover, Popup, View, Page, List, ListItem, Navbar, NavRight, Link } from 'framework7-react';
+import { f7ready, f7 } from 'framework7-react';
+import { Device } from '../../../../common/mobile/utils/device';
+
+const popoverStyle = {
+ height: '300px'
+};
+
+class SearchSettingsView extends Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ useReplace: false,
+ caseSensitive: false,
+ markResults: false
+ };
+ }
+
+ onFindReplaceClick(action) {
+ this.setState({
+ useReplace: action == 'replace'
+ });
+ }
+
+ render() {
+ const show_popover = true;
+ const navbar =
+
+ {!show_popover &&
+
+ Done
+ }
+ ;
+ const content =
+
+
+ {navbar}
+
+ this.onFindReplaceClick('find')}>
+ this.onFindReplaceClick('replace')}>
+
+
+ ;
+ return (
+ show_popover ?
+ {content} :
+ {content}
+ )
+ }
+}
+
+class SearchView extends Component {
+ constructor(props) {
+ super(props);
+
+ $$(document).on('page:init', (e, page) => {
+ if ( page.name == 'home' ) {
+ this.$f7.searchbar.create({
+ el: '.searchbar',
+ customSearch: true,
+ expandable: true,
+ backdrop: false,
+ on: {
+ search: (bar, curval, prevval) => {
+ console.log('on search results ' + curval);
+ }
+ }
+ });
+ }
+ });
+
+ this.onSettingsClick = this.onSettingsClick.bind(this);
+ }
+
+ componentDidMount(){
+ }
+
+ onSettingsClick(e) {
+ if ( Device.phone ) {
+ // f7.popup.open('.settings-popup');
+ } else this.$f7.popover.open('#idx-search-settings', '#idx-btn-search-settings');
+ }
+
+ render() {
+ return (
+
+ )
+ }
+}
+
+export {SearchView as default, SearchSettingsView};
diff --git a/apps/documenteditor/mobile/src/view/search.jsx b/apps/documenteditor/mobile/src/view/search.jsx
index 30a21695fa..dcbcb6de21 100644
--- a/apps/documenteditor/mobile/src/view/search.jsx
+++ b/apps/documenteditor/mobile/src/view/search.jsx
@@ -1,14 +1,63 @@
import React, { Component } from 'react';
-import { Searchbar, Link } from 'framework7-react';
+import { Searchbar, Popover, Popup, View, Page, List, ListItem, Navbar, NavRight, Link } from 'framework7-react';
import { f7ready, f7 } from 'framework7-react';
+import { Device } from '../../../../common/mobile/utils/device';
-export default class SearchView extends Component {
+const popoverStyle = {
+ height: '300px'
+};
+
+class SearchSettingsView extends Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ useReplace: false,
+ caseSensitive: false,
+ markResults: false
+ };
+ }
+
+ onFindReplaceClick(action) {
+ this.setState({
+ useReplace: action == 'replace'
+ });
+ }
+
+ render() {
+ const show_popover = true;
+ const navbar =
+
+ {!show_popover &&
+
+ Done
+ }
+ ;
+ const content =
+
+
+ {navbar}
+
+ this.onFindReplaceClick('find')}>
+ this.onFindReplaceClick('replace')}>
+
+
+ ;
+ return (
+ show_popover ?
+ {content} :
+ {content}
+ )
+ }
+}
+
+class SearchView extends Component {
constructor(props) {
super(props);
$$(document).on('page:init', (e, page) => {
if ( page.name == 'home' ) {
- f7.searchbar.create({
+ this.$f7.searchbar.create({
el: '.searchbar',
customSearch: true,
expandable: true,
@@ -21,18 +70,26 @@ export default class SearchView extends Component {
});
}
});
+
+ this.onSettingsClick = this.onSettingsClick.bind(this);
}
componentDidMount(){
}
+ onSettingsClick(e) {
+ if ( Device.phone ) {
+ // f7.popup.open('.settings-popup');
+ } else this.$f7.popover.open('#idx-search-settings', '#idx-btn-search-settings');
+ }
+
render() {
return (