From d4df471899415d68ba8dcd5cd151ee7ba47f748e Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 17 Sep 2014 00:50:55 +0200 Subject: [PATCH] =?UTF-8?q?Add=20documentation=20add=5Frow=5Fkey=20Task=20?= =?UTF-8?q?#1021=20-=20Comptabilit=C3=A9=20analytique=20:=20clef=20de=20r?= =?UTF-8?q?=C3=A9partition=20:=20bouton=20ajout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/js/anc_script.js | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/html/js/anc_script.js b/html/js/anc_script.js index 723697a9e..1d65ca64b 100644 --- a/html/js/anc_script.js +++ b/html/js/anc_script.js @@ -481,31 +481,23 @@ function anc_key_choice(p_dossier, p_table, p_amount) error_message(e.message); } } -function add_row_key(p_table, p_seq) +/** + * Add a row for distribution key. + * This function add a row in the table key distribution + * @param p_table table id + */ +function add_row_key(p_table) { var mytable = g(p_table).tBodies[0]; - // var max = parseFloat(g('amount_t' + p_seq).value); if (!mytable) { return; } - var new_value = mytable.rows.length + 1; - - if (mytable.rows.length > 15) { alert("Maximum 15 lignes "); return; } - /* var amount = compute_total_table(p_table, p_seq); - if (max < amount) - { - alert('Montant incorrect : max = ' + max + " calculé=" + amount); - return; - } - */ - // For the detail view (modify_op) there is several form and then several time the - // element var rowToCopy = mytable.rows[1]; var row = mytable.insertRow(mytable.rows.length); @@ -528,8 +520,4 @@ function add_row_key(p_table, p_seq) } } $('total_key').innerHTML="?"; - /* var col = document.getElementsByName("val[" + p_seq + "][]"); - col[col.length - 1].value = max - amount; - anc_refresh_remain(p_table, p_seq); - */ } \ No newline at end of file