From: phasefx Date: Thu, 12 Jul 2007 14:40:20 +0000 (+0000) Subject: alphabetical sort for bucket names in drop-down menu X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b4a24348e7c2488773cd06938944ae6577e80910;p=Evergreen.git alphabetical sort for bucket names in drop-down menu git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@7539 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/cat/copy_buckets.js b/Open-ILS/xul/staff_client/server/cat/copy_buckets.js index fb45b1ba2d..945d7ebfa3 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_buckets.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_buckets.js @@ -147,6 +147,12 @@ cat.copy_buckets.prototype = { obj.bucket_id_name_map[ o.id() ] = o.name(); return [ o.name(), o.id() ]; } + ).sort( + function( a, b ) { + if (a[0] < b[0]) return -1; + if (a[0] > b[0]) return 1; + return 0; + } ) ); obj.error.sdump('D_TRACE','items = ' + js2JSON(items)); diff --git a/Open-ILS/xul/staff_client/server/cat/record_buckets.js b/Open-ILS/xul/staff_client/server/cat/record_buckets.js index a0f9b14c0c..c11fe24305 100644 --- a/Open-ILS/xul/staff_client/server/cat/record_buckets.js +++ b/Open-ILS/xul/staff_client/server/cat/record_buckets.js @@ -158,6 +158,12 @@ cat.record_buckets.prototype = { obj.bucket_id_name_map[ o.id() ] = o.name(); return [ o.name(), o.id() ]; } + ).sort( + function( a, b ) { + if (a[0] < b[0]) return -1; + if (a[0] > b[0]) return 1; + return 0; + } ) ); obj.error.sdump('D_TRACE','items = ' + js2JSON(items));