mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
attempt to make show hide work
This commit is contained in:
parent
0a6a2c968c
commit
02b2af7d51
@ -39,6 +39,7 @@ var ShowHide = function(options) {
|
|||||||
contents.push(el);
|
contents.push(el);
|
||||||
}
|
}
|
||||||
container_content.push(contents);
|
container_content.push(contents);
|
||||||
|
console.log('container content', container_content);
|
||||||
}
|
}
|
||||||
|
|
||||||
// attach the listener on each input
|
// attach the listener on each input
|
||||||
|
@ -7,7 +7,6 @@ window.addEventListener('DOMContentLoaded', function() {
|
|||||||
thirdpartyContainer = document.querySelector('#thirdparty-entity'),
|
thirdpartyContainer = document.querySelector('#thirdparty-entity'),
|
||||||
freetextContainer = document.querySelector('#freetext-entity')
|
freetextContainer = document.querySelector('#freetext-entity')
|
||||||
;
|
;
|
||||||
|
|
||||||
if (null === linkedEntityContainer) {
|
if (null === linkedEntityContainer) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -17,17 +16,12 @@ window.addEventListener('DOMContentLoaded', function() {
|
|||||||
load_event: null,
|
load_event: null,
|
||||||
froms: [linkedEntityContainer],
|
froms: [linkedEntityContainer],
|
||||||
container: [personContainer, thirdpartyContainer, freetextContainer],
|
container: [personContainer, thirdpartyContainer, freetextContainer],
|
||||||
test: function(containers, arg2, arg3) {
|
test: function(froms, event) {
|
||||||
for (let container of containers) {
|
if (event) {
|
||||||
for (let input of container.querySelectorAll('input')) {
|
console.log(event);
|
||||||
if (!input.checked) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user