Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1 Miles in table sort incorrectly

closed-fixed
nobody
Interface (50)
2
2012-08-17
2008-08-15
Jani Patokallio
No

(from FCYTravis)

When I attempt to sort flight columns by miles, it performs a simple first-number, second number sort, resulting in lists like this:

1014
134
179
179
198
2170
2394
2513
266
355
3422
405

Discussion

  • Logged In: YES
    user_id=481307
    Originator: YES

    This appears to be a bug in the JavaScript sortable table library we're using (http://yoast.com/articles/sortable-table/). I had a quick poke but couldn't work it out, will study later.

     
  • I also ran into this problem. I am not currently able to test this, but it looks like the script is looking at the header row instead of the first row of data when it attempts to determine the data type of a column. Changing "var i = 0;" to "var i = 1;" near the top of the ts_resortTable() function in utilities.js (line 94 of the original version of the sortable table code at http://yoast.com/articles/sortable-table/\) might do the trick, but again I don't have the setup right now to test this.

     
  • Thank you sir, that did the trick! I'm very glad indeed to be able to close this.

     


Anonymous


Cancel   Add attachments