for sort: treat AN as an article, and kill leading spaces
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 4 Sep 2006 18:25:44 +0000 (18:25 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 4 Sep 2006 18:25:44 +0000 (18:25 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5927 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/util/list.js

index a2fa069..7efed0f 100644 (file)
@@ -876,8 +876,8 @@ util.list.prototype = {
                                                                                b = util.money.dollars_float_to_cents_integer(b);
                                                                        break;
                                                                        case 'title' : /* special case for "a" and "the".  doesn't use marc 245 indicator */
-                                                                               a = String( a ).toUpperCase().replace( /^(THE|A)\s+/, '' );
-                                                                               b = String( b ).toUpperCase().replace( /^(THE|A)\s+/, '' );
+                                                                               a = String( a ).toUpperCase().replace( /^\s*(THE|A|AN)\s+/, '' );
+                                                                               b = String( b ).toUpperCase().replace( /^\s*(THE|A|AN)\s+/, '' );
                                                                        break;
                                                                        default:
                                                                                a = String( a ).toUpperCase();