LP#1585369: Angular broke my copy editor!
authorMike Rylander <mrylander@gmail.com>
Wed, 25 May 2016 17:14:44 +0000 (13:14 -0400)
committerMike Rylander <mrylander@gmail.com>
Thu, 18 Aug 2016 19:34:21 +0000 (15:34 -0400)
It seems Angular 1.5 is either less flexible or less forgiving in its
ng-repeat implementation, and does not like an orderBy filter on object
iterators.  Removing that, and the track by clause, allows the holdings
editor to render properly.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js

index 95e8e50..30ac2d3 100644 (file)
@@ -65,7 +65,7 @@
         </div> <!-- row -->
         <eg-vol-edit
             focus-next="focusNextFirst"
-            ng-repeat="(lib,callnumbers) in data.tree | orderBy:lib track by lib"
+            ng-repeat="(lib,callnumbers) in data.tree"
             ng-init="ind = $index"
             record="{{record_id}}"
             only-vols="only_vols"
index 8c9ce68..0b109da 100644 (file)
@@ -626,7 +626,7 @@ function(egCore , $q) {
                 '<div class="col-xs-1"><input ng-disabled="record == 0" class="form-control" type="number" min="{{orig_cn_count}}" ng-model="cn_count" ng-change="changeCNCount()"/></div>'+
                 '<div class="col-xs-10">'+
                     '<eg-vol-row only-vols="onlyVols" record="{{record}}"'+
-                        'ng-repeat="(cn,copies) in struct | orderBy:cn track by cn" '+
+                        'ng-repeat="(cn,copies) in struct" '+
                         'focus-next="focusNextFirst" copies="copies" allcopies="allcopies">'+
                     '</eg-vol-row>'+
                 '</div>'+