correctly handling enable checkbox to enable the saveall button. see #65
This commit is contained in:
parent
c8d00a45b2
commit
deb4edef43
1 changed files with 10 additions and 9 deletions
|
|
@ -58,15 +58,6 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||
}
|
||||
btnNew.addEventListener('click', handleNewClick);
|
||||
|
||||
// Enable save button on input change
|
||||
function handleInputChange(e) {
|
||||
e.preventDefault();
|
||||
setSomethingChanged();
|
||||
}
|
||||
document.querySelectorAll('.input_mod').forEach(element => {
|
||||
element.addEventListener('change', handleInputChange);
|
||||
});
|
||||
|
||||
// Display selected value next to select input
|
||||
// function handleSelectChange(e) {
|
||||
// e.preventDefault();
|
||||
|
|
@ -352,6 +343,12 @@ function handleCheckboxChange(e) {
|
|||
//console.log('>>>>>>>> checked_val: ' + e.target.getAttribute('checked_val'));
|
||||
}
|
||||
|
||||
// Enable save button on input change
|
||||
function handleInputChange(e) {
|
||||
e.preventDefault();
|
||||
setSomethingChanged();
|
||||
}
|
||||
|
||||
//========= handling an item in a row - END
|
||||
|
||||
|
||||
|
|
@ -461,6 +458,10 @@ function loadPromptsList(values){
|
|||
checkbox_elements.forEach(element => {
|
||||
element.addEventListener('change', handleCheckboxChange);
|
||||
});
|
||||
|
||||
document.querySelectorAll('.input_mod').forEach(element => {
|
||||
element.addEventListener('change', handleInputChange);
|
||||
});
|
||||
}
|
||||
|
||||
function checkFields() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue