Closed (fixed)
Project:
Web File Manager
Version:
5.x-2.8
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
1 Apr 2008 at 15:22 UTC
Updated:
19 Apr 2008 at 05:42 UTC
When Webfm is told to use files' meta-title in the file list and the user clicks on the "name" column title to sort by name, Webfm still sorts the list by the (undisplayed) filenames. Thus, the list in general seems to be left unsorted.
I've written the following patch for webfm.js:
Replace:
Webfm.sortByName = function(a, b) {
var x = a.n.toLowerCase();
var y = b.n.toLowerCase();
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
}by:
Webfm.sortByName = function(a, b) {
if(typeof a.ftitle != "undefined" && typeof b.ftitle != "undefined") {
var x = a.ftitle.toLowerCase();
var y = b.ftitle.toLowerCase();
} else {
var x = a.n.toLowerCase();
var y = b.n.toLowerCase();
}
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
}This works fine for me. Attached you find the corrected version.
PS: Please excuse me if I didn't follow any guidelines (in case there are) since this is my first bug report... :)
| Comment | File | Size | Author |
|---|---|---|---|
| webfm.js_.txt | 123.6 KB | seek300 |
Comments
Comment #1
robmilne commentedWell, close. Here is the code I've committed to head:
Thanks for pointing out that bug.
-rob
Comment #2
robmilne commentedComment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.