From 4e44667cd6737299a0fa524b4d84258dacd2c1c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9rick=20Capovilla?= Date: Sun, 14 Aug 2011 21:42:52 +0200 Subject: [PATCH] Bug 6690: If multiple issues are received in serials-edit.pl, changing the status of any issue changes the date of the first issue. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If multiple issues are in the list, changing the status of any issue in the table would always change the "Expected on" date of the first issue. Modified the javascript so the date is modified on the correct row. Reimplementation of Patch for 3.4.x Patch for 3.2.x from Frédérick Capovilla Signed-off-by: Nicole C. Engard Signed-off-by: Ian Walls Signed-off-by: Chris Cormack --- .../prog/en/modules/serials/serials-edit.tt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt index 304c6ca8a4..f82f791d65 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt @@ -61,9 +61,8 @@ function HideItems(index,labelindex) { function setStatus(serialid){ $("#status"+serialid).val("2").attr("selected","selected"); } -function changeDate(adate) { - var elem = document.getElementById("expecteddate"); - elem.value = adate; +function changeDate(elem, adate) { + $(elem).closest('tr').find('#expecteddate').val(adate); } function changeDate2(adate) { var elem = document.getElementById("supexpecteddate"); @@ -228,9 +227,9 @@ $(document).ready(function() { + +