[open-ils-commits] [GIT] Evergreen ILS branch master updated. 84aa229c90747716b1137b697b79936325ed1653

Evergreen Git git at git.evergreen-ils.org
Thu Aug 16 09:25:50 EDT 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  84aa229c90747716b1137b697b79936325ed1653 (commit)
      from  409c2ebcc648ad32a66ab6d9d2c085744104ae56 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 84aa229c90747716b1137b697b79936325ed1653
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Aug 10 18:14:23 2012 -0400

    Simplified Hold Pull List: Fix broken filters
    
    Only two filterable fields were available, and at least
    one didn't even work.
    
    Now we have a few more, and they seem to all work for me in testing.
    
    This problem was reported to me by Thomas Berezansky.
    
    While we're at it, also make sure the list of shelving locations in that
    filter dropdown is sorted alphabetically.  This was Kathy Lussier's
    request.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>

diff --git a/Open-ILS/src/templates/circ/hold_pull_list.tt2 b/Open-ILS/src/templates/circ/hold_pull_list.tt2
index 8355ffe..b468136 100644
--- a/Open-ILS/src/templates/circ/hold_pull_list.tt2
+++ b/Open-ILS/src/templates/circ/hold_pull_list.tt2
@@ -5,6 +5,10 @@
     dojo.require("openils.widget.OrgUnitFilteringSelect");
     dojo.require("openils.widget.FlattenerGrid");
 
+    /* We're going to supress copy_circ_lib from the actual filter dialog later,
+       but we still want it here so we can use a special widget ot filter on
+       it.  This is the widget that's basically saying, "show me the pull list
+       for /what/ library." */
     var map_extras = {
         "copy_circ_lib": {
             "path": "current_copy.circ_lib",
@@ -73,25 +77,26 @@
         fmClass="'ahopl'"
         defaultSort="['copy_location_order_position','call_number_sort_key']"
         mapExtras="map_extras"
+        suppressFilterFields="['copy_circ_lib']"
         sortFieldReMap="{call_number_label:'call_number_sort_key',shelving_loc:'copy_location_order_position'}"
         fetchLock="true"
         query="{}">
         <thead>
             <tr>
                 <th field="shelving_loc" fpath="current_copy.location.name" ffilter="true">Shelving Location</th>
-                <th field="call_number_label" fpath="call_number_label"></th>
-                <th field="author" fpath="current_copy.call_number.record.simple_record.author">Author</th>
-                <th field="title" fpath="current_copy.call_number.record.simple_record.title">Title</th>
-                <th field="barcode" fpath="current_copy.barcode"></th>
+                <th field="call_number_label" fpath="call_number_label" ffilter="true"></th>
+                <th field="author" fpath="current_copy.call_number.record.simple_record.author" ffilter="true">Author</th>
+                <th field="title" fpath="current_copy.call_number.record.simple_record.title" ffilter="true">Title</th>
+                <th field="barcode" fpath="current_copy.barcode" ffilter="true"></th>
                 <th field="parts" fpath="current_copy.parts.label" fsort="false">Parts</th>
                 <th field="notes" fpath="notes.body" fsort="false" _visible="false">Hold Notes</th>
-                <th field="patron_barcode" fpath="usr.card.barcode" _visible="false">Patron Barcode</th>
-                <th field="pickup_lib_name" fpath="pickup_lib.name" _visible="false">Pickup Library</th>
-                <th field="pickup_lib_shortname" fpath="pickup_lib.shortname" _visible="false">Pickup Library (Shortname)</th>
-                <th field="request_lib_name" fpath="request_lib.name" _visible="false">Request Library</th>
-                <th field="request_lib_shortname" fpath="request_lib.shortname" _visible="false">Request Library (Shortname)</th>
-                <th field="selection_ou" fpath="selection_ou.shortname" _visible="false">Selection Locus</th>
-                <th field="sms_carrier_name" fpath="sms_carrier.name" _visible="false">SMS Carrier</th>
+                <th field="patron_barcode" fpath="usr.card.barcode" _visible="false" ffilter="true">Patron Barcode</th>
+                <th field="pickup_lib_name" fpath="pickup_lib.name" _visible="false" ffilter="true">Pickup Library</th>
+                <th field="pickup_lib_shortname" fpath="pickup_lib.shortname" _visible="false" ffilter="true">Pickup Library (Shortname)</th>
+                <th field="request_lib_name" fpath="request_lib.name" _visible="false" ffilter="true">Request Library</th>
+                <th field="request_lib_shortname" fpath="request_lib.shortname" _visible="false" ffilter="true">Request Library (Shortname)</th>
+                <th field="selection_ou" fpath="selection_ou.shortname" _visible="false" ffilter="true">Selection Locus</th>
+                <th field="sms_carrier_name" fpath="sms_carrier.name" _visible="false" ffilter="true">SMS Carrier</th>
             </tr>
         </thead>
     </table>
diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
index 50d1a4f..6e4c88f 100644
--- a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
+++ b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
@@ -557,9 +557,17 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) {
                         oncomplete(openils.Util.readResponse(r, false, true));
                     };
 
+                    /* XXX LFW: I want to uncomment the following three lines that refer to ob, but haven't had the time to properly test. */
+
+                    //var ob = {};
+                    //ob[linkClass] = vfield.selector || vfield.name;
+
                     this.searchOptions = dojo.mixin(
-                        {async : !this.forceSync, oncomplete : _cb},
-                        this.searchOptions
+                        {
+                            async : !this.forceSync,
+                            oncomplete : _cb
+                            //order_by : ob
+                        }, this.searchOptions
                     );
 
                     if (this.searchFilter) {
@@ -705,6 +713,7 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) {
             var self = this;
             new openils.PermaCrud().search('acpl', {owning_lib : orgs}, {
                 async : !this.forceSync,
+                order_by : {"acpl": "name"},
                 oncomplete : function(r) {
                     var list = openils.Util.readResponse(r, false, true);
                     if(!list) return;
diff --git a/Open-ILS/web/js/dojo/openils/widget/FlattenerFilterPane.js b/Open-ILS/web/js/dojo/openils/widget/FlattenerFilterPane.js
index 5b74a99..23e7384 100644
--- a/Open-ILS/web/js/dojo/openils/widget/FlattenerFilterPane.js
+++ b/Open-ILS/web/js/dojo/openils/widget/FlattenerFilterPane.js
@@ -24,7 +24,7 @@ if (!dojo._hasResource["openils.widget.FlattenerFilterPane"]) {
                         if (self.suppressFilterFields &&
                             dojo.indexOf(
                                 self.suppressFilterFields, o.simple_name
-                            ) >= -1
+                            ) > -1
                         ) {
                             return false;
                         }
diff --git a/Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js b/Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js
index 9a350c5..03166da 100644
--- a/Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js
+++ b/Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js
@@ -46,6 +46,7 @@ if (!dojo._hasResource["openils.widget.FlattenerGrid"]) {
             "editStyle": "dialog",      /* "dialog" or "pane" */
             "requiredFields": null,     /* affects create/edit dialogs */
             "suppressEditFields": null, /* affects create/edit dialogs */
+            "suppressFilterFields": null, /* affects filter dialog */
 
             /* _generateMap() lives to interpret the attributes of the
              * FlattenerGrid dijit itself plus those definined in
@@ -495,7 +496,8 @@ if (!dojo._hasResource["openils.widget.FlattenerGrid"]) {
                             "useDiv": this.filterAlwaysInDiv,
                             "compact": true,
                             "initializers": this.filterInitializers,
-                            "widgetBuilders": this.filterWidgetBuilders
+                            "widgetBuilders": this.filterWidgetBuilders,
+                            "suppressFilterFields": this.suppressFilterFields
                         });
 
                     this.filterUi.onApply = dojo.hitch(
diff --git a/Open-ILS/web/js/dojo/openils/widget/PCrudFilterPane.js b/Open-ILS/web/js/dojo/openils/widget/PCrudFilterPane.js
index 5a88701..205deb4 100644
--- a/Open-ILS/web/js/dojo/openils/widget/PCrudFilterPane.js
+++ b/Open-ILS/web/js/dojo/openils/widget/PCrudFilterPane.js
@@ -147,6 +147,8 @@ if (!dojo._hasResource['openils.widget.PCrudFilterPane']) {
      * the right place. */
     function _clause_was_negative(clause) {
         /* clause objects really only ever have one property */
+        if (clause === null) return false; /* early out for special operator */
+
         var ops = openils.Util.objectProperties(clause);
         var op = ops.pop();
         var matches = op.match(/^not (\w+)$/);
@@ -474,7 +476,7 @@ if (!dojo._hasResource['openils.widget.PCrudFilterPane']) {
             }
         };
 
-        /* for ugly special cases in compliation */
+        /* for ugly special cases in compilation */
         this._null_clause = function() {
             var opname = this.get_selected_operator_name();
             if (opname == "not null")
@@ -593,6 +595,7 @@ if (!dojo._hasResource['openils.widget.PCrudFilterPane']) {
             "initializers": null,
             "compact": false,
             "widgetBuilders": null,
+            "suppressFilterFields": null,
 
             "constructor": function(args) {
                 for(var k in args)

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/templates/circ/hold_pull_list.tt2     |   27 +++++++++++--------
 .../web/js/dojo/openils/widget/AutoFieldWidget.js  |   13 ++++++++-
 .../js/dojo/openils/widget/FlattenerFilterPane.js  |    2 +-
 .../web/js/dojo/openils/widget/FlattenerGrid.js    |    4 ++-
 .../web/js/dojo/openils/widget/PCrudFilterPane.js  |    5 +++-
 5 files changed, 35 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list