mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-25 03:30:30 +02:00
➕ Add "search transactions page"
This commit is contained in:
@ -10,6 +10,7 @@ $(document).ready(function () {
|
||||
if (!name_field)
|
||||
name_field = "name";
|
||||
let input = target.val();
|
||||
$("#" + prefix + "_reset").removeClass("d-none");
|
||||
|
||||
$.getJSON(api_url + (api_url.includes("?") ? "&" : "?") + "format=json&search=^" + input + api_url_suffix, function(objects) {
|
||||
let html = "";
|
||||
@ -39,4 +40,12 @@ $(document).ready(function () {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(".autocomplete-reset").click(function() {
|
||||
let name = $(this).attr("id").replace("_reset", "");
|
||||
$("#" + name + "_pk").val("");
|
||||
$("#" + name).val("");
|
||||
$("#" + name + "_list").html("");
|
||||
$(this).addClass("d-none");
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user