Clean out empty dif files
[pazpar2-moved-to-github.git] / js / pz2.js
index 5d0c614..e2335da 100644 (file)
--- a/js/pz2.js
+++ b/js/pz2.js
@@ -384,17 +384,19 @@ pz2.prototype =
         var request = new pzHttpRequest(this.pz2String, this.errorHandler);
        var requestParameters = 
           {
-            "command": "show", 
-            "session": this.sessionID, 
-            "start": this.currentStart,
-            "num": this.currentNum, 
-            "sort": this.currentSort, 
-            "block": 1,
-            "type": this.showResponseType,
-            "windowid" : window.name
+              "command": "show", 
+              "session": this.sessionID, 
+              "start": this.currentStart,
+              "num": this.currentNum, 
+              "sort": this.currentSort, 
+              "block": 1,
+              "type": this.showResponseType,
+              "windowid" : window.name,
           };
         if (query_state)
           requestParameters["query-state"] = query_state;
+       if (this.version && this.version > 0)
+           requestParameters["version"] = this.version;
         request.safeGet(
          requestParameters,
           function(data, type) {
@@ -439,7 +441,14 @@ pz2.prototype =
             } else {
               context.throwError('Show failed. Malformed WS resonse.',
                   114);
-            }
+            };
+           var approxNode = data.getElementsByTagName("approximation");
+           if (approxNode)
+               show['approximation'] = 
+                 Number( approxNode[0].childNodes[0].nodeValue);
+             
+
+             data.getElementsByTagName("")
             context.activeClients = activeClients; 
             context.showCounter++;
             var delay = context.showTime;