[open-ils-commits] r16678 - trunk/Open-ILS/web/js/ui/default/conify/global/asset (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Jun 11 10:07:17 EDT 2010


Author: erickson
Date: 2010-06-11 10:07:15 -0400 (Fri, 11 Jun 2010)
New Revision: 16678

Modified:
   trunk/Open-ILS/web/js/ui/default/conify/global/asset/copy_location_order.js
Log:
when configuring sort order for copy locations, allow local sorting on locations defined at parent orgs (in the UI, finally)

Modified: trunk/Open-ILS/web/js/ui/default/conify/global/asset/copy_location_order.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/conify/global/asset/copy_location_order.js	2010-06-11 13:52:20 UTC (rev 16677)
+++ trunk/Open-ILS/web/js/ui/default/conify/global/asset/copy_location_order.js	2010-06-11 14:07:15 UTC (rev 16678)
@@ -36,7 +36,10 @@
     // fetch the locations and order entries
     var pcrud = new openils.PermaCrud({authtoken : user.authtoken});
     orders = pcrud.search('acplo', {org : org}, {order_by : {acplo : 'position'}});
-    locations = pcrud.search('acpl', {owning_lib : org}, {order_by : {acpl : 'name'}}); // TODO
+    locations = pcrud.search('acpl', 
+        {owning_lib : fieldmapper.aou.orgNodeTrail(fieldmapper.aou.findOrgUnit(org), true)}, 
+        {order_by : {acpl : 'name'}}
+    ); 
 
     // init the DnD environment
     source.selectAll();
@@ -65,6 +68,7 @@
     // shove them into the DnD environment
     dojo.forEach(locs,
         function(loc) {
+            if(!loc) return;
             var node = source.insertNodes(false, [ 
                 { 
                     data : loc.name() + ' (' + fieldmapper.aou.findOrgUnit(loc.owning_lib()).shortname()+')',



More information about the open-ils-commits mailing list