LP#1787676: sort Z39.50 sources in JS, retaining Local Catalog at top of list
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Fri, 17 Aug 2018 17:32:31 +0000 (10:32 -0700)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 5 Aug 2019 14:45:43 +0000 (10:45 -0400)
This reverts the original fix for LP#1119370.

Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/templates/staff/cat/z3950/t_target.tt2
Open-ILS/web/js/ui/default/staff/cat/services/z3950.js

index 0ca0e6c..17ca475 100644 (file)
@@ -1,4 +1,4 @@
-<div ng-repeat="target in targets | orderBy:'settings.label'" class="z3950-target-list">
+<div ng-repeat="target in targets" class="z3950-target-list">
     <div class="checkbox">
         <input ng-model="target.selected" type="checkbox">
     <div>
     <div class="checkbox">
         <input ng-model="target.selected" type="checkbox">
     <div>
index 0f12422..4eb3b86 100644 (file)
@@ -36,8 +36,8 @@ function($q,   egCore,   egAuth) {
                 this.push(tgt);
             }, service.targets);
             service.targets.sort(function (a, b) {
                 this.push(tgt);
             }, service.targets);
             service.targets.sort(function (a, b) {
-                a = a.settings.label;
-                b = b.settings.label;
+                a = a.settings.label.toLowerCase();
+                b = b.settings.label.toLowerCase();
                 return a < b ? -1 : (a > b ? 1 : 0);
             }); 
             service.targets.unshift({
                 return a < b ? -1 : (a > b ? 1 : 0);
             }); 
             service.targets.unshift({