From 1e09f54a975d67dab93b452336db1c3d02e459cd Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 17 Feb 2010 06:17:31 -0500 Subject: [PATCH] bug 3973: make auto-fill button work on budget planning form Also fixed a variety of XHTML validation errors. Programming note: it is invalid XHTML and can break Javascript to use element IDs and class names that start with digits. Signed-off-by: Galen Charlton --- koha-tmpl/intranet-tmpl/prog/en/js/acq.js | 6 +++--- .../prog/en/modules/admin/aqplan.tmpl | 21 ++++++++----------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js index 0ec1460567..4b65f829e7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js @@ -559,7 +559,7 @@ function calcTotalRow(cell) { var bud_id = cell.className; var val1 = cell.value; - var remainingTotal = document.getElementById("budget_est_"+bud_id) ; + var remainingTotal = document.getElementById("budget_est_"+bud_id).textContent; var remainingNew =0; var budgetTotal = document.getElementById("budget_tot_"+bud_id ).textContent; var arr = getElementsByClass(bud_id); @@ -594,10 +594,10 @@ function calcTotalRow(cell) { function autoFillRow(bud_id) { - var remainingTotal = document.getElementById("budget_est_"+bud_id) ; + var remainingTotal = document.getElementById("budget_est_"+bud_id).textContent; var remainingNew = new Number; var budgetTotal = document.getElementById("budget_tot_"+bud_id ).textContent; - var arr = getElementsByClass(bud_id); + var arr = getElementsByClass("plan_entry_" + bud_id); budgetTotal = budgetTotal.replace(/\,/, ""); var qty = new Number; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl index 37dc0c5650..c2c6b55acf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl @@ -1,6 +1,6 @@ -Budget planning +Budget & fund planning @@ -13,11 +13,11 @@ Budget planning - - -Budget & Fund Planning - @@ -118,7 +115,7 @@ Budget & Fund Planning - + @@ -192,7 +189,7 @@ Budget & Fund Planning -   +   @@ -212,7 +209,7 @@ Budget & Fund Planning   " /> - " id='' class='' onchange="calcTotalRow(this);" /> + " id='budget_' class='plan_entry_' onchange="calcTotalRow(this);" /> @@ -235,7 +232,7 @@ Budget & Fund Planning style="color: red;" style="color: green;" - name="est_total" id='budget_est_'>   + id='budget_est_'>   @@ -250,7 +247,7 @@ Budget & Fund Planning - + @@ -281,7 +278,7 @@ Budget & Fund Planning
    -
  1. +
  2.     -- 2.39.5