LP#1549505: fix editing of badge percentile field
authorGalen Charlton <gmc@esilibrary.com>
Thu, 10 Mar 2016 20:29:37 +0000 (15:29 -0500)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 10 Mar 2016 20:29:37 +0000 (15:29 -0500)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/web/js/ui/default/staff/admin/local/rating/badge.js

index f8dc661..b5dc34b 100644 (file)
@@ -70,6 +70,8 @@ function($scope , $q , $timeout , $location , $window , $modal ,
                 ['$scope', '$modalInstance', function($scope, $modalInstance) {
                 $scope.focusMe = true;
                 $scope.record = egCore.idl.toHash(rb);
+                // non-integer numeric field require parseFloat
+                $scope.record.percentile = parseFloat($scope.record.percentile);
                 $scope.record_label = get_record_label();
                 $scope.fields = get_field_list($scope.record);
                 $scope.ok = function(args) { $modalInstance.close(args) }