Hi

I implemented that today, it was quick 'n easy, so I thought I share it. 
Probably many app can be enhanced with that.

An unobtrusive way to DHTML sort the list of records outputted by the 
index() method.
 Based on script by Stuart Langridge and Neil Crosby.

1. download standardista and unpack it in the webroot/js folder. 
http://www.workingwith.me.uk/downloads/standardista-table-sorting.zip

2.In your index.thtml add :
<?php echo $javascript->link("standardista-table-sorting/common"); ?>
<?php echo $javascript->link("standardista-table-sorting/css"); ?>
<?php echo 
$javascript->link("standardista-table-sorting/standardista-table-sorting"); 
?>

3. Make sure your tablehas a class="sortable"  and has a thead and a tbody:

example:
<table cellpadding="4" cellspacing="4" class="sortable">
    <thead>
        <tr>
            <th>ID</th>
            <th>Title</th>
            <th>Modified</th>
            <th>Created</th>
            <th>&nbsp;</th>
            <th>&nbsp;</th>
        </tr>
    </thead>
        <tbody>
        ....... etc ....

Et voilĂ  that's it !!!

Hope somebody enjoy it.

Olivvv


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to