mirror of
https://github.com/searxng/searxng.git
synced 2024-05-19 20:08:04 +00:00
Merge d82f9cd780
into 41f415aabf
This commit is contained in:
commit
7bc2ae109b
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
searx/static/themes/simple/js/searxng.min.js
vendored
2
searx/static/themes/simple/js/searxng.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -27,6 +27,22 @@
|
|||
searxng.on(el, 'mouseenter', load_engine_descriptions);
|
||||
}
|
||||
|
||||
const enableAllEngines = d.querySelectorAll(".enable-all-engines");
|
||||
const disableAllEngines = d.querySelectorAll(".disable-all-engines");
|
||||
const engineToggles = d.querySelectorAll('tbody input[type=checkbox][class~=checkbox-onoff]');
|
||||
const toggleEngines = (enable) => {
|
||||
for (const el of engineToggles) {
|
||||
// check if element visible, so that only engines of the current category are modified
|
||||
if (el.offsetParent !== null) el.checked = !enable;
|
||||
}
|
||||
};
|
||||
for (const el of enableAllEngines) {
|
||||
searxng.on(el, 'click', () => toggleEngines(true));
|
||||
}
|
||||
for (const el of disableAllEngines) {
|
||||
searxng.on(el, 'click', () => toggleEngines(false));
|
||||
}
|
||||
|
||||
const copyHashButton = d.querySelector("#copy-hash");
|
||||
searxng.on(copyHashButton, 'click', (e) => {
|
||||
e.preventDefault();
|
||||
|
|
|
@ -185,6 +185,11 @@ table {
|
|||
}
|
||||
}
|
||||
|
||||
#toggle-all-engines-container {
|
||||
width: max-content;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
div.selectable_url {
|
||||
pre {
|
||||
width: 100%;
|
||||
|
|
|
@ -10,6 +10,12 @@
|
|||
{{- ' ' -}}<a href="{{ url_for('info', pagename='search-syntax') }}">ⓘ</a>
|
||||
</p>
|
||||
{%- endif -%}
|
||||
|
||||
<div class="hide_if_nojs" id="toggle-all-engines-container">
|
||||
<button type="button" class="button enable-all-engines">{{ _("Enable all") }}</button>
|
||||
<button type="button" class="button disable-all-engines">{{ _("Disable all") }}</button>
|
||||
</div>
|
||||
|
||||
<div class="scrollx">{{- '' -}}
|
||||
<table class="striped table_engines">{{- '' -}}
|
||||
|
||||
|
|
Loading…
Reference in a new issue