Filtrer les libellés des écritures
This commit is contained in:
parent
262b25889b
commit
900b0f5a47
9 changed files with 171 additions and 11 deletions
17
scripts.js
17
scripts.js
|
|
@ -149,7 +149,7 @@ function initLine(row) {
|
|||
var min = removeBtn.getAttribute('min');
|
||||
|
||||
if (count <= min) {
|
||||
alert("Il n'est pas possible d'avoir moins de " + min + " compte(s).");
|
||||
alert("Il n'est pas possible d'avoir moins de " + min + " ligne(s).");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -235,3 +235,18 @@ function computeTotal(id_total, id_url) {
|
|||
let new_href = url.href.replace(/trans=.*/, 'trans=' + Object.values(transactions));
|
||||
url.href = new_href;
|
||||
}
|
||||
|
||||
// dupliquer la dernière ligne d'une table
|
||||
function copyLine(button) {
|
||||
button.onclick = () => {
|
||||
let lines = button.closest("table").querySelectorAll('tbody tr');
|
||||
let line = lines[lines.length - 1];
|
||||
let newNode = line.cloneNode(true);
|
||||
let libelle = newNode.querySelector('input');
|
||||
libelle.value = '';
|
||||
|
||||
// ajouter la nouvelle ligne
|
||||
line.parentNode.appendChild(newNode);
|
||||
initLine(newNode);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue