forked from tohe/wmdeit_kaform
fixes currency when more than one poistion is added
This commit is contained in:
parent
de84516819
commit
dc88aac29c
19
kaform.js
19
kaform.js
|
@ -8,6 +8,7 @@ function renumberTableRows(){
|
||||||
for (var i = 0, row; row = table.rows[i]; i++) {
|
for (var i = 0, row; row = table.rows[i]; i++) {
|
||||||
// row.cells[0].innerHTML=row_no++;
|
// row.cells[0].innerHTML=row_no++;
|
||||||
}
|
}
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,10 +24,20 @@ function isFloat(val) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function disableCurrency()
|
||||||
|
{
|
||||||
|
if (countRows()>0){
|
||||||
|
document.getElementById("a_currency").disabled=true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
document.getElementById("a_currency").disabled=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function deleteTableRow(rowId){
|
function deleteTableRow(rowId){
|
||||||
|
|
||||||
|
|
||||||
var target = document.getElementById("upload-target"+rowId);
|
var target = document.getElementById("upload-target"+rowId);
|
||||||
// this.message = app.message;
|
// this.message = app.message;
|
||||||
// var children = target.children;
|
// var children = target.children;
|
||||||
|
@ -50,9 +61,12 @@ function deleteTableRow(rowId){
|
||||||
var element = document.getElementById("trow"+rowId);
|
var element = document.getElementById("trow"+rowId);
|
||||||
|
|
||||||
element.parentNode.removeChild(element);
|
element.parentNode.removeChild(element);
|
||||||
|
disableCurrency();
|
||||||
renumberTableRows();
|
renumberTableRows();
|
||||||
// alert(rowId);
|
// alert(rowId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -200,6 +214,8 @@ function addTableRow(){
|
||||||
// renumberTableRows();
|
// renumberTableRows();
|
||||||
currentRowId++;
|
currentRowId++;
|
||||||
reset2();
|
reset2();
|
||||||
|
disableCurrency();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -357,3 +373,6 @@ function checkIban()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue