["open-ils.cat", "open-ils.cat.authority.record.create_from_bib.readonly"],
{ "params": [source_f] }
);
- loadMarcEditor(pcrud, rec);
+ loadMarcEditor(pcrud, rec, target, sf);
}
})
);
}
}
-function loadMarcEditor(pcrud, marcxml) {
+function loadMarcEditor(pcrud, marcxml, target, sf) {
/*
To run in Firefox directly, must set signed.applets.codebase_principal_support
to true in about:config
rec.last_xact_id(xact_id);
rec.isnew(true);
pcrud.create(rec, {
- "oncomplete": function () {
+ "oncomplete": function (r, objs) {
+ var new_rec = objs[0];
+ if (!new_rec) {
+ return '';
+ }
+ var id_sf = <subfield code="0" xmlns="http://www.loc.gov/MARC21/slim">(CONS){new_rec.id()}</subfield>;
+ sf.parent().appendChild(id_sf);
+ var new_sf = marcSubfield(id_sf);
+ target.parentNode.appendChild(new_sf);
alert($('catStrings').getString('staff.cat.marcedit.create_authority_success.label'));
win.close();
}