From e68184bb5e3d3a24a9b134a5a60398e48600d022 Mon Sep 17 00:00:00 2001 From: Anna Gerber Date: Wed, 25 Mar 2009 06:35:25 +0000 Subject: [PATCH] #36 display annotation body --- oaiorebuilder/content/loregui.js | 6 ++++++ oaiorebuilder/content/uifunctions.js | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/oaiorebuilder/content/loregui.js b/oaiorebuilder/content/loregui.js index 1d1f7893..f2044f06 100644 --- a/oaiorebuilder/content/loregui.js +++ b/oaiorebuilder/content/loregui.js @@ -62,6 +62,8 @@ lore.gui_spec = { }, { name: 'title' }, { + name: 'body' + }, { name: 'modified' }, { name: 'type' @@ -83,6 +85,10 @@ lore.gui_spec = { sortable: true, dataIndex: 'title' }, { + header: 'Body', + dataIndex: 'body', + hidden: false + }, { header: 'Modified', dataIndex: 'modified', hidden: true diff --git a/oaiorebuilder/content/uifunctions.js b/oaiorebuilder/content/uifunctions.js index e925e85d..6ca3c955 100644 --- a/oaiorebuilder/content/uifunctions.js +++ b/oaiorebuilder/content/uifunctions.js @@ -936,6 +936,7 @@ function getAjaxRespSync (uri) case 'application/xml': return req.responseXML; case 'application/html': return req.responseText; case 'application/text': return escapeHTML(req.responseText); + case 'application/xhtml+xml': return req.responseText; // should probably return XML } throw new Error('No usable response.\nContent is "' + rtype + '"' + '\nRequest:\n' + uri + '\n' + req.responseText); @@ -1015,7 +1016,8 @@ function Annotation (rdf) node = rdf.getElementsByTagNameNS(DC_NS, 'language'); this.lang = safeGetFirstChildValue(node); - + + this.body = getAjaxRespSync(this.bodyURL); } catch (ex) {