summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Peter Christen <mc@yacy.net>2025-11-10 23:24:57 +0100
committerMichael Peter Christen <mc@yacy.net>2025-11-10 23:24:57 +0100
commit1a74f18af9dee024325e79d30ac38850a47792a5 (patch)
tree2c20f3be3bda677423daf8c47dda7651d2992027
parent37c26bddf399fcf94e34cec110af023c8e35abbd (diff)
fixed persistence of LLMSelection production table events
-rw-r--r--htroot/LLMSelection_p.html20
1 files changed, 14 insertions, 6 deletions
diff --git a/htroot/LLMSelection_p.html b/htroot/LLMSelection_p.html
index 4d3362a44..e46ace1e1 100644
--- a/htroot/LLMSelection_p.html
+++ b/htroot/LLMSelection_p.html
@@ -548,14 +548,11 @@
if (!checkbox) {
checkbox = document.createElement("input");
checkbox.type = "checkbox";
- checkbox.dataset.featureColumn = String(col);
- checkbox.addEventListener("change", event => {
- handleFeatureCheckboxToggle(col, event.currentTarget);
- });
cell.textContent = "";
cell.appendChild(checkbox);
checkbox.checked = !!defaultChecked;
}
+ initializeFeatureCheckbox(checkbox, col);
}
if (defaultChecked) {
enforceFeatureExclusivityForRow(row);
@@ -563,6 +560,18 @@
updateUndeployButtonState(row);
}
+ function initializeFeatureCheckbox(checkbox, columnIndex) {
+ if (!checkbox) return;
+ checkbox.dataset.featureColumn = String(columnIndex);
+ if (checkbox.dataset.listenerAttached === "true") {
+ return;
+ }
+ checkbox.addEventListener("change", event => {
+ handleFeatureCheckboxToggle(columnIndex, event.currentTarget);
+ });
+ checkbox.dataset.listenerAttached = "true";
+ }
+
function handleFeatureCheckboxToggle(columnIndex, checkbox) {
if (!checkbox) return;
const tbody = getProductionTableBody();
@@ -788,9 +797,8 @@
<td><input type="checkbox" #(translation)#::checked=true#(/translation)#></td>
<td><input type="checkbox" #(qa-generation)#::checked=true#(/qa-generation)#></td>
<td><input type="checkbox" #(classification)#::checked=true#(/classification)#></td>
- <td><input type="checkbox" #(shortener)#::checked=true#(/shortener)#></td>
+ <td><input type="checkbox" #(tldr-shortener)#::checked=true#(/tldr-shortener)#></td>
<td><input type="checkbox" #(vision)#::checked=true#(/vision)#></td>
- <td><input type="checkbox" #(chat)#::checked=true#(/chat)#></td>
<td></td>
</tr>
#{/productionmodels}#