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

Evergreen Git git at git.evergreen-ils.org
Mon Jun 3 17:55:51 EDT 2013


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  ed8cb3204bbb4f2d8bf671c9da3fa0d5f1c98f0c (commit)
      from  154e4946456f43769a00843e021f1981eaffda7e (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 ed8cb3204bbb4f2d8bf671c9da3fa0d5f1c98f0c
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu May 23 09:11:25 2013 -0400

    LP1183340 selectivly apply editable funds sorting
    
    Avoid sorting editable funds to the front of the fund list when there
    are no org units at which the user has the ADMIN_ACQ_FUND permission.
    Otherwise, we are sorting on an empty 'IN' list in pcrud, which results
    in an error.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/web/js/ui/default/acq/financial/list_funds.js b/Open-ILS/web/js/ui/default/acq/financial/list_funds.js
index abad41d..334de95 100644
--- a/Open-ILS/web/js/ui/default/acq/financial/list_funds.js
+++ b/Open-ILS/web/js/ui/default/acq/financial/list_funds.js
@@ -116,22 +116,23 @@ function loadFundGrid(year) {
     year = year || fundFilterYearSelect.attr('value');
     cachedFunds = [];
 
+    var order_by = [{'class' : 'acqf', field : 'name'}];
+
+    if (adminPermOrgs.length) {
+        // sort funds I can edit to the front
+        order_by.unshift({   
+            'class' : 'acqf',
+            field : 'org',
+            compare : {'in' : adminPermOrgs},
+            direction : 'desc'
+        });
+    }
+
     lfGrid.loadAll(
-        {
+        {   
             flesh : 1,  
             flesh_fields : {acqf : fundFleshFields},
-            
-            // by default, sort funds I can edit to the front
-            order_by : [
-                {   'class' : 'acqf',
-                    field : 'org',
-                    compare : {'in' : adminPermOrgs},
-                    direction : 'desc'
-                },
-                {   'class' : 'acqf',
-                    field : 'name'
-                }
-            ]
+            order_by : order_by,
         }, {   
             year : year, 
             org : fieldmapper.aou.descendantNodeList(contextOrg, true) 

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

Summary of changes:
 .../web/js/ui/default/acq/financial/list_funds.js  |   27 ++++++++++---------
 1 files changed, 14 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list