Fix minor glitch when trying to create new authority fields
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Wed, 22 Jun 2011 21:22:54 +0000 (17:22 -0400)
committerMike Rylander <mrylander@gmail.com>
Mon, 11 Jul 2011 17:48:30 +0000 (13:48 -0400)
The Autogrid can handle empty arrays as values for acsaf.bib_fields and
acsaf.axis_maps, but can't handle undefined.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/web/templates/default/conify/global/cat/authority/control_set_authority_field.tt2

index 2f60bcc..ed260df 100644 (file)
                 {"create": control_set.id()};
         }
 
-        acsaf_grid.onPostCreate = function(o) { acsaf_cache[o.id()] = o; };
+        acsaf_grid.onPostCreate = function(o) {
+            o.bib_fields([]);
+            o.axis_maps([]);
+            acsaf_cache[o.id()] = o;
+        };
+
         acsaf_grid.dataLoader = acsaf_grid_loader;
         acsaf_grid_loader();
     }