[open-ils-commits] [GIT] Evergreen ILS branch master updated. 4a09e0139f4bf9f1aceb43bc94a67066d1f12147

Evergreen Git git at git.evergreen-ils.org
Fri Aug 24 14:19:00 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  4a09e0139f4bf9f1aceb43bc94a67066d1f12147 (commit)
      from  be6e338d1eeeefbca8f063e0b9b2f2bb6b4ca4b4 (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 4a09e0139f4bf9f1aceb43bc94a67066d1f12147
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Mon Aug 13 11:47:48 2012 -0400

    Fix sorting when printing from FlattenerGrid-based interfaces
    
    This particularly affects the Simplified Hold Pull List.  The printed
    verison of your data is supposed to reflect the same sort order that has
    been selected in the visual interface, and now it does.
    
    Buggy handling of the different avenues of sorting the grid (clicking column
    headers, using the column-picker/multicolumn-sort dialog, default sort order)
    had broken the flow of the data needed to build the right sort clause for
    some situations.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/js/dojo/openils/FlattenerStore.js b/Open-ILS/web/js/dojo/openils/FlattenerStore.js
index 700d3f2..6f3f989 100644
--- a/Open-ILS/web/js/dojo/openils/FlattenerStore.js
+++ b/Open-ILS/web/js/dojo/openils/FlattenerStore.js
@@ -16,7 +16,8 @@ if (!dojo._hasResource["openils.FlattenerStore"]) {
     dojo.declare(
         "openils.FlattenerStore", null, {
 
-        "_last_fetch": null,        /* used internally */
+        "_last_fetch": null,        /* timestamp. used internally */
+        "_last_fetch_sort": null,   /* dijit sort object. used internally */
         "_flattener_url": "/opac/extras/flattener",
 
         /* Everything between here and the constructor can be specified in
@@ -172,6 +173,12 @@ if (!dojo._hasResource["openils.FlattenerStore"]) {
             req.queryOptions = req.queryOptions || {};
             req.abort = function() { console.warn("[unimplemented] abort()"); };
 
+            /* If we were asked to fetch without any sort order specified (as
+             * will happen when coming from fetchToPrint(), try to use the
+             * last cached sort order, if any. */
+            req.sort = req.sort || this._last_fetch_sort;
+            this._last_fetch_sort = req.sort;
+
             if (!this.mapKey)
                 this._get_map_key();
 

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

Summary of changes:
 Open-ILS/web/js/dojo/openils/FlattenerStore.js |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list