[table] Only apply sorting event on the first row of a table header (closes #1988780)
We use the new selectorHeaders from table-sorter 2.0.5
--- a/web/views/tableview.py Fri Oct 07 18:30:29 2011 +0200
+++ b/web/views/tableview.py Tue Oct 11 18:16:52 2011 +0200
@@ -100,7 +100,8 @@
req = self._cw
req.add_js('jquery.tablesorter.js')
req.add_onload('jQuery("table.listing").tablesorter({'
- 'textExtraction: cubicwebSortValueExtraction' # use our own function
+ 'textExtraction: cubicwebSortValueExtraction,' # use our own function
+ 'selectorHeaders: "thead tr:first th"' # only plug on the first row
'});')
req.add_css(('cubicweb.tablesorter.css', 'cubicweb.tableview.css'))
# compute label first since the filter form may remove some necessary