webstaff: another fix to focus-on-new-MARC-field
authorGalen Charlton <gmc@esilibrary.com>
Thu, 8 Oct 2015 14:46:33 +0000 (14:46 +0000)
committerKathy Lussier <klussier@masslnc.org>
Tue, 2 Feb 2016 19:58:50 +0000 (14:58 -0500)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js

index 65640da..64a185a 100644 (file)
@@ -664,7 +664,7 @@ angular.module('egMarcMod', ['egCoreMod', 'ui.bootstrap'])
                     var element = $(e.target);
 
                     var index_field = e.data.scope.field.position;
-                    var new_field_index = index_field + 1;
+                    var new_field_index = index_field;
 
                     var new_field = new MARC21.Field({
                         tag : '999',
@@ -681,6 +681,7 @@ angular.module('egMarcMod', ['egCoreMod', 'ui.bootstrap'])
                             e.data.scope.field,
                             new_field
                         );
+                        new_field_index++;
                     }
 
                     $scope.current_event_target = 'r' + $scope.recordId +