Can also now use the Headers to sort results in User Enquiries view. Resolves another part of issue #31

This commit is contained in:
Karl Cordes 2011-07-15 13:12:06 +10:00
parent b4c0f38ae8
commit b382094091
2 changed files with 11 additions and 7 deletions

View file

@ -18,14 +18,15 @@ echo $paginator->counter(array(
</div>
<table cellpadding="0" cellspacing="0" class="mer">
<thead>
<tr>
<th><?php echo $paginator->sort('user_id'); ?></th>
<th><?php echo $paginator->sort('Date', 'created'); ?></th>
<th class="paginatorSort"><?php echo $paginator->sort('user_id'); ?></th>
<th class="paginatorSort"><?php echo $paginator->sort('Date', 'created'); ?></th>
<?php /* <th> echo $paginator->sort('Date Submitted', 'submitted'); </th> */ ?>
<th><?php echo $paginator->sort('principle_id'); ?></th>
<th><?php echo $paginator->sort('Enquiry Number', 'title'); ?></th>
<th><?php echo $paginator->sort('customer_id'); ?></th>
<th><?php echo $paginator->sort('contact_id'); ?></th>
<th class="paginatorSort"><?php echo $paginator->sort('principle_id'); ?></th>
<th class="paginatorSort"><?php echo $paginator->sort('Enquiry Number', 'title'); ?></th>
<th class="paginatorSort"><?php echo $paginator->sort('customer_id'); ?></th>
<th class="paginatorSort"><?php echo $paginator->sort('contact_id'); ?></th>
<th><?php __('Email'); ?></th>
<th><?php __('Phone No'); ?></th>
@ -34,6 +35,8 @@ echo $paginator->counter(array(
<th>Comments</th>
<th class="actions"><?php __('Actions'); ?></th>
</tr>
</thead>
<tbody>
<?php
$i = 0;
foreach ($enquiries as $enquiry):
@ -171,6 +174,7 @@ echo $paginator->counter(array(
</tr>
<?php $i++; ?>
<?php endforeach; ?>
</tbody>
</table>
<div class="paging">

View file

@ -15,7 +15,7 @@ $(function() {
getPage(enquiriesURL);
$("div.paging > a, div.paging > span > a").live('click',function() {
$("div.paging > a, div.paging > span > a, th.paginatorSort > a").live('click',function() {
destination = $(this).attr('href');
getPage(destination);
return false;