From d9e49894760da6e7fb234d2b7ae4d67ef22d05cd Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 22 Jul 2005 22:54:42 +0000 Subject: [PATCH] added section for building a xulrunner friendly marc window git-svn-id: svn://svn.open-ils.org/ILS/trunk@1371 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../chrome/content/evergreen/opac/opac.js | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Evergreen/staff_client/chrome/content/evergreen/opac/opac.js b/Evergreen/staff_client/chrome/content/evergreen/opac/opac.js index 7f9cbb98df..2229cda559 100644 --- a/Evergreen/staff_client/chrome/content/evergreen/opac/opac.js +++ b/Evergreen/staff_client/chrome/content/evergreen/opac/opac.js @@ -28,6 +28,8 @@ function opac_init(p) { p.opac_iframe.contentWindow.xulEvtRecordDetailDisplayed = p.xulEvtRecordDetailDisplayed; + p.opac_iframe.contentWindow.xulEvtViewMARC = p.xulEvtViewMARC; + /* shove BIG G in so global variables may be accessed */ p.opac_iframe.contentWindow.G = mw.G; @@ -104,4 +106,37 @@ function opac_build_callbacks(p) { } ); } + + p.xulEvtViewMARC = function( node, record ) { + node.onclick = buildViewMARCWindow(record); + } + } + + +function buildViewMARCWindow(record) { + + debug("Setting up view marc with record " + record.doc_id()); + + var func = function() { + + var req = new RemoteRequest( + "open-ils.search", + "open-ils.search.biblio.record.html", + record.doc_id()); + + req.send(true); + + var html = req.getResultObject(); + var id = record.doc_id(); + var win = new_window("data:text/html," + html); + win.document.title = "View MARC"; + win.focus(); + + } + + return func; +} + + + -- 2.11.0