[open-ils-commits] [GIT] Evergreen ILS branch rel_3_1 updated. e4e8c7a5f1e1586262d9720c45ed0ab443936267
Evergreen Git
git at git.evergreen-ils.org
Tue Mar 5 16:24:47 EST 2019
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_1 has been updated
via e4e8c7a5f1e1586262d9720c45ed0ab443936267 (commit)
from 0da647e53fd367acbf9fc4b1288878c73e365723 (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 e4e8c7a5f1e1586262d9720c45ed0ab443936267
Author: Remington Steed <rjs7 at calvin.edu>
Date: Fri Oct 26 11:28:32 2018 -0400
LP#1800178 Holdings View should also sort by part
The Holdings View tab of the web client doesn't correctly sort by
monograph parts. The JS is already grabbing the part label for display,
so this commit moves that chunk before the sorting code, and also grabs
the sort key. Note that the part labels and sort keys are joined per
item, since the database supports multiple parts per item (though the UI
hasn't yet supported that). And we now join the label on comma-space,
instead of the default (just a comma).
Signed-off-by: Remington Steed <rjs7 at calvin.edu>
Signed-off-by: Rogan Hamby <rogan.hamby at gmail.com>
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
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 c330acf946..9235654b32 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
@@ -77,6 +77,15 @@ function(egCore , $q) {
function() { // finished
if (p.cancel) return;
+ // create virtual field for displaying active parts
+ angular.forEach(svc.copies, function (cp) {
+ cp.monograph_parts = '';
+ if (cp.parts && cp.parts.length > 0) {
+ cp.monograph_parts = cp.parts.map(function(obj) { return obj.label; }).join(', ');
+ cp.monograph_parts_sortkeys = cp.parts.map(function(obj) { return obj.label_sortkey; }).join();
+ }
+ });
+
svc.copies = svc.copies.sort(
function (a, b) {
function compare_array (x, y, i) {
@@ -104,6 +113,10 @@ function(egCore , $q) {
if (a.call_number.label < b.call_number.label) return -1;
if (a.call_number.label > b.call_number.label) return 1;
+ // also parts sortkeys combined string
+ if (a.monograph_parts_sortkeys < b.monograph_parts_sortkeys) return -1;
+ if (a.monograph_parts_sortkeys > b.monograph_parts_sortkeys) return 1;
+
// try copy number
if (a.copy_number < b.copy_number) return -1;
if (a.copy_number > b.copy_number) return 1;
@@ -116,14 +129,6 @@ function(egCore , $q) {
}
);
- // create virtual field for displaying active parts
- angular.forEach(svc.copies, function (cp) {
- cp.monograph_parts = '';
- if (cp.parts && cp.parts.length > 0) {
- cp.monograph_parts = cp.parts.map(function(obj) { return obj.label; }).join();
- }
- });
-
// create virtual field for copy alert count
angular.forEach(svc.copies, function (cp) {
if (cp.copy_alerts) cp.copy_alert_count = cp.copy_alerts.length;
-----------------------------------------------------------------------
Summary of changes:
.../js/ui/default/staff/cat/services/holdings.js | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list