Add sort parameter to search
authorDennis Schafroth <dennis@indexdata.com>
Tue, 2 Oct 2012 10:47:55 +0000 (12:47 +0200)
committerDennis Schafroth <dennis@indexdata.com>
Tue, 2 Oct 2012 10:47:55 +0000 (12:47 +0200)
js/pz2.js

index b52bf28..4ff5798 100644 (file)
--- a/js/pz2.js
+++ b/js/pz2.js
@@ -284,13 +284,17 @@ pz2.prototype =
         else
             var start = 0;
 
-             var searchParams = { 
+       var searchParams = { 
           "command": "search",
           "query": this.currQuery, 
           "session": this.sessionID,
           "windowid" : window.name
         };
        
+        if( sort !== undefined ) {
+            this.currentSort = sort;
+           searchParams["sort"] = sort;
+       }
         if (filter !== undefined)
                searchParams["filter"] = filter;