Added tooltips for the different search mode options

This commit is contained in:
Jan Böhmer 2026-07-27 18:40:51 +02:00
parent 1affcf7eaa
commit e5ceff784e
3 changed files with 26 additions and 8 deletions

View file

@ -27,7 +27,7 @@ class RegisterEventHelper {
constructor() {
this.registerTooltips();
this.configureDropdowns();
// Only register special character input if enabled in configuration
const keybindingsEnabled = document.body.dataset.keybindingsSpecialCharacters !== 'false';
if (keybindingsEnabled) {
@ -85,7 +85,7 @@ class RegisterEventHelper {
const handler = () => {
$(".tooltip").remove();
//Exclude dropdown buttons from tooltips, otherwise we run into endless errors from bootstrap (bootstrap.esm.js:614 Bootstrap doesn't allow more than one instance per element. Bound instance: bs.dropdown.)
$('a[title], label[title], button[title]:not([data-bs-toggle="dropdown"]), p[title], span[title], h6[title], h3[title], i[title], small[title]')
$('a[title], label[title], button[title]:not([data-bs-toggle="dropdown"]), p[title], span[title], h6[title], h3[title], i[title], small[title], div[title]')
//@ts-ignore
.tooltip("hide").tooltip({container: "body", placement: "auto", boundary: 'window'});
};
@ -333,4 +333,4 @@ class RegisterEventHelper {
}
}
export default new RegisterEventHelper();
export default new RegisterEventHelper();

View file

@ -66,16 +66,16 @@
</div>
{% endif %}
<hr>
<div class="form-check">
<div class="form-check" title="{% trans %}search.regexmatching.help{% endtrans %}">
<input type="checkbox" class="form-check-input" id="regex" name="regex" value="1" {{ stimulus_controller('elements/localStorage_checkbox') }} {{ stimulus_target('elements/search_config', 'regex') }}>
<label for="regex" class="form-check-label justify-content-start">{% trans %}search.regexmatching{% endtrans %}</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="extensive" name="extensive" value="0" {{ stimulus_controller('elements/localStorage_checkbox') }} {{ stimulus_target('elements/search_config', 'extensive') }}>
<div class="form-check" title="{% trans %}search.extensive_matching.help{% endtrans %}">
<input type="checkbox" class="form-check-input" id="extensive" name="extensive" value="1" {{ stimulus_controller('elements/localStorage_checkbox') }} {{ stimulus_target('elements/search_config', 'extensive') }}>
<label for="extensive" class="form-check-label justify-content-start">{% trans %}search.extensive_matching{% endtrans %}</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="wildcard" name="wildcard" value="0" {{ stimulus_controller('elements/localStorage_checkbox') }} {{ stimulus_target('elements/search_config', 'wildcard') }}>
<div class="form-check" title="{% trans %}search.permit_wildcards.help{% endtrans %}">
<input type="checkbox" class="form-check-input" id="wildcard" name="wildcard" value="1" {{ stimulus_controller('elements/localStorage_checkbox') }} {{ stimulus_target('elements/search_config', 'wildcard') }}>
<label for="wildcard" class="form-check-label justify-content-start">{% trans %}search.permit_wildcards{% endtrans %}</label>
</div>
</div>

View file

@ -13679,5 +13679,23 @@ Buerklin-API Authentication server:
<target>Treat &lt;code&gt;%&lt;/code&gt; and &lt;code&gt;_&lt;/code&gt; as wildcards</target>
</segment>
</unit>
<unit id="_nxvnMn" name="search.regexmatching.help">
<segment>
<source>search.regexmatching.help</source>
<target>Use regular expressions like "^\w{3,5}" to search for parts. Does not require slashes padding.</target>
</segment>
</unit>
<unit id="mry8ytG" name="search.extensive_matching.help">
<segment>
<source>search.extensive_matching.help</source>
<target>The search term is split up into parts, and a result is found, when each part is contained in any field. Without this mode the full search term has to be contained in a single field.</target>
</segment>
</unit>
<unit id="zLnKtwP" name="search.permit_wildcards.help">
<segment>
<source>search.permit_wildcards.help</source>
<target>If enabled, _ is treated as a wildcard for one character and % is treated as a wildcard for zero or more characters.</target>
</segment>
</unit>
</file>
</xliff>