[open-ils-commits] r17858 - trunk/Open-ILS/xul/staff_client/server/cat (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Sep 20 23:44:38 EDT 2010
Author: dbs
Date: 2010-09-20 23:44:35 -0400 (Mon, 20 Sep 2010)
New Revision: 17858
Modified:
trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
Log:
Create and edit... authority record now gets $0 control subfield auto-applied
Following on r17857, when you create an authority record in the flow using
the "Create and edit..." option, a $0 control subfield will automatically
be appended to the target field once "Save Record" is clicked on the authority
record editor pane. Non-savers of the bib record beware! Also subject to
interesting effects of the bib editor tab gets destroyed before the auth
record is created via the Save Record button.
Modified: trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js 2010-09-21 03:25:05 UTC (rev 17857)
+++ trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js 2010-09-21 03:44:35 UTC (rev 17858)
@@ -2367,7 +2367,7 @@
["open-ils.cat", "open-ils.cat.authority.record.create_from_bib.readonly"],
{ "params": [source_f] }
);
- loadMarcEditor(pcrud, rec);
+ loadMarcEditor(pcrud, rec, target, sf);
}
})
);
@@ -2568,7 +2568,7 @@
}
}
-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
@@ -2590,7 +2590,15 @@
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();
}
More information about the open-ils-commits
mailing list