Added universal support for select all checkboxes and added one to the events page

pull/177/head
Kevin Crider 2013-09-27 18:32:00 -04:00
parent 516733a50e
commit ef66285fa5
2 changed files with 8 additions and 1 deletions

View File

@ -68,7 +68,7 @@ echo $this->Form->inputs(array(
<table class="table table-condensed table-striped" id="Events">
<?php
echo $this->Html->tableHeaders(array('', 'Thumbnail', 'Id', 'Name', 'Monitor', 'Cause', 'Time', 'Duration', 'Alarm Frames', 'Total Score', 'Avg. Score', 'Max Score'));
echo $this->Html->tableHeaders(array($this->Form->checkbox('', array('hiddenField' => false, 'class' => 'selectAll')), 'Thumbnail', 'Id', 'Name', 'Monitor', 'Cause', 'Time', 'Duration', 'Alarm Frames', 'Total Score', 'Avg. Score', 'Max Score'));
foreach ($events as $key => $value) {
echo $this->Html->tableCells(array(

View File

@ -169,6 +169,13 @@ $(document).ready(function() {
console.log(data);
});
});
// Select All Events //
$('input[type=checkbox].selectAll').click(function(e) {
$(this).closest('table').find(':checkbox').prop('checked', this.checked);
});
// Select All Events //
// Events //
// Config //