From a37ff50f211ca90f2142a1c3b09dd8f1227274bd Mon Sep 17 00:00:00 2001
From: Maxime Pelletier <maxime.pelletier@libeo.com>
Date: Tue, 21 Aug 2012 18:02:31 -0400
Subject: [PATCH] Bug 8659 Remove and readd the inactive funds in javascript to make it work in all browsers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../prog/en/modules/acqui/neworderempty.tt | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt
index 4cd6b49..90ef286 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt
@@ -130,13 +130,16 @@ $(document).ready(function()
});
[% END %]
+ //keep a copy of all budgets before removing the inactives
+ disabledBudgetsCopy = $('#budget_id').html();
+ $('#budget_id .b_inactive').remove();
+
$('#showallbudgets').click(function() {
- if ( $('#budget_id .b_inactive').is(":visible") )
- {
- $('#budget_id .b_inactive').hide();
+ if ($(this).attr('checked') === true) {
+ $('#budget_id').html(disabledBudgetsCopy); //Puts back all the funds
}
else {
- $('#budget_id .b_inactive').show();
+ $('#budget_id .b_inactive').remove();
}
});
});
@@ -402,7 +405,7 @@ $(document).ready(function()
<option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option>
[% ELSE %]
[% IF ( budget_loo.b_active ) %]<option value="[% budget_loo.b_id %]">[% budget_loo.b_txt %]</option>
- [% ELSE %]<option value="[% budget_loo.b_id %]" class="b_inactive" style="display : none;">[% budget_loo.b_txt %]</option>
+ [% ELSE %]<option value="[% budget_loo.b_id %]" class="b_inactive">[% budget_loo.b_txt %]</option>
[% END %]
[% END %]
[% END %]
--
1.7.2.5