Added universal support for select all checkboxes and added one to the events page
parent
516733a50e
commit
ef66285fa5
|
@ -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(
|
||||
|
|
|
@ -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 //
|
||||
|
|
Loading…
Reference in New Issue