[open-ils-commits] r16566 - trunk/Open-ILS/xul/staff_client/server/main (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jun 2 18:39:23 EDT 2010
Author: phasefx
Date: 2010-06-02 18:39:16 -0400 (Wed, 02 Jun 2010)
New Revision: 16566
Modified:
trunk/Open-ILS/xul/staff_client/server/main/ws_info.xul
Log:
fix logic error that could result in partial list of available libs for workstation registration
Modified: trunk/Open-ILS/xul/staff_client/server/main/ws_info.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/main/ws_info.xul 2010-06-02 21:36:34 UTC (rev 16565)
+++ trunk/Open-ILS/xul/staff_client/server/main/ws_info.xul 2010-06-02 22:39:16 UTC (rev 16566)
@@ -97,9 +97,13 @@
g.my_libs_shortname_hash = {};
g.my_libs_ou_hash = {};
+ g.my_deduped_libs = [];
for (var i = 0; i < g.my_libs.length; i++) {
- g.my_libs_shortname_hash[ g.my_libs[i].id() ] = g.my_libs[i].shortname();
- g.my_libs_ou_hash[ g.my_libs[i].id() ] = function(o){return o;}(g.my_libs[i]);
+ if (! defined g.my_libs_shortname_hash[ g.my_libs[i].id() ]) {
+ g.my_libs_shortname_hash[ g.my_libs[i].id() ] = g.my_libs[i].shortname();
+ g.my_libs_ou_hash[ g.my_libs[i].id() ] = function(o){return o;}(g.my_libs[i]);
+ g.my_deduped_libs.push( g.my_libs[i] );
+ }
}
g.tb = document.getElementById('wsname');
@@ -133,7 +137,7 @@
g.ml = util.widgets.make_menulist(
util.functional.map_list(
- util.fm_utils.flatten_ou_branch( g.my_libs_tree ),
+ g.my_deduped_libs,
function(obj) {
if (!default_lib) {
if ( get_bool( g.aout_hash[ obj.ou_type() ].can_have_users() ) ) default_lib = obj.id();
More information about the open-ils-commits
mailing list