Acq: make purchase order and invoice interfaces less annoying
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 20 Sep 2010 00:55:16 +0000 (00:55 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 20 Sep 2010 00:55:16 +0000 (00:55 +0000)
They're really just canned acq searches, but now they don't automatically start
the search and hide the search terms, so you have a chance to adjust what
you're looking for

git-svn-id: svn://svn.open-ils.org/ILS/trunk@17823 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/ui/default/acq/search/unified.js

index 4fffeae..359c234 100644 (file)
@@ -808,6 +808,7 @@ function URIManager() {
                     {"state": "on-order"}
                 ]
             },
+            "half_search": true,
             "result_type": "purchase_order",
             "conjunction": "and",
             "order_by": [
@@ -833,6 +834,7 @@ function URIManager() {
                     {"receiver": openils.User.user.ws_ou()}
                 ]
             },
+            "half_search": true,
             "result_type": "invoice",
             "conjunction": "and",
             "order_by": [
@@ -876,10 +878,13 @@ openils.Util.addOnLoad(
 
         uriManager = new URIManager();
         if (uriManager.search_object) {
-            hideForm();
+            if (!uriManager.half_search)
+                hideForm();
             openils.Util.show("acq-unified-body");
             termManager.reflect(uriManager.search_object);
-            resultManager.search(uriManager, termManager);
+
+            if (!uriManager.half_search)
+                resultManager.search(uriManager, termManager);
         } else {
             termManager.addRow();
             openils.Util.show("acq-unified-body");