# HG changeset patch # User Aurelien Campeas # Date 1319212357 -7200 # Node ID 7e240c04c69f4f75494f3c8d6fb3df9e0d312b1f # Parent 822a8150f78da54c8dd8b55105e484a3b79c7122 undo garbage shipped in 9a73d5e762b0 diff -r 822a8150f78d -r 7e240c04c69f web/data/cubicweb.js --- a/web/data/cubicweb.js Fri Oct 21 17:50:56 2011 +0200 +++ b/web/data/cubicweb.js Fri Oct 21 17:52:37 2011 +0200 @@ -85,7 +85,7 @@ sortValueExtraction: function (node) { var sortvalue = jQuery(node).attr('cubicweb:sortvalue'); - if (sortvalue === undefined) { + if (sortvalue === undefined) { return ''; } return sortvalue; diff -r 822a8150f78d -r 7e240c04c69f web/data/jquery.tablesorter.js --- a/web/data/jquery.tablesorter.js Fri Oct 21 17:50:56 2011 +0200 +++ b/web/data/jquery.tablesorter.js Fri Oct 21 17:52:37 2011 +0200 @@ -684,7 +684,7 @@ function getCachedSortType(parsers, i) { return parsers[i].type; }; /* public methods */ - this.construct = function (settings) { cw.log(settings); + this.construct = function (settings) { return this.each(function () { // if no thead or tbody quit. if (!this.tHead || !this.tBodies) return; diff -r 822a8150f78d -r 7e240c04c69f web/views/tableview.py --- a/web/views/tableview.py Fri Oct 21 17:50:56 2011 +0200 +++ b/web/views/tableview.py Fri Oct 21 17:52:37 2011 +0200 @@ -147,9 +147,9 @@ def _setup_tablesorter(self, divid): self._cw.add_css('cubicweb.tablesorter.css') self._cw.add_js('jquery.tablesorter.js') - print '$("#%s table").tablesorter(%s);' % (divid, js_dumps(self.tablesorter_settings)) - self._cw.add_onload('$("#%s table").tablesorter(%s);cw.log("done");' % - (divid, js_dumps(self.tablesorter_settings))) + self._cw.add_onload('''$(document).ready(function() { + $("#%s table").tablesorter(%s); +});''' % (divid, js_dumps(self.tablesorter_settings))) def __init__(self, req, view, **kwargs): super(TableLayout, self).__init__(req, **kwargs) @@ -177,7 +177,6 @@ self._cw.add_css(self.needs_css) if self.needs_js: self._cw.add_js(self.needs_js) - print self.enable_sorting if self.enable_sorting: self._setup_tablesorter(self.view.domid) # Notice facets form must be rendered **outside** the main div as it