From 6493d61a61cbcd12116fb810d8851dac087cb52c Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 11 Jun 2010 14:07:15 +0000 Subject: [PATCH] when configuring sort order for copy locations, allow local sorting on locations defined at parent orgs (in the UI, finally) git-svn-id: svn://svn.open-ils.org/ILS/trunk@16678 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../web/js/ui/default/conify/global/asset/copy_location_order.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/conify/global/asset/copy_location_order.js b/Open-ILS/web/js/ui/default/conify/global/asset/copy_location_order.js index f444df7a0b..5f3c783354 100644 --- a/Open-ILS/web/js/ui/default/conify/global/asset/copy_location_order.js +++ b/Open-ILS/web/js/ui/default/conify/global/asset/copy_location_order.js @@ -36,7 +36,10 @@ function filterGrid(org) { // 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 @@ function filterGrid(org) { // 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()+')', -- 2.11.0