From e481c2d133f68ebb6e5ad69ff21203a55832aa13 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 10 Mar 2016 15:45:02 +0000 Subject: [PATCH] Mobile theme: - Do not let user mess with search filter and make searchbox available as last filter state - Implement indicator of open state for nm header/ contextmenu --- etemplate/js/et2_extension_nextmatch.js | 6 +++--- etemplate/js/et2_widget_textbox.js | 4 ++-- pixelegg/mobile/fw_mobile.css | 8 +++++++- pixelegg/mobile/fw_mobile.less | 8 +++++++- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index e49302cabc..f7dfb363d9 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -1030,7 +1030,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ _row[x].widget = et2_createWidget("label"); } } - + // Get column display preference this._applyUserPreferences(_row, _colData); @@ -1306,7 +1306,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ { var col = columnMgr.columns[i]; var widget = this.columns[i].widget; - + if(col.caption && col.visibility !== ET2_COL_VISIBILITY_ALWAYS_NOSELECT && col.visibility !== ET2_COL_VISIBILITY_DISABLED) { @@ -2303,7 +2303,7 @@ var et2_nextmatch_header_bar = (function(){ "use strict"; return et2_DOMWidget.e // searchbox widget options var searchbox_options = { id:"search", - overlay:(typeof settings.searchbox != 'undefined' && typeof settings.searchbox.overlay != 'undefined')?settings.searchbox.overlay:Boolean(egwIsMobile()), + overlay:(typeof settings.searchbox != 'undefined' && typeof settings.searchbox.overlay != 'undefined')?settings.searchbox.overlay:false, onchange:function(){ self.nextmatch.applyFilters({search: this.get_value()}); }, diff --git a/etemplate/js/et2_widget_textbox.js b/etemplate/js/et2_widget_textbox.js index dc7d7f1e5b..e58d9a9940 100644 --- a/etemplate/js/et2_widget_textbox.js +++ b/etemplate/js/et2_widget_textbox.js @@ -490,6 +490,7 @@ var et2_searchbox = (function(){ "use strict"; return et2_textbox.extend( }, blur: function(event){ + if (egwIsMobile()) return; if (!event.relatedTarget || !jQuery(event.relatedTarget.parentNode).hasClass('et2_searchbox')) { self._show_hide((!self.options.overlay && self.get_value())); @@ -545,8 +546,7 @@ var et2_searchbox = (function(){ "use strict"; return et2_textbox.extend( */ _searchToggleState:function() { - // Not applied for fix option - if (this.options.fix) return; + if (this.options.fix || egwIsMobile()) return; if (!this.get_value()) { diff --git a/pixelegg/mobile/fw_mobile.css b/pixelegg/mobile/fw_mobile.css index afc7540b77..43739bdec3 100644 --- a/pixelegg/mobile/fw_mobile.css +++ b/pixelegg/mobile/fw_mobile.css @@ -7437,7 +7437,7 @@ form[id^="tracker-"] .dialogHeadbar { background-image: url(../images/dots.svg); background-position: center; background-repeat: no-repeat; - margin-right: 5px; + margin-right: 2px; border-left: 1px solid silver; border: 0; color: white; @@ -7456,6 +7456,8 @@ form[id^="tracker-"] .dialogHeadbar { } body .et2_nextmatch .nm-mob-header button.nm_action_header.back { background-image: url(../images/cancelled.svg); + -webkit-filter: none!important; + background-color: white !important; } body .et2_nextmatch .nm-mob-header div.nm_favorites_div { background-position: center; @@ -7511,6 +7513,8 @@ form[id^="tracker-"] .dialogHeadbar { } body .et2_nextmatch .nm-mob-header button.nm_toggle_header_on { background-image: url(../images/cancelled.svg); + -webkit-filter: none!important; + background-color: white !important; } body .et2_nextmatch .nm-mob-header input[type="search"] { width: 50px; @@ -7955,6 +7959,7 @@ form[id^="tracker-"] .dialogHeadbar { top: 0; outline: none; z-index: 100; + border-radius: 0; } body .et2_searchbox.expanded span.ui-icon.clear { top: 0px; @@ -7970,6 +7975,7 @@ form[id^="tracker-"] .dialogHeadbar { } body .et2_searchbox.expanded .flex { width: 100%; + position: absolute; } body img.et2_button_icon[src*="svg"] { background: none; diff --git a/pixelegg/mobile/fw_mobile.less b/pixelegg/mobile/fw_mobile.less index 1e04359138..5672d8b6df 100644 --- a/pixelegg/mobile/fw_mobile.less +++ b/pixelegg/mobile/fw_mobile.less @@ -534,7 +534,7 @@ background-image: url(../images/dots.svg); background-position: center; background-repeat: no-repeat; - margin-right:5px; + margin-right:2px; border-left:1px solid silver; border:0; color: white; @@ -549,6 +549,8 @@ } button.nm_action_header.back { background-image: url(../images/cancelled.svg); + -webkit-filter: none!important; + background-color: white !important; } div.nm_favorites_div { background-position: center; @@ -607,6 +609,8 @@ } button.nm_toggle_header_on { background-image: url(../images/cancelled.svg); + -webkit-filter: none!important; + background-color: white !important; } input[type="search"] { width: 50px; @@ -1064,6 +1068,7 @@ top:0; outline: none; z-index: 100; + border-radius: 0; } span.ui-icon.clear{ top: 0px; @@ -1079,6 +1084,7 @@ } .flex{ width:100%; + position: absolute; } }