[common] Correct searchbar

This commit is contained in:
SergeyEzhin 2021-10-15 15:22:07 +04:00
parent 7a4bd9484c
commit d899bcabbf

View file

@ -93,41 +93,39 @@ class SearchView extends Component {
const $$ = Dom7;
$$(document).on('page:init', (e, page) => {
if ( page.name == 'home' ) {
this.searchbar = f7.searchbar.create({
el: '.searchbar',
customSearch: true,
expandable: true,
backdrop: false,
on: {
search: (bar, curval, prevval) => {
},
enable: this.onSearchbarShow.bind(this, true),
disable: this.onSearchbarShow.bind(this, false)
}
});
// function iOSVersion() {
// var ua = navigator.userAgent;
// var m;
// return (m = /(iPad|iPhone|iphone).*?(OS |os |OS\_)(\d+((_|\.)\d)?((_|\.)\d)?)/.exec(ua)) ? parseFloat(m[3]) : 0;
// }
const $editor = $$('#editor_sdk');
// const $replaceLink = $$('#replace-link');
if (false /* iOSVersion < 13 */) {
// $editor.on('mousedown touchstart', this.onEditorTouchStart.bind(this));
// $editor.on('mouseup touchend', this.onEditorTouchEnd.bind(this));
} else {
// $editor.on('pointerdown', this.onEditorTouchStart.bind(this));
// $editor.on('pointerup', this.onEditorTouchEnd.bind(this));
this.searchbar = f7.searchbar.create({
el: '.searchbar',
customSearch: true,
expandable: true,
backdrop: false,
on: {
search: (bar, curval, prevval) => {
},
enable: this.onSearchbarShow.bind(this, true),
disable: this.onSearchbarShow.bind(this, false)
}
});
$editor.on('pointerdown', this.onEditorTouchStart.bind(this));
$editor.on('pointerup', this.onEditorTouchEnd.bind(this));
// $replaceLink.on('click', this.onReplaceHold.bind(this));
// function iOSVersion() {
// var ua = navigator.userAgent;
// var m;
// return (m = /(iPad|iPhone|iphone).*?(OS |os |OS\_)(\d+((_|\.)\d)?((_|\.)\d)?)/.exec(ua)) ? parseFloat(m[3]) : 0;
// }
const $editor = $$('#editor_sdk');
// const $replaceLink = $$('#replace-link');
if (false /* iOSVersion < 13 */) {
// $editor.on('mousedown touchstart', this.onEditorTouchStart.bind(this));
// $editor.on('mouseup touchend', this.onEditorTouchEnd.bind(this));
} else {
// $editor.on('pointerdown', this.onEditorTouchStart.bind(this));
// $editor.on('pointerup', this.onEditorTouchEnd.bind(this));
}
$editor.on('pointerdown', this.onEditorTouchStart.bind(this));
$editor.on('pointerup', this.onEditorTouchEnd.bind(this));
// $replaceLink.on('click', this.onReplaceHold.bind(this));
});
this.onSettingsClick = this.onSettingsClick.bind(this);