From c10a81b9ab5b21f4c0ededc45db087b2a6127a39 Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 26 Apr 2006 01:10:45 +0000 Subject: [PATCH] move toward new marc editor git-svn-id: svn://svn.open-ils.org/ILS/trunk@3871 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../staff_client/chrome/content/cat/opac.xul | 15 +++++++++-- .../chrome/content/main/constants.js | 3 ++- Open-ILS/xul/staff_client/server/cat/z3950.js | 25 +++++++++++-------- 3 files changed, 30 insertions(+), 13 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 b62d9a6468..7d0eeff204 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul @@ -90,8 +90,19 @@ } function set_marc_edit() { - bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_MARC_EDIT ) + '?session=' + window.escape(session) - + '&docid=' + window.escape(docid),{},xulG); + bottom_pane.set_iframe( + xulG.url_prefix( urls.XUL_MARC_EDIT ), + {}, + { + 'record' : { 'url' : '/opac/extras/supercat/retrieve/marcxml/record/' + docid }, + 'save' : { + 'label' : 'Save Record', + 'func' : function (new_marcxml) { + alert('We got MARC! Put network call to save here.'); + } + } + } + ); } function set_copy_browser() { 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 bc59bd36ee..f0c2928e7a 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -125,7 +125,8 @@ var urls = { 'XUL_HOLD_PULL_LIST' : '/xul/server/admin/hold_pull_list.xhtml', 'XUL_HOLDS_BROWSER' : '/xul/server/patron/holds.xul', 'XUL_IN_HOUSE_USE' : '/xul/server/circ/in_house_use.xul', - 'XUL_MARC_EDIT' : 'chrome://open_ils_staff_client/content/legacy/_marc.xul', + 'XUL_MARC_EDIT_LEGACY' : 'chrome://open_ils_staff_client/content/legacy/_marc.xul', + 'XUL_MARC_EDIT' : '/xul/server/cat/marcedit.xul', 'XUL_MARC_VIEW' : '/xul/server/cat/marc_view.xul', 'XUL_MENU_FRAME' : 'chrome://open_ils_staff_client/content/main/menu_frame.xul', 'XUL_NON_CAT_LABEL_EDIT' : '/xul/server/admin/non_cat_types.xhtml', diff --git a/Open-ILS/xul/staff_client/server/cat/z3950.js b/Open-ILS/xul/staff_client/server/cat/z3950.js index 5dbc65b455..b7633a806a 100644 --- a/Open-ILS/xul/staff_client/server/cat/z3950.js +++ b/Open-ILS/xul/staff_client/server/cat/z3950.js @@ -111,13 +111,9 @@ cat.z3950.prototype = { ['command'], function() { obj.spawn_marc_editor( - obj.network.simple_request( - 'FM_BRN_FROM_MARCXML', - [ - obj.results.records[ - obj.controller.view.marc_import.getAttribute('retrieve_id') - ].marcxml - ] + obj.results.records[ + obj.controller.view.marc_import.getAttribute('retrieve_id') + ].marcxml ) ); }, @@ -369,11 +365,20 @@ cat.z3950.prototype = { } }, - 'spawn_marc_editor' : function(my_brn) { + 'spawn_marc_editor' : function(my_marcxml) { var obj = this; xulG.new_tab( - xulG.url_prefix(urls.XUL_MARC_EDIT) + '?session=' + window.escape(obj.session), - { 'tab_name' : 'MARC Editor' }, { 'import_tree' : my_brn } + xulG.url_prefix(urls.XUL_MARC_EDIT), + { 'tab_name' : 'MARC Editor' }, + { + 'record' : { 'marc' : my_marcxml }, + 'save' : { + 'label' : 'Import Record', + 'func' : function (new_marcxml) { + alert('We got MARC! Put network call to import here.'); + } + } + } ); }, -- 2.43.2