diff --git a/etemplate/js/et2_widget_textbox.js b/etemplate/js/et2_widget_textbox.js index 2fdf8718e3..1f89c496fb 100644 --- a/etemplate/js/et2_widget_textbox.js +++ b/etemplate/js/et2_widget_textbox.js @@ -428,7 +428,9 @@ var et2_searchbox = et2_textbox.extend( this.value = ""; this.div = jQuery(document.createElement('div')) .addClass('et2_searchbox'); - + this.flex = jQuery(document.createElement('div')) + .addClass('flex') + .appendTo(this.div); this._super.apply(this, arguments); this.setDOMNode(this.div[0]); this._createWidget(); @@ -481,7 +483,7 @@ var et2_searchbox = et2_textbox.extend( if (event.target.type == 'span') event.stopImmidatePropagation(); } }); - this.div.append(this.search.getDOMNode()); + this.flex.append(this.search.getDOMNode()); // clear button implementation this.clear = jQuery(document.createElement('span')) @@ -501,7 +503,7 @@ var et2_searchbox = et2_textbox.extend( self._show_hide(false); } }) - .appendTo(this.div); + .appendTo(this.flex); }, /** @@ -510,8 +512,7 @@ var et2_searchbox = et2_textbox.extend( */ _show_hide: function(_stat) { - jQuery(this.search.getDOMNode()).toggleClass('hide',!_stat); - jQuery('span.clear',this.div).toggleClass('hide',!_stat); + jQuery(this.flex).toggleClass('hide',!_stat); jQuery(this.getDOMNode()).toggleClass('expanded', _stat); }, diff --git a/etemplate/templates/default/etemplate2.css b/etemplate/templates/default/etemplate2.css index 8d248a20ee..dcc19adb60 100644 --- a/etemplate/templates/default/etemplate2.css +++ b/etemplate/templates/default/etemplate2.css @@ -2231,9 +2231,6 @@ td.avatar { .et2_searchbox { position: relative; padding: 0 0 0 0px; - margin-right: 15px; - margin-left: 15px; - width: 200px; z-index: 100; white-space: nowrap; } @@ -2251,7 +2248,7 @@ td.avatar { position: absolute; top: 5px; height: 18px; - width: 80%; + width: 100%; } .et2_searchbox span.ui-icon.clear{ display: inline-block; @@ -2261,6 +2258,11 @@ td.avatar { right: 5px; top: 6px; } +.et2_searchbox .flex { + width:200px; + position: absolute; + display: inline-block; +} .et2_searchbox .hide { display: none !important; } \ No newline at end of file diff --git a/pixelegg/css/mobile.css b/pixelegg/css/mobile.css index 834c6aaa3d..16f0e8bb18 100644 --- a/pixelegg/css/mobile.css +++ b/pixelegg/css/mobile.css @@ -8207,4 +8207,7 @@ span.egw_tutorial_title { right: 80px; top: 14px; } + body .et2_searchbox.expanded .flex { + width: 100%; + } } diff --git a/pixelegg/css/mobile.less b/pixelegg/css/mobile.less index 4dfba76012..748044b789 100644 --- a/pixelegg/css/mobile.less +++ b/pixelegg/css/mobile.less @@ -1796,6 +1796,9 @@ right:80px; top:14px; } + .flex{ + width:100%; + } } } }