www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 5ec339c9df57d4fe348649e6e251be4df67d17c1
parent 7ba742779e4b7cdd4f39cfd907ba69ad7c7861dd
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sun, 31 May 2009 05:57:43 +0000

Fix group collection sort


Diffstat:
Mchrome/content/zotero/xpcom/data/group.js | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/data/group.js b/chrome/content/zotero/xpcom/data/group.js @@ -186,7 +186,6 @@ Zotero.Group.prototype.getCollections = function (parent) { var sql = "SELECT collectionID FROM collections WHERE libraryID=? AND " + "parentCollectionID " + (parent ? '=' + parent : 'IS NULL'); var ids = Zotero.DB.columnQuery(sql, this.libraryID); - Zotero.debug(ids); // Return Zotero.Collection objects var objs = []; @@ -194,6 +193,13 @@ Zotero.Group.prototype.getCollections = function (parent) { var col = Zotero.Collections.get(id); objs.push(col); } + + // Do proper collation sort + var collation = Zotero.getLocaleCollation(); + objs.sort(function (a, b) { + return collation.compareString(1, a.name, b.name); + }); + return objs; }