mozilla/socorro — pull request #1980 by peterbe (2014-04-05 00:27:41+00:00)
Title: fixes bug 981854 - make reports tab paginate and sort with AJAX

@AdrianGaudebert r?
cc @ossreleasefeed

So, what this does is that it hijacks pagination and sort-header links on the reports.html template that gets loaded with AJAX. Those links in there "assume" that you would want to reload the whole.

For example, you're on `/report/list?signature=Foo#tab-reports`
and the pagination link goes to `/report/list?signature=Foo&page=2#tab-reports`
So far, nothing has changed.

What my javascript does is that is, on the fly, it rewrites these URLs to use the "partial URL" and then it hijacks the `onclick` and use that to instead reload the partial tab with this URL. It's confusing perhaps but it works fine.

As a kinda nasty hack, I used the tablesorter CSS (and relevant class names) but ditched all things to do with the tablesorter javascript.