[open-ils-commits] r20158 - trunk/Open-ILS/xul/staff_client/server/cat (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Apr 18 11:37:15 EDT 2011


Author: phasefx
Date: 2011-04-18 11:37:12 -0400 (Mon, 18 Apr 2011)
New Revision: 20158

Modified:
   trunk/Open-ILS/xul/staff_client/server/cat/util.js
Log:
fixes Edit Volumes action by flattening the volume objects before updating them


Modified: trunk/Open-ILS/xul/staff_client/server/cat/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/util.js	2011-04-18 05:46:52 UTC (rev 20157)
+++ trunk/Open-ILS/xul/staff_client/server/cat/util.js	2011-04-18 15:37:12 UTC (rev 20158)
@@ -693,6 +693,13 @@
 
         if (volumes.length < 1) { return false; }
 
+        volumes = util.functional.map_list( volumes, function(o){
+            if (typeof o.suffix() == 'object') { o.suffix( o.suffix().id() ); }
+            if (typeof o.prefix() == 'object') { o.prefix( o.prefix().id() ); }
+            if (typeof o.label_class() == 'object') { o.label_class( o.label_class().id() ); }
+            return o;
+        });
+
         var r = net.simple_request(
             'FM_ACN_TREE_UPDATE',
             [ ses(), volumes, false, { 'auto_merge_vols' : my_xulG.auto_merge } ],



More information about the open-ils-commits mailing list