diff --git a/web/app/View/Events/index.ctp b/web/app/View/Events/index.ctp
index dda45e626..09dcdab16 100644
--- a/web/app/View/Events/index.ctp
+++ b/web/app/View/Events/index.ctp
@@ -50,7 +50,6 @@ unset($monitor);
Form->end(array('label' => 'Search', 'class' => 'btn btn-default')); ?>
-Form->end(array('label' => 'Search', 'id' => 'EventsButtonSearch', 'class' => 'btn btn-default'));*/ ?>
Html->link('Delete Selected','#',array('class' => 'btn btn-default', 'onClick' => '$("#EventsDeleteSelectedForm").submit();')); ?>
@@ -58,6 +57,7 @@ unset($monitor);
end(); ?>
+
@@ -67,9 +67,13 @@ unset($monitor);
?>
+
Html->tableHeaders(array($this->Form->checkbox('', array('hiddenField' => false, 'class' => 'selectAll')), 'Thumbnail', 'Id', 'Name', 'Monitor', 'Cause', 'Date/Time', 'Duration', 'Alarm Frames', 'Total Score', 'Avg. Score', 'Max Score'));
-
+?>
+
+
+
foreach ($events as $key => $value) {
echo $this->Html->tableCells(array(
$this->Form->checkbox('delete.', array(
@@ -86,7 +90,6 @@ foreach ($events as $key => $value) {
$value['Event']['Name'],
$value['Monitor']['Name'],
$value['Event']['Cause'],
- //$value['Event']['StartTime'],
$this->Time->format('n/j/y @ g:i:s A', $value['Event']['StartTime'], null, 'EST'),
$value[0]['Duration'],
$value['Event']['AlarmFrames'],
@@ -96,6 +99,7 @@ foreach ($events as $key => $value) {
));
}
?>
+
@@ -105,23 +109,4 @@ foreach ($events as $key => $value) {
-
-
-/*
-$data = $this->Js->get('#EventsIndexForm')->serializeForm(array('isForm' => true, 'inline' => true));
-$this->Js->get('#EventsIndexForm')->event(
- 'submit',
- $this->Js->request(
- array('action' => 'index'),
- array(
- 'update' => '#Events',
- 'data' => $data,
- 'async' => true,
- 'dataExpression' => true,
- 'method' => 'POST'
- )
- )
-);
-echo $this->Js->writeBuffer();
-*/
-?>
\ No newline at end of file
+
\ No newline at end of file
diff --git a/web/app/View/Layouts/default.ctp b/web/app/View/Layouts/default.ctp
index 99dc5812a..5fe5d95d1 100644
--- a/web/app/View/Layouts/default.ctp
+++ b/web/app/View/Layouts/default.ctp
@@ -79,7 +79,7 @@ $cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework
-
+
Session->flash(); ?>
fetch('content'); ?>
diff --git a/web/app/webroot/js/main.js b/web/app/webroot/js/main.js
index f061a9d77..53d243b79 100755
--- a/web/app/webroot/js/main.js
+++ b/web/app/webroot/js/main.js
@@ -90,16 +90,7 @@ $(document).ready(function() {
$("#EventsButtonSearch").button();
$('#EventsIndexForm').submit(function() {
- //$('#EventsDeleteSelectedForm').load('/events/index #Events', $('#EventsIndexForm').serialize());
- var data = $('#EventsIndexForm').serialize();
- $.ajax({
- url: '/events/index',
- data: data
- }).done(function(data) {
- var content = $(data).find('#Events');
- console.log(content);
- $('#EventsDeleteSelectedForm').html(content);
- });
+ $('#main-content-body').load('/events/index #EventsContent', $('#EventsIndexForm').serialize());
});
$( "#EventStartDate" ).datepicker({
@@ -176,7 +167,7 @@ $(document).ready(function() {
});
// Select All Events //
- $('input[type=checkbox].selectAll').click(function(e) {
+ $('body').on('click', 'input[type=checkbox].selectAll', function() {
$(this).closest('table').find(':checkbox').prop('checked', this.checked);
});
// Select All Events //