projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 1.8.7
[pazpar2-moved-to-github.git]
/
js
/
pz2.js
diff --git
a/js/pz2.js
b/js/pz2.js
index
824fd60
..
1ee8096
100644
(file)
--- a/
js/pz2.js
+++ b/
js/pz2.js
@@
-319,7
+319,8
@@
pz2.prototype =
.childNodes[0].nodeValue == "OK" ) {
context.searchStatusOK = true;
//piggyback search
.childNodes[0].nodeValue == "OK" ) {
context.searchStatusOK = true;
//piggyback search
- context.show(start, num, sort);
+ if (context.showCallback)
+ context.show(start, num, sort);
if (context.statCallback)
context.stat();
if (context.termlistCallback)
if (context.statCallback)
context.stat();
if (context.termlistCallback)
@@
-708,11
+709,6
@@
pz2.prototype =
} else if (bytarget[i]["state"]=="Client_Working") {
bytarget[i]["hits"] = "...";
}
} else if (bytarget[i]["state"]=="Client_Working") {
bytarget[i]["hits"] = "...";
}
- if (bytarget[i].diagnostic == "1") {
- bytarget[i].diagnostic = "Permanent system error";
- } else if (bytarget[i].diagnostic == "2") {
- bytarget[i].diagnostic = "Temporary system error";
- }
var targetsSuggestions = targetNodes[i].getElementsByTagName("suggestions");
if (targetsSuggestions != undefined && targetsSuggestions.length>0) {
var suggestions = targetsSuggestions[0];
var targetsSuggestions = targetNodes[i].getElementsByTagName("suggestions");
if (targetsSuggestions != undefined && targetsSuggestions.length>0) {
var suggestions = targetsSuggestions[0];
@@
-769,7
+765,7
@@
pz2.prototype =
** AJAX HELPER CLASS ***********************************************************
********************************************************************************
*/
** AJAX HELPER CLASS ***********************************************************
********************************************************************************
*/
-var pzHttpRequest = function (url, errorHandler, cookieDomain) {
+var pzHttpRequest = function (url, errorHandler, cookieDomain, windowId) {
this.maxUrlLength = 2048;
this.request = null;
this.url = url;
this.maxUrlLength = 2048;
this.request = null;
this.url = url;
@@
-779,6
+775,7
@@
var pzHttpRequest = function (url, errorHandler, cookieDomain) {
this.isXDR = false;
this.domainRegex = /https?:\/\/([^:/]+).*/;
this.cookieDomain = cookieDomain || null;
this.isXDR = false;
this.domainRegex = /https?:\/\/([^:/]+).*/;
this.cookieDomain = cookieDomain || null;
+ this.windowId = windowId || window.name;
var xhr = new XMLHttpRequest();
var domain = this._getDomainFromUrl(url);
var xhr = new XMLHttpRequest();
var domain = this._getDomainFromUrl(url);
@@
-906,9
+903,9
@@
pzHttpRequest.prototype =
//session cookie, resend it
var domain = this._getDomainFromUrl(url);
if (domain && this._isCrossDomain(domain) &&
//session cookie, resend it
var domain = this._getDomainFromUrl(url);
if (domain && this._isCrossDomain(domain) &&
- this.getCookie(domain+":SESSID")) {
+ this.getCookie(domain+":"+this.windowId+":SESSID")) {
//rewrite the URL
//rewrite the URL
- var sessparam = ';jsessionid=' + this.getCookie(domain+":SESSID");
+ var sessparam = ';jsessionid=' + this.getCookie(domain+":"+this.windowId+":SESSID");
var q = url.indexOf('?');
if (q == -1) {
url += sessparam;
var q = url.indexOf('?');
if (q == -1) {
url += sessparam;
@@
-1020,7
+1017,7
@@
pzHttpRequest.prototype =
var jsessionId = this.request.responseXML
.documentElement.getAttribute('jsessionId');
if (jsessionId)
var jsessionId = this.request.responseXML
.documentElement.getAttribute('jsessionId');
if (jsessionId)
- this.setCookie(domain+":SESSID", jsessionId);
+ this.setCookie(domain+":"+this.windowId+":SESSID", jsessionId);
}
this.callback(this.request.responseXML);
} else {
}
this.callback(this.request.responseXML);
} else {
@@
-1194,7
+1191,7
@@
Element_parseChildNodes = function (node)
for (var i = 0; i < attrs.length; i++) {
hasChildElems = true;
var attrName = '@' + attrs[i].nodeName;
for (var i = 0; i < attrs.length; i++) {
hasChildElems = true;
var attrName = '@' + attrs[i].nodeName;
- var attrValue = attrs[i].value;
+ var attrValue = attrs[i].nodeValue;
parsed[attrName] = attrValue;
}
parsed[attrName] = attrValue;
}