Browse Source

move the javascript for autodeleting to a separate winix.js file

master
Tomasz Sowa 2 months ago
parent
commit
ba16cf41fe
  1. 21
      winixd/html/index_head_adder.html

21
winixd/html/index_head_adder.html

@ -20,6 +20,8 @@
[def? winix_load_litepicker false]
[def? winix_load_winixjs true]
[if winix_set_charset]
<meta charset="UTF-8">
@ -51,20 +53,7 @@
[if winix_has_htmx]
<script>htmx.on("htmx:afterOnLoad", function(evt) \{
[# we can optimize it by searching first the <head> tag]
var winix_elements = htmx.findAll(".winix-auto-delete");
for(var i=0 ; i<winix_elements.length ; ++i)
\{
console.log("removing:");
console.log(winix_elements\[i\]);
htmx.remove(winix_elements\[i\]);
\}
\});
</script>
[end]
@ -496,3 +485,9 @@ cm.save()
[end]
[end]
[if winix_load_winixjs]
<script src="[doc_base_url_common]/winix/winix.js"></script>
[end]

Loading…
Cancel
Save