LP1744386: Alphabetize stat cats in volcopy attr editor
authorJane Sandberg <sandbej@linnbenton.edu>
Sun, 20 May 2018 16:00:48 +0000 (09:00 -0700)
committerJason Etheridge <jason@EquinoxInitiative.org>
Mon, 8 Apr 2019 20:08:40 +0000 (16:08 -0400)
To test:
1. Go to the volume copy editor.  Confirm that the stat
cats do not display in order of owning library or stat cat
name.
2. Apply this commit.
3. Go to the volume copy editor.  Confirm that the stat
cats now display in alphabetical order by owning library,
then stat cat name.

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2

index 3628a9e..580ec61 100644 (file)
       <div ng-if="hasMulti()"> </div>
     </li>
 
-    <li ng-repeat="sc in statcats" ng-if="statcat_visible(sc.owner().id())">
+    <li ng-repeat="sc in statcats | orderBy:['owner().name()','name()']" ng-if="statcat_visible(sc.owner().id())">
       <div class="bg-info"><label>{{sc.owner().name() }} : {{ sc.name()}}</label></div>
       <div ng-class="{'bg-success': working.statcats[sc.id()] !== undefined}">
         <select class="form-control" ng-disabled="!defaults.statcats"