Skip to content

Commit

Permalink
Elastic: Small improvements in searchbar
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed May 17, 2018
1 parent 0d62450 commit 9746de2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
24 changes: 12 additions & 12 deletions program/include/rcmail_output_html.php
Expand Up @@ -81,6 +81,14 @@ public function __construct($task = null, $framed = false)
$this->set_env('cookie_path', ini_get('session.cookie_path'));
$this->set_env('cookie_secure', filter_var(ini_get('session.cookie_secure'), FILTER_VALIDATE_BOOLEAN));

// Easy way to change skin via GET argument, for developers
if ($this->devel_mode && !empty($_GET['skin']) && preg_match('/^[a-z0-9-_]+$/i', $_GET['skin'])) {
if ($this->check_skin($_GET['skin'])) {
$this->set_skin($_GET['skin']);
$this->app->user->save_prefs(array('skin' => $_GET['skin']));
}
}

// load and setup the skin
$this->set_skin($this->config->get('skin'));
$this->set_assets_path($this->config->get('assets_path'), $this->config->get('assets_dir'));
Expand Down Expand Up @@ -503,14 +511,6 @@ public function redirect($p = array(), $delay = 1, $secure = false)
*/
public function send($templ = null, $exit = true)
{
// Easy way to change skin via GET argument, for developers
if ($this->devel_mode && !empty($_GET['skin']) && preg_match('/^[a-z0-9-_]+$/i', $_GET['skin'])) {
if ($this->check_skin($_GET['skin'])) {
$this->set_skin($_GET['skin']);
$this->app->user->save_prefs(array('skin' => $_GET['skin']));
}
}

if ($templ != 'iframe') {
// prevent from endless loops
if ($exit != 'recur' && $this->app->plugins->is_processing('render_page')) {
Expand Down Expand Up @@ -2143,10 +2143,10 @@ public function search_form($attrib)
));

$out = html::div(array(
'role' => 'search',
'aria-labelledby' => $attrib['label'] ? 'aria-label-' . $attrib['label'] : null,
'class' => $attrib['wrapper'],
), "$header$out\n$options_button\n$reset_button\n$search_button");
'role' => 'search',
'aria-labelledby' => $attrib['label'] ? 'aria-label-' . $attrib['label'] : null,
'class' => $attrib['wrapper'],
), "$header$out\n$reset_button\n$options_button\n$search_button");
}

return $out;
Expand Down
14 changes: 3 additions & 11 deletions skins/elastic/styles/widgets/toolbar.less
Expand Up @@ -761,6 +761,7 @@ a.button.icon.toolbar-button {

.searchbar {
height: @layout-searchbar-height;
min-height: @layout-searchbar-height; // because of Flexbox
line-height: @layout-searchbar-height;
background-color: @color-searchbar-background;
border-bottom: 1px solid @color-list-border;
Expand All @@ -779,6 +780,7 @@ a.button.icon.toolbar-button {
&:extend(.font-icon-class);
content: @fa-var-search;
height: @layout-searchbar-height;
color: @color-toolbar-button;
}
}

Expand All @@ -792,12 +794,12 @@ a.button.icon.toolbar-button {
a.button {
height: @layout-searchbar-height;
min-width: auto;
color: @color-toolbar-button;

&:before {
&:extend(.font-icon-class);
}


&.options {
&:before {
content: @fa-var-filter;
Expand All @@ -807,19 +809,13 @@ a.button.icon.toolbar-button {

&.reset {
display: none;
position: absolute;
right: .5rem;

&:before {
content: @fa-var-times;
font-size: 1em;
}
}

&.options + .reset {
right: 2.5rem;
}

&.search {
display: none;
}
Expand All @@ -830,10 +826,6 @@ a.button.icon.toolbar-button {
}

&.active {
form:before {
color: @color-searchbar-icon-active;
}

a.button.reset {
display: inline;
}
Expand Down

0 comments on commit 9746de2

Please sign in to comment.