[open-ils-commits] r10754 - trunk/Open-ILS/web/js/dojo/openils
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Oct 3 14:56:51 EDT 2008
Author: erickson
Date: 2008-10-03 14:56:48 -0400 (Fri, 03 Oct 2008)
New Revision: 10754
Modified:
trunk/Open-ILS/web/js/dojo/openils/I18N.js
Log:
sort the locale store by the display name
Modified: trunk/Open-ILS/web/js/dojo/openils/I18N.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/I18N.js 2008-10-03 18:52:40 UTC (rev 10753)
+++ trunk/Open-ILS/web/js/dojo/openils/I18N.js 2008-10-03 18:56:48 UTC (rev 10754)
@@ -27,6 +27,13 @@
openils.I18N.BaseLocales = fieldmapper.standardRequest( [ 'open-ils.fielder', 'open-ils.fielder.i18n_l.atomic'], [ { query : { code : { '!=' : null } } } ] );
openils.I18N.localeStore = new dojo.data.ItemFileWriteStore( { data : {identifier : 'locale', label : 'label', items : [] } } );
+ openils.I18N.BaseLocales = openils.I18N.BaseLocales.sort(
+ function(a, b) {
+ if(a.name > b.name) return 1;
+ if(a.name < b.name) return -1;
+ return 0;
+ }
+ );
for (var i in openils.I18N.BaseLocales) {
openils.I18N.localeStore.newItem({ locale : openils.I18N.BaseLocales[i].code, label : openils.I18N.BaseLocales[i].name });
More information about the open-ils-commits
mailing list