projects
/
pazpar2-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
07f4558
)
When parsing detailed record the subject nodes are placed in an array.
author
Jakub Skoczen
<jakub@indexdata.dk>
Tue, 13 Nov 2007 12:51:29 +0000
(12:51 +0000)
committer
Jakub Skoczen
<jakub@indexdata.dk>
Tue, 13 Nov 2007 12:51:29 +0000
(12:51 +0000)
js/pz2.js
patch
|
blob
|
history
diff --git
a/js/pz2.js
b/js/pz2.js
index
ed3c69d
..
36fc4f3
100644
(file)
--- a/
js/pz2.js
+++ b/
js/pz2.js
@@
-1,5
+1,5
@@
/*
/*
-** $Id: pz2.js,v 1.65 2007-11-01 10:59:32 marc Exp $
+** $Id: pz2.js,v 1.66 2007-11-13 12:51:29 jakub Exp $
** pz2.js - pazpar2's javascript client library.
*/
** pz2.js - pazpar2's javascript client library.
*/
@@
-564,7
+564,21
@@
pz2.prototype =
nodeText =
locationNodes[i].childNodes[j]
.firstChild.nodeValue;
nodeText =
locationNodes[i].childNodes[j]
.firstChild.nodeValue;
- record["location"][i][nodeName] = nodeText;
+ // this is stupid
+ if (nodeName == 'md-subject') {
+ if (record["location"][i]['nodeName']) {
+ record["location"][i][nodeName]
+ .push(nodeText)
+ } else {
+ record["location"][i][nodeName]
+ = new Array();
+ record["location"][i][nodeName]
+ .push(nodeText)
+ }
+ } else {
+ record["location"][i][nodeName]
+ = nodeText;
+ }
}
}
}
}
}
}