mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[fix 3/3] actually only hide them for tabs
The categories.html template is used in three places: 1) for the tabs on the result page 2) for the default category selection in the preferences 3) for the advanced search category selection in the oscar theme The search_on_category_select plugin only makes the checkboxes in 1) behave like tabs. The previous commit however hides the checkboxes in all three places when the plugin is loaded, which we don't want: The categories in 2) and 3) always act like checkboxes, so the checkboxes in these places should actually always be visible.
This commit is contained in:
parent
8e840a8dd7
commit
695e5d0005
5 changed files with 8 additions and 4 deletions
|
@ -1 +1 @@
|
||||||
.category input { display: none; }
|
.search-tabs .category input { display: none; }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="categories">
|
<div id="categories" class="{{categories_class}}">
|
||||||
{% for category in ((categories_as_tabs | reverse) if rtl else categories_as_tabs) -%}
|
{% for category in ((categories_as_tabs | reverse) if rtl else categories_as_tabs) -%}
|
||||||
<div class="category">
|
<div class="category">
|
||||||
<input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} />{{- '' -}}
|
<input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} />{{- '' -}}
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
|
{% with categories_class='search-tabs' %}
|
||||||
{%- include 'oscar/categories.html' -%}
|
{%- include 'oscar/categories.html' -%}
|
||||||
|
{% endwith %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form><!-- / #search_form_full -->
|
</form><!-- / #search_form_full -->
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
'files': 'file-tray-full-outline',
|
'files': 'file-tray-full-outline',
|
||||||
'social media': 'people-outline',
|
'social media': 'people-outline',
|
||||||
} -%}
|
} -%}
|
||||||
<div id="categories" class="search_categories">{{- '' -}}
|
<div id="categories" class="search_categories {{categories_class}}">{{- '' -}}
|
||||||
<div id="categories_container">
|
<div id="categories_container">
|
||||||
{%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%}
|
{%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%}
|
||||||
{%- for category in categories_as_tabs -%}
|
{%- for category in categories_as_tabs -%}
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
<button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('search') }}</span></button>
|
<button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('search') }}</span></button>
|
||||||
</div>
|
</div>
|
||||||
{% set display_tooltip = true %}
|
{% set display_tooltip = true %}
|
||||||
{% include 'simple/categories.html' %}
|
{% with categories_class='search-tabs' %}
|
||||||
|
{% include 'simple/categories.html' %}
|
||||||
|
{% endwith %}
|
||||||
</div>
|
</div>
|
||||||
<div class="search_filters">
|
<div class="search_filters">
|
||||||
{% include 'simple/filters/languages.html' %}
|
{% include 'simple/filters/languages.html' %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue