Copy Location Order Editor: avoid interface failure with blank area
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 14 May 2012 18:50:43 +0000 (14:50 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Wed, 3 Oct 2012 16:02:49 +0000 (12:02 -0400)
Symptom is "ll is undefined" at line 65 of previous version of this
file.

Reported by George Duimovich and John Jones.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/web/js/ui/default/conify/global/asset/copy_location_order.js

index 5032b34..e11f34f 100644 (file)
@@ -51,10 +51,13 @@ function filterGrid(org) {
     var locs = [];
 
     // sort and append by existing order settings
-    dojo.forEach(orders, 
+    dojo.forEach(
+        orders,
         function(order) {
-            locs.push( 
-                locations.filter(function(l) {return l.id() == order.location()})[0] 
+            locs = locs.concat(
+                locations.filter(
+                    function(l) { return l.id() == order.location(); }
+                )
             );
         }
     );