From fb3e20e84898b7b60175ed70d77cc40ff8174678 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 5 Oct 2017 20:46:04 +0200 Subject: [PATCH] Cleanup searchbar --- skins/elastic/styles/widgets/searchbar.less | 8 +++---- skins/elastic/ui.js | 26 +++++++++------------ 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/skins/elastic/styles/widgets/searchbar.less b/skins/elastic/styles/widgets/searchbar.less index 693b4201d..e87ee9556 100644 --- a/skins/elastic/styles/widgets/searchbar.less +++ b/skins/elastic/styles/widgets/searchbar.less @@ -67,14 +67,12 @@ } } -/* html.ie11 { - .searchbar, - .searchfilterbar { - a:before { + .searchbar { + a.button.filter:before, + a.button.search:before { line-height: 3.2; font-size: 1.25rem; } } } -*/ diff --git a/skins/elastic/ui.js b/skins/elastic/ui.js index 921433c81..f05a8eacf 100644 --- a/skins/elastic/ui.js +++ b/skins/elastic/ui.js @@ -914,7 +914,7 @@ function rcube_elastic_ui() return; } - if ($(this).is('.searchbar,.searchfilterbar')) { + if ($(this).is('.searchbar')) { padding += this.offsetWidth; } else { @@ -1214,8 +1214,7 @@ function rcube_elastic_ui() } form.hide(); // width:auto fixes search button position in Chrome - // reset padding set when the form is displayed - $(bar).css({width: 'auto', 'padding-left': 0})[is_search_pending() ? 'addClass' : 'removeClass']('active'); + $(bar).css('left', 'auto')[is_search_pending() ? 'addClass' : 'removeClass']('active'); button.css('display', 'block'); if (focus && rcube_event.is_keyboard(event)) { button.focus(); @@ -1233,12 +1232,11 @@ function rcube_elastic_ui() .prepend($('')) .append($('a.options').detach().removeClass('button').addClass('icon input-group-addon')) .append($('a.reset').detach().removeClass('button').addClass('icon input-group-addon')) - .append($('')); + .append($('')); // Display search form button.on('click', function() { - var margin = $(bar).css('right'); - $(bar).css({'padding-left': margin, width: '100%'}); + $(bar).css('left', 0); form.css('display', 'flex'); button.hide(); input.focus(); @@ -1284,11 +1282,12 @@ function rcube_elastic_ui() $('select', bar).wrap($('