qyqx / j-table

Automatically exported from code.google.com/p/j-table
0 stars 0 forks source link

Use classes rather than attributes for sort, filter, hide #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What's the best approach semantically?

E.g. class="filter:/regexp/ sort:up" (not sure how to get order of sorts
straight)

Original issue reported on code.google.com by chris.f....@gmail.com on 4 Jul 2008 at 9:35

GoogleCodeExporter commented 8 years ago
if we take this approach, then css like "th.sort" will not work. how to resolve?

Original comment by chris.f....@gmail.com on 5 Jul 2008 at 11:12

GoogleCodeExporter commented 8 years ago
filters:
* continue to use separate attribute filter="/regexp/"
sort:
* continue to use separate attribute sort="up|down"
* also use attribute on table header, sortorder="1,2,3" with comma-separated 
cellIndices
hide:
* use class, th class="hide"

Original comment by chris.f....@gmail.com on 5 Jul 2008 at 12:00

GoogleCodeExporter commented 8 years ago
right, I've made some changes.
filters:
* continue to use separate attribute filter="/regexp/"
sort:
* continue to use separate attribute sort="up|down"
* also use attribute on table header, sortorder="1,2,3" with comma-separated 
cellIndices
hide:
* continue to use separate attribute hide=""

Original comment by chris.f....@gmail.com on 5 Jul 2008 at 4:02

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
hide now uses col visibility / display, rather than attribute on th

Original comment by chris.f....@gmail.com on 13 Jul 2008 at 6:05

GoogleCodeExporter commented 8 years ago
Changed my mind again.
We should follow the HTML5 spec and use separate attributes for sort and filer, 
but
call them data-sort and data-filter.

Original comment by chris.f....@gmail.com on 13 Jul 2008 at 6:07

GoogleCodeExporter commented 8 years ago

Original comment by chris.f....@gmail.com on 13 Jul 2008 at 6:16