From d38482b19a6ffb90730e26c4ce866a66b0fe2e96 Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 26 Apr 2006 16:57:45 +0000 Subject: [PATCH] saving/importing marc records with marc xml git-svn-id: svn://svn.open-ils.org/ILS/trunk@3894 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/chrome/content/cat/opac.xul | 5 ++++- Open-ILS/xul/staff_client/chrome/content/main/constants.js | 3 +++ Open-ILS/xul/staff_client/server/cat/z3950.js | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul index 7d0eeff204..b96241c02b 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul @@ -98,7 +98,10 @@ 'save' : { 'label' : 'Save Record', 'func' : function (new_marcxml) { - alert('We got MARC! Put network call to save here.'); + var r = g.network.simple_request('MARC_XML_RECORD_UPDATE', [ ses(), docid, new_marcxml ]); + if (typeof r.ilsevent != 'undefined') { + g.error.standard_unexpected_error_alert('Record not likely updated.',r); + } } } } diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js index 8f51cf9244..13dced61a1 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -93,6 +93,9 @@ var api = { 'MODS_SLIM_RECORD_RETRIEVE_VIA_COPY' : { 'app' : 'open-ils.search', 'method' : 'open-ils.search.biblio.mods_from_copy' }, 'PERM_CHECK' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.perm.check' }, 'PERM_MULTI_ORG_CHECK' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.perm.check.multi_org' }, + 'MARC_XML_RECORD_CREATE' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.biblio.record.xml.create' }, + 'MARC_XML_RECORD_IMPORT' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.biblio.record.xml.import' }, + 'MARC_XML_RECORD_UPDATE' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.bilbio.record.xml.update' }, } var urls = { diff --git a/Open-ILS/xul/staff_client/server/cat/z3950.js b/Open-ILS/xul/staff_client/server/cat/z3950.js index fff1a7c19e..3e22da5dea 100644 --- a/Open-ILS/xul/staff_client/server/cat/z3950.js +++ b/Open-ILS/xul/staff_client/server/cat/z3950.js @@ -374,7 +374,10 @@ cat.z3950.prototype = { 'save' : { 'label' : 'Import Record', 'func' : function (new_marcxml) { - alert('We got MARC! Put network call to import here.'); + var r = obj.network.simple_request('MARC_XML_RECORD_IMPORT', [ ses(), my_marcxml ]); + if (typeof r.ilsevent != 'undefined') { + obj.error.standard_unexpected_error_alert('Record not likely imported.',r); + } } } } -- 2.43.2