fixed the lower bulk checkbox in the default theme

This commit is contained in:
SJ 2013-07-30 10:05:47 +02:00
parent 39a251df37
commit 543a4e1ac7
3 changed files with 13 additions and 5 deletions

View File

@ -325,17 +325,25 @@ var Piler =
* bulk toggle all the checkboxes for the result set
*/
toggle_bulk_check:function()
toggle_bulk_check:function(i)
{
Piler.log("[toggle_bulk_check]", Piler.Messages.length);
$('#bulkcheck').prop('checked') ? bulkcheck = 1 : bulkcheck = 0;
$('#bulkcheck' + i).prop('checked') ? bulkcheck = 1 : bulkcheck = 0;
Piler.log("[toggle_bulk_check], bulkcheck=", bulkcheck);
for(i=0; i<Piler.Messages.length; i++) {
bulkcheck == 1 ? $("#r_" + Piler.Messages[i]).prop('checked', true) : $("#r_" + Piler.Messages[i]).prop('checked', false);
}
if(bulkcheck == 1) {
$("#bulkcheck").prop('checked', true);
$("#bulkcheck2").prop('checked', true);
} else {
$("#bulkcheck").prop('checked', false);
$("#bulkcheck2").prop('checked', false);
}
},

View File

@ -4,7 +4,7 @@
<table id="results" class="table table-striped table-condensed">
<thead>
<tr>
<th id="restore-header"><input type="checkbox" id="bulkcheck" name="bulkcheck" value="1" <?php if(SEARCH_RESULT_CHECKBOX_CHECKED == 1) { ?>checked="checked"<?php } ?> class="restorebox" onclick="Piler.toggle_bulk_check();" /></th>
<th id="restore-header"><input type="checkbox" id="bulkcheck" name="bulkcheck" value="1" <?php if(SEARCH_RESULT_CHECKBOX_CHECKED == 1) { ?>checked="checked"<?php } ?> class="restorebox" onclick="Piler.toggle_bulk_check('');" /></th>
<th id="id-header">&nbsp;</th>
<th id="date-header">
<?php print $text_date; ?>
@ -67,7 +67,7 @@
<tfoot>
<tr>
<th id="restore-header"><input type="checkbox" id="bulkcheck" name="bulkcheck" value="1" <?php if(SEARCH_RESULT_CHECKBOX_CHECKED == 1) { ?>checked="checked"<?php } ?> class="restorebox" onclick="Piler.toggle_bulk_check();" /></th>
<th id="restore-header"><input type="checkbox" id="bulkcheck2" name="bulkcheck2" value="1" <?php if(SEARCH_RESULT_CHECKBOX_CHECKED == 1) { ?>checked="checked"<?php } ?> class="restorebox" onclick="Piler.toggle_bulk_check('2');" /></th>
<th id="id-header">&nbsp;</th>
<th id="date-header">
<?php print $text_date; ?>

View File

@ -8,7 +8,7 @@
<thead>
<tr>
<td><input type="checkbox" id="bulkcheck" name="bulkcheck" value="1" <?php if(SEARCH_RESULT_CHECKBOX_CHECKED == 1) { ?>checked="checked"<?php } ?> onclick="Piler.toggle_bulk_check();" /></td>
<td><input type="checkbox" id="bulkcheck" name="bulkcheck" value="1" <?php if(SEARCH_RESULT_CHECKBOX_CHECKED == 1) { ?>checked="checked"<?php } ?> onclick="Piler.toggle_bulk_check('');" /></td>
<td>
<?php if(Registry::get('auditor_user') == 1 || BULK_DOWNLOAD_FOR_USERS == 1) { ?>
<a href="#"><img class="download_icon" src="<?php print ICON_DOWNLOAD; ?>" width="18" height="18" alt="aaa" border="0" onclick="Piler.download_messages();" /></a></td>