[open-ils-commits] [GIT] Evergreen ILS branch rel_3_3 updated. 434c9e601cf4389d18e462f5fb58da5822703501

Evergreen Git git at git.evergreen-ils.org
Fri May 1 13:55:25 EDT 2020


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, rel_3_3 has been updated
       via  434c9e601cf4389d18e462f5fb58da5822703501 (commit)
      from  a4d2370d5443db59416ce8b8b4240cc816c3d983 (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 434c9e601cf4389d18e462f5fb58da5822703501
Author: Daniel Pearl <dpearl at cwmars.org>
Date:   Wed Mar 13 10:07:17 2019 -0400

    LP1787636: Sort Libraries without Holdings In Holdings View
    
    Empty libraries in holdings view are listed at the end of the library
    list instead of integrated within the list.  This patch sorts them
    within the list.
    
    Signed-off-by: Daniel Pearl <dpearl at cwmars.org>
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>

diff --git a/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2 b/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
index f8b8e74dc5..e992fc710d 100644
--- a/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
+++ b/Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
@@ -1,7 +1,7 @@
 
 <div>
   <div class="row">
-    <div class="col-md-3">
+    <div class="col-md-4">
       <div class="input-group">
         <span class="input-group-addon">[% l('Show holdings at or below') %]</span>
         <eg-org-selector selected="holdings_ou" onchange="holdings_ou_changed" sticky-setting="cat.holdings_view_ou"></eg-org-selector>
diff --git a/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js b/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js
index d78c049bc3..2b19821805 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/services/holdings.js
@@ -87,6 +87,43 @@ function(egCore , $q) {
                     }
                 });
 
+                if (empty_org) {
+
+                    var empty_org_list = [];
+                    angular.forEach(svc.org_use_map,function(v,k){
+                        if (v == 0) empty_org_list.push(k);
+                    });
+
+                    angular.forEach(empty_org_list, function (oid) {
+                        var owner = egCore.org.get(oid);
+                        if (owner.ou_type().can_have_vols() != 't') return;
+
+                        var owner_list = [];
+                        while (owner.parent_ou()) { // we're going to skip the top of the tree...
+                            owner_list.unshift(owner.shortname());
+                            owner = egCore.org.get(owner.parent_ou());
+                        }
+
+                        var owner_label = owner_list.join(' ... ');
+
+                        svc.copies.push({
+                            index      : index++,
+                            id_list    : [],
+                            call_number: { label : '' },
+                            barcode    : '',
+                            owner_id   : oid,
+                            owner_list : owner_list,
+                            owner_label: owner_label,
+                            copy_count : 0,
+                            cn_count   : 0,
+                            copy_alert_count : 0
+                        });
+                    });
+                }
+
+                svc.ongoing = false;
+
+
                 svc.copies = svc.copies.sort(
                     function (a, b) {
                         function compare_array (x, y, i) {
@@ -255,40 +292,6 @@ function(egCore , $q) {
                     }
                 }
 
-                if (empty_org) {
-
-                    var empty_org_list = [];
-                    angular.forEach(svc.org_use_map,function(v,k){
-                        if (v == 0) empty_org_list.push(k);
-                    });
-
-                    angular.forEach(empty_org_list, function (oid) {
-                        var owner = egCore.org.get(oid);
-                        if (owner.ou_type().can_have_vols() != 't') return;
-
-                        var owner_list = [];
-                        while (owner.parent_ou()) { // we're going to skip the top of the tree...
-                            owner_list.unshift(owner.shortname());
-                            owner = egCore.org.get(owner.parent_ou());
-                        }
-
-                        var owner_label = owner_list.join(' ... ');
-
-                        new_list.push({
-                            index      : index++,
-                            id_list    : [],
-                            call_number: { label : '' },
-                            barcode    : '',
-                            owner_id   : oid,
-                            owner_list : owner_list,
-                            owner_label: owner_label,
-                            copy_count : 0,
-                            cn_count   : 0,
-                            copy_alert_count : 0
-                        });
-                    });
-                }
-
                 svc.copies = new_list;
                 svc.ongoing = false;
             },

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

Summary of changes:
 .../src/templates/staff/cat/catalog/t_holdings.tt2 |  2 +-
 .../js/ui/default/staff/cat/services/holdings.js   | 71 +++++++++++-----------
 2 files changed, 38 insertions(+), 35 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list