mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-30 01:35:32 +00:00
splitting all js into individual files to comparmentalize and getting rid of onload event (in favour of defer)
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
: "ha-bibel";
|
||||
}
|
||||
|
||||
<script defer src="/js/register.js"></script>
|
||||
|
||||
<div class="ha-register">
|
||||
<div class="@commentClass">
|
||||
<div class="ha-register-head">
|
||||
@@ -51,25 +53,6 @@
|
||||
</form>
|
||||
}
|
||||
|
||||
<script>
|
||||
const ACTIVATESEARCHFILTER = function(filter, button) {
|
||||
let f = filter.value;
|
||||
if (f === "") {
|
||||
button.disabled = true;
|
||||
return;
|
||||
}
|
||||
button.disabled = false;
|
||||
}
|
||||
|
||||
window.addEventListener("load", () => {
|
||||
let searchfilter = document.getElementById("ha-searchformtext");
|
||||
let searchsubmitbtn = document.getElementById("ha-searchformsubmit");
|
||||
let searchform = document.getElementById("ha-searchform");
|
||||
ACTIVATESEARCHFILTER(searchfilter, searchsubmitbtn);
|
||||
searchfilter.addEventListener("input", () => ACTIVATESEARCHFILTER(searchfilter, searchsubmitbtn));
|
||||
});
|
||||
</script>
|
||||
|
||||
@* <form asp-controller="Suche" asp-action="Index" method="GET" >
|
||||
<input type="text" name="search" placeholder="Suchbegriff" />
|
||||
<button type="submit">Suchen</button>
|
||||
|
||||
Reference in New Issue
Block a user