cylo logo Bookmark and Share
CyloSort V_0.1 Allow your users to sort the contents of tabular data. You can sort things from dates, strings and numbers. You can even sort by image size if you have a column of images. You can specify a max number of rows which will result in a paginated interface.
Try it out.
WARNING:: Script is currently unfinished

Design Name Author Country Comment Download
TagBox TagBox Deutschland Table design based on the fresh TagBox style. Download
Maniac Merchants Marten Willberg Germany A Georgia headline with a green-blue body. Download
Acuity Design Style Acuity Internet Marketing Brazil Black Style, with smooth grey and green elements. Download
Aqua Matthias Richter Germany Have fun! Download
Smooth Taste Thomas Opp Germany Smooth style with my favourite colours. Enjoy! Download
Stainless Steel Stenli Bulagaria Use cellspacing="1" for better feel. Download
Sky is no heaven Michael Schmieding Germany My new Design colors. Download
Foggy Country Straussennest South Africa Foggy Country - Green Trees planted on brown sugared ground. Download
Blue gradient Mihalcea Romeo Romania Nice table design based on a very subtile blue gradient. Download
Aqua Matthias Richter Germany Have fun! Download
desert Marc Bodon Germany brown, red, grey and white... simply smooth ;-) Download
orange and grey Christoph Plessner Germany Download
serif my love Frank Schnappenberger Germany A clean and simple table design with serif font Download
REDandBLACK Martin Paffenholz Germany Style like our website. Best viewed in Mozilla Firefox. Download
UV Green Kunimichi Takahashi USA Let me know what you think. Download
UV Green Kunimichi Takahashi USA Let me know what you think. Download
UV Green Kunimichi Takahashi USA Let me know what you think. Download
BakeSale admin Matti Putkonen Finland Table model used in BakeSale shopping cart admin interface. Download

You can also have footers.
You can also sort by image. The script will work out the area of each image and sort by size

User Name Posts Avatar
-bart-
Member
43 -bart-'s Avatar
142laser
Member
46  
20x
Junior Member
8  
300EVIL
Senior Member
159 300EVIL's Avatar
450nm
Member
85 450nm's Avatar
A.R.Gon
Junior Member
2  
a0977
Junior Member
3  
aaron_inc
Junior Member
11  
AbbyNormal
Junior Member
9 AbbyNormal's Avatar
Abner
Junior Member
2  
ABSolute
Junior Member
10  
acerays
Junior Member
7  
Achilleus
Junior Member
4  
aclasers
Member
54  
acrorezo
Junior Member
4  
addictive
Member
80 addictive's Avatar
Admin
Administrator
103 Admin's Avatar
affe
Junior Member
10  
afrob
Junior Member
6  
Aidan
Senior Member
175 Aidan's Avatar
aijii
Senior Member
323 aijii's Avatar
AixiZ
Junior Member
5  
ajcleary
Member
32  
ajohnson30
Member
61  
akkucis
Junior Member
3 akkucis's Avatar
This is the footer

To use CyloSort, include the script in your page using ...

<script type="text/javascript" src='js/CyloSort.js'></script>
		<link href="css/cylo.css" rel="stylesheet" type="text/css"/>	
		

You need to set some attributes directly to your tables to make this work!

1. For each table you want sortable add CyloSort to the class attribute. e.g
class=' CyloSort excel'

To tell the script how many results per page to use simply use the following syntax
class=' CyloSort[6] excel'
In this case the scriptt will allow 6 rows per page. 2. Add a sort type class definition to each sortable header in the table like this...
<tr>
	<th scope="col"class=' CyloSortHREF '>Design Name</th>
	<th scope="col"class=' CyloSortHREF '>Author</th>
	<th scope="col"class=' CyloSortString '>Country</th>
	<th scope="col"class=' CyloSortString '>Comment</th>
	<th scope="col"class=' CyloSortHREF '>Download</th>
</tr>

In the above code, 3 of the headers are sorted using the HREF type. This is because the contents of these columns will be links, but I want to sort on the clickable text of the link. The other 2 are common strings.
Other posibilities are
CyloSortNumber
Sort by number. Non-numbers are turned into minus infinity
CyloSortDateUK
Sort by UK date. The date format is worked out dynamically. See code for supported formats and add your own
CyloSortDateUS
Same as above but for US dates
CyloSortImageSize
Sort by image area
CyloSortImageSRC
Sort by the URL of the image in alphabetical order

3. To automatically sort on a particular column, add CyloSortTrue to the class attribute of the desired column.

4. In the body tag onload event, add
CyloSort.Go();
which will loop through the tables on the page and check for the CyloSort class in the classname.

FEATURES!

1. You can mix it with CyloTables to make the column draggable.


THINGS TO BE AWARE OF!

1. If rows are not of the same height an pagination is used, the overall table height jumps around a bit.

2. Care should be taken when using dates. Look at the code to see which formats are supported.

COMMENT ON THIS PLUG-IN

If you'd like to leave some feed back or would like to request a feature, please drop me a line on this Google group ...

http://groups.google.com/group/cylo-web-tools?hl=en

VIEW SOURCE TO GET THE FILES