This repairs a FIXME within the custom bib overlay code related to
parsing metabib.record_attr stores within the JS. Instead, now we use
an attr parsing utility function which compiles a regular hash so the
client no longer needs to parse it.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
my $rec = $editor->retrieve_biblio_record_entry($_);
$rec->creator($editor->retrieve_actor_user($rec->creator));
$rec->editor($editor->retrieve_actor_user($rec->editor));
- $rec->attrs($editor->retrieve_metabib_record_attr($rec->id));
+ $rec->attrs($U->get_bre_attrs([$rec->id], $editor)->{$rec->id});
$rec->clear_marc; # slim the record down
push( @results, $rec );
}
// Let's loop through bre.attrs.attrs and put them with any matching
// elements in bib_brief_overlay.xul
if (params.bre.attrs()) {
- // FIXME -- we should do this in the perl; what's below isn't robust
- var attrs = JSON2js(
- '{' +
- params.bre.attrs().attrs().replace(
- '=>',':','g').replace('NULL','null','g')
- + '}'
- );
+ var attrs = params.bre.attrs();
for (var attr in attrs) {
if (exists(attr)) {
- set(attr,attrs[attr]);
+ set(attr,attrs[attr].code);
set_tooltip(attr,attr);
}
}