alphabetical sort for bucket names in drop-down menu
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 12 Jul 2007 14:40:20 +0000 (14:40 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 12 Jul 2007 14:40:20 +0000 (14:40 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@7539 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/copy_buckets.js
Open-ILS/xul/staff_client/server/cat/record_buckets.js

index fb45b1b..945d7eb 100644 (file)
@@ -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));
index a0f9b14..c11fe24 100644 (file)
@@ -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));