diff --git a/resources/assets/stylesheets/scss/sidebar.scss b/resources/assets/stylesheets/scss/sidebar.scss index 9a97976761e57450c98cb2a36df8e31315a5843a..c16177899ac31ab334e28ed8d56ee18c15e1451b 100644 --- a/resources/assets/stylesheets/scss/sidebar.scss +++ b/resources/assets/stylesheets/scss/sidebar.scss @@ -313,6 +313,7 @@ select.sidebar-selectlist { flex: 1; padding: .25em .5em; width: 100%; + order: 1; } .submit-search { @@ -324,17 +325,22 @@ select.sidebar-selectlist { cursor: pointer; font: 0/0 a; text-shadow: none; + order: 3; } .reset-search { - background-color: transparent; - border: 1px solid var(--dark-gray-color-30); - border-left: 0; - border-right: 0; + background: unset; display: inline-block; - padding-right: 5px; - padding-top: 4px; cursor: pointer; + order: 2; + height: 100%; + box-sizing: border-box; + margin-right: 2px; + margin-left: -22px; + + img { + padding-top: 4px; + } } } diff --git a/templates/sidebar/search-widget.php b/templates/sidebar/search-widget.php index 300147e6677355d89b20756b24ac84aaeb10a1c0..c3146735384fb550723724b60c6947893dff3ea2 100644 --- a/templates/sidebar/search-widget.php +++ b/templates/sidebar/search-widget.php @@ -24,25 +24,24 @@ <? if ($needle['placeholder']) printf('placeholder="%s"', htmlReady($needle['label'])); ?> <?= arrayToHtmlAttributes($needle['attributes']) ?>> <? endif; ?> - <? if ($reset_link): ?> - <? if ($onsubmit) : ?> - <?= Icon::create('decline')->asInput([ - 'title' => _('Suche zurücksetzen'), - 'class' => 'reset-search', - 'onclick' => "window.document.getElementById('needle-".$hash."').value = '';" - ]) ?> - <? else : ?> - <a class="reset-search" href="<?= $reset_link ?>" tabindex="0" role="button" - <?= $onsubmit ? 'onclick="'."window.document.getElementById('needle-".$hash."').value = ''; window.document.getElementById('".$id."').submit(); return false; ".'"' : '' ?> - title="<?= _('Suche zurücksetzen') ?>"> - <?= Icon::create('decline')->asImg(20) ?> - </a> - <? endif ?> - <? endif; ?> <button type="submit" class="submit-search<?= $reset_link ? ' is-executed' : '' ?>" title="<?= _('Suche ausführen') ?>"> <?= Icon::create('search')->asImg(20) ?> </button> + <? if ($reset_link): ?> + <? if ($onsubmit) : ?> + <?= Icon::create('decline')->asInput([ + 'title' => _('Suche zurücksetzen'), + 'class' => 'reset-search', + 'onclick' => "document.getElementById('needle-".$hash."').value = ''; this.remove();" + ]) ?> + <? else : ?> + <a class="reset-search" href="<?= $reset_link ?>" tabindex="0" role="button" + title="<?= _('Suche zurücksetzen') ?>"> + <?= Icon::create('decline')->asImg(20) ?> + </a> + <? endif ?> + <? endif; ?> </li> <? endforeach; ?> </ul>