followup 4 to renewal limit override

* use style="display: none" instead of content_hidden
* fix JavaScript so that actions that check/uncheck
  items for a renew or return do not affect
  the override renewal limit checkbox

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
Galen Charlton 2008-10-22 18:11:30 -05:00
parent 7fa4fd7a55
commit 2186eae294

View file

@ -35,12 +35,12 @@ $(document).ready(function() {
return confirm('Are you sure you want to replace the current patron image? This cannot be undone.'); return confirm('Are you sure you want to replace the current patron image? This cannot be undone.');
} }
});<!-- /TMPL_IF --> });<!-- /TMPL_IF -->
$("#renew_all").click(function(){ $(".checkboxed").checkCheckboxes(":not(input[@name*=barcodes])"); $(".checkboxed").unCheckCheckboxes(":not(input[@name*=items])"); }); $("#renew_all").click(function(){ $(".checkboxed").checkCheckboxes(":input[@name*=items]"); $(".checkboxed").unCheckCheckboxes(":input[@name*=barcodes]"); });
$("#return_all").click(function(){ $(".checkboxed").checkCheckboxes(":not(input[@name*=items])"); $(".checkboxed").unCheckCheckboxes(":not(input[@name*=barcodes])"); }); $("#return_all").click(function(){ $(".checkboxed").checkCheckboxes(":input[@name*=barcodes]"); $(".checkboxed").unCheckCheckboxes(":input[@name*=items]"); });
$("#CheckAllitems").click(function(){ $(".checkboxed").checkCheckboxes(":not(input[@name*=barcodes])"); $(".checkboxed").unCheckCheckboxes(":not(input[@name*=items])"); return false; }); $("#CheckAllitems").click(function(){ $(".checkboxed").checkCheckboxes(":input[@name*=items]"); $(".checkboxed").unCheckCheckboxes(":input[@name*=barcodes]"); return false; });
$("#CheckNoitems").click(function(){ $(".checkboxed").unCheckCheckboxes(":not(input[@name*=barcodes])"); return false; }); $("#CheckNoitems").click(function(){ $(".checkboxed").unCheckCheckboxes(":input[@name*=items]"); return false; });
$("#CheckAllreturns").click(function(){ $(".checkboxed").checkCheckboxes(":not(input[@name*=items])"); $(".checkboxed").unCheckCheckboxes(":not(input[@name*=barcodes])"); return false; }); $("#CheckAllreturns").click(function(){ $(".checkboxed").checkCheckboxes(":input[@name*=barcodes]"); $(".checkboxed").unCheckCheckboxes(":input[@name*=items]"); return false; });
$("#CheckNoreturns").click(function(){ $(".checkboxed").unCheckCheckboxes(":not(input[@name*=items])"); return false; }); $("#CheckNoreturns").click(function(){ $(".checkboxed").unCheckCheckboxes(":input[@name*=barcodes]"); return false; });
<!-- TMPL_IF NAME="AllowRenewalLimitOverride" --> <!-- TMPL_IF NAME="AllowRenewalLimitOverride" -->
$( '#override_limit' ).click( function () { $( '#override_limit' ).click( function () {
@ -392,7 +392,7 @@ if (nodename =="barcodes[]"){
<!-- TMPL_ELSE --> <!-- TMPL_ELSE -->
<td> <td>
<!-- TMPL_IF name="norenew" --> <!-- TMPL_IF name="norenew" -->
<!-- TMPL_IF NAME="can_confirm" --><span class="renewals-allowed content_hidden"> <!-- TMPL_IF NAME="can_confirm" --><span class="renewals-allowed" style="display: none">
<input type="checkbox" name="all_items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" style="display: none;" /> <input type="checkbox" name="all_items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" style="display: none;" />
<!-- TMPL_IF NAME="od" --> <!-- TMPL_IF NAME="od" -->
<input type="checkbox" name="items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" /> <input type="checkbox" name="items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" />