Add support to query books on specified lists (of award winners).
[quanweb.git] / js / src / SearchController.js
index 6f48c6c828fc63ddb463f9a8fcd5ed2f5c897438..a4f4e4a72ace1bb3ade06e88610cb78dc8111d39 100644 (file)
@@ -5,7 +5,7 @@ var SearchController = (function () {
     var my = {},
         booksModel = undefined;
 
-    const terms = ['aut', 'lan', 'ser', 'tit'];
+    const terms = ['aut', 'lan', 'lst', 'ser', 'tit'];
 
     // ==============
     // Public methods
@@ -78,10 +78,14 @@ var SearchController = (function () {
                 else {
                     url += '&';
                 }
-                url += term + '=' + encodeURIComponent('%' + value + '%');
+                if (term === 'lst') {
+                  url += term + '=' + encodeURIComponent('' + value);
+                }
+                else {
+                  url += term + '=' + encodeURIComponent('%' + value + '%');
+                }
             }
         }
-
         return url;
     }