From bbd3db8c84af321485d93352ee6ccb83a96b61be Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Sun, 4 May 2014 21:55:02 +0000 Subject: [PATCH] Bug 10875: (follow-up) make displaying/hiding inactive funds work cross-browser This uses the idea introduced by the patch for bug 8659 by Maxime Pelletier. Signed-off-by: Galen Charlton --- .../prog/en/modules/acqui/addorderiso2709.tt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt index 5bf71e9e7a..6f51956d0c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -26,24 +26,26 @@ "aaSorting": [] } ) ); - $("select[name='all_budget_id'] .b_inactive").hide(); - $("select[name='budget_id'] .b_inactive").hide(); + // keep copy of the inactive budgets + disabledBudgetsCopy = $("select[name='all_budget_id']").html(); + $("select[name='all_budget_id'] .b_inactive").remove(); + $("select[name='budget_id'] .b_inactive").remove(); $("#showallbudgets").click(function() { if ($(this).is(":checked")) { - $("select[name='budget_id'] .b_inactive").show(); + $("select[name='budget_id']").html(disabledBudgetsCopy) } else { - $("select[name='budget_id'] .b_inactive").hide(); + $("select[name='budget_id'] .b_inactive").remove(); } }); $("#all_showallbudgets").click(function() { if ($(this).is(":checked")) { - $("select[name='all_budget_id'] .b_inactive").show(); + $("select[name='all_budget_id']").html(disabledBudgetsCopy); } else { - $("select[name='all_budget_id'] .b_inactive").hide(); + $("select[name='all_budget_id'] .b_inactive").remove(); } }); -- 2.39.2