Index: openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/get-foldercontents.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/get-foldercontents.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/get-foldercontents.tcl 2 Jan 2008 07:12:12 -0000 1.4 +++ openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/get-foldercontents.tcl 14 Jan 2008 02:15:40 -0000 1.5 @@ -9,9 +9,9 @@ } { folder_id:optional tag_id:integer,optional - {sort "fs_objects.title"} + {sort "icon"} {package_id:optional} - {dir "DESC"} + {dir "ASC"} } # who's looking @@ -43,6 +43,13 @@ # sorting ********** set orderby "" if { [exists_and_not_null sort] } { + if {$sort == "icon"} { + if { $dir == "DESC" } { + set sort "sort_key_desc, lower(fs_objects.name)" + } else { + set sort "fs_objects.sort_key, lower(fs_objects.name)" + } + } if {$sort == "title"} { set sort "lower(fs_objects.title)" } if {$sort == "size"} { set sort "fs_objects.content_size" } if {$sort == "lastmodified"} { set sort "fs_objects.last_modified" } Index: openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/load-treenodes-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/load-treenodes-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/load-treenodes-postgresql.xql 27 Dec 2007 01:23:28 -0000 1.3 +++ openacs-4/packages/ajax-filestorage-ui/www/xmlhttp/load-treenodes-postgresql.xql 14 Jan 2008 02:15:40 -0000 1.4 @@ -29,7 +29,7 @@ from acs_object_party_privilege_map m where m.object_id = fs_objects.object_id and m.party_id = :viewing_user_id - and m.privilege = 'read') order by fs_objects.title + and m.privilege = 'read') order by lower(fs_objects.name)