projects
/
mkws-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:
5cf6cae
)
SP auth request: check XML response document for <status>OK</status> message
author
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 19 Jun 2013 14:38:24 +0000
(14:38 +0000)
committer
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 19 Jun 2013 14:38:24 +0000
(14:38 +0000)
experiments/spdemo/index.html
patch
|
blob
|
history
diff --git
a/experiments/spdemo/index.html
b/experiments/spdemo/index.html
index
0954f03
..
d8543da
100644
(file)
--- a/
experiments/spdemo/index.html
+++ b/
experiments/spdemo/index.html
@@
-2,7
+2,7
@@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
-
+
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Pazpar2 demo client</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Pazpar2 demo client</title>
@@
-19,16
+19,30
@@
<!-- post configure -->
<script type="text/javascript">
<!-- post configure -->
<script type="text/javascript">
- $(document).ready(function() {
- if (useServiceProxy) {
+ $(document).ready(function() {
+ if (useServiceProxy) {
var jqxhr = jQuery.get(authURLServiceProxy)
var jqxhr = jQuery.get(authURLServiceProxy)
- .fail(function() { alert("service proxy authentifiction failed"); });
- }
- }
+ .fail(function() {
+ alert("service proxy authentifiction failed for URL " + authURLServiceProxy + " , give up!");
+ })
+ .success(function(data) {
+ if (!jQuery.isXMLDoc(data)) {
+ alert("service proxy auth response document is not valid XML document, give up!");
+ return;
+ }
+
+ var status = $(data).find("status");
+ if (status.text() != "OK") {
+ alert("service proxy auth repsonse status: " + status.text() + ", give up!");
+ return;
+ }
+ });
+ }
+ }
);
</script>
</head>
);
</script>
</head>
-
+
<body onload="domReady();">
<div id="noscript">
<body onload="domReady();">
<div id="noscript">
@@
-45,7
+59,7
@@
<span> | </span>
<a href="#" onclick="switchView('targetview')">Target Info</a>
</div>
<span> | </span>
<a href="#" onclick="switchView('targetview')">Target Info</a>
</div>
-
+
<div id="heading">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
<div id="heading">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
@@
-62,7
+76,7
@@
</tr>
</table>
</div>
</tr>
</table>
</div>
-
+
<div id="recordview">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
<div id="recordview">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
@@
-79,7
+93,7
@@
<option value="date:0">newest</option>
<option value="date:1">oldest</option>
</select>
<option value="date:0">newest</option>
<option value="date:1">oldest</option>
</select>
- and show
+ and show
<select name="perpage" id="perpage">
<option value="10">10</option>
<option value="20" selected="selected">20</option>
<select name="perpage" id="perpage">
<option value="10">10</option>
<option value="20" selected="selected">20</option>
@@
-96,16
+110,16
@@
</tr>
</table>
</div>
</tr>
</table>
</div>
-
+
<div id="targetview" style="display: none">
<div id="bytarget">
No information available yet.
</div>
</div>
<div id="targetview" style="display: none">
<div id="bytarget">
No information available yet.
</div>
</div>
-
+
<div id="footer">
<div id="stat"></div>
<div id="footer">
<div id="stat"></div>
- <span>Copyright © 1999-2013 by <a href="http://www.indexdata.com">Index Data</a></span>
+ <span>Copyright © 1999-2013 by <a href="http://www.indexdata.com">Index Data</a></span>
</div>
</body>
</div>
</body>