[open-ils-commits] [GIT] Evergreen ILS branch master updated. 410dce96c6b2ae891386e7da4f0d40f78f2d9d63

Evergreen Git git at git.evergreen-ils.org
Wed Nov 29 14:20:11 EST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  410dce96c6b2ae891386e7da4f0d40f78f2d9d63 (commit)
      from  124f0ff99a3dd79e049fb5c6c243dfb4a98d5a05 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 410dce96c6b2ae891386e7da4f0d40f78f2d9d63
Author: Jason Boyer <jboyer at library.in.gov>
Date:   Thu Aug 31 22:06:31 2017 -0400

    LP1714390:Remove acp Editor Formatting Frustration
    
    In bug 1713064 I added a directive to make it possible to use
    a String as a Model in an Input tag with type Number. Unfortunately
    there was also a formatting function in that branch that works well
    sometimes but is far more frustrating than it is helpful for enough
    workflows that it should be removed.
    
    Signed-off-by: Jason Boyer <jboyer at library.in.gov>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2
index bba9ab1..775c77b 100644
--- a/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2
+++ b/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2
@@ -226,7 +226,7 @@
                     </select>
                 </div>
                 <div class="col-md-6" ng-class="{'bg-success': working.price !== undefined}">
-                    <input class="form-control" ng-disabled="!defaults.attributes.price" string-to-number precision="2" ng-model="working.price" type="number" step="0.01"/>
+                    <input class="form-control" ng-disabled="!defaults.attributes.price" string-to-number ng-model="working.price" type="number" step="0.01"/>
                 </div>
             </div>
 
@@ -250,7 +250,7 @@
                     </select>
                 </div>
                 <div class="col-md-6" ng-class="{'bg-success': working.cost !== undefined}">
-                    <input class="form-control" ng-disabled="!defaults.attributes.cost" string-to-number precision="2" ng-model="working.cost" type="number" step="0.01"/>
+                    <input class="form-control" ng-disabled="!defaults.attributes.cost" string-to-number ng-model="working.cost" type="number" step="0.01"/>
                 </div>
             </div>
 
@@ -320,7 +320,7 @@
                     </div>
                 </div>
                 <div class="col-md-6" ng-class="{'bg-success': working.deposit_amount !== undefined}">
-                    <input class="form-control" ng-disabled="!defaults.attributes.deposit_amount" string-to-number precision="2" ng-model="working.deposit_amount" type="number" step="0.01"/>
+                    <input class="form-control" ng-disabled="!defaults.attributes.deposit_amount" string-to-number ng-model="working.deposit_amount" type="number" step="0.01"/>
                 </div>
             </div>
 
diff --git a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
index 7fe8ddd..d856ce6 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js
@@ -450,26 +450,13 @@ function(egCore , $q) {
     return {
         require: 'ngModel',
         link: function(scope, element, attrs, ngModel) {
-            var precision = attrs.precision || 0;
             ngModel.$parsers.push(function(value) {
                 return value;
             });
 
-            function updateDisplay() {
-                var value = parseFloat(ngModel.$viewValue);
-                if ( isNaN(value) ) { return; }
-                    element.val(value.toFixed(precision));
-            }
-
             ngModel.$formatters.push(function(value) {
                 return parseFloat(value);
             });
-
-            ngModel.$viewChangeListeners.push(updateDisplay);
-
-            ngModel.$render = function() {
-                updateDisplay();
-            }
         }
     };
 })

-----------------------------------------------------------------------

Summary of changes:
 .../templates/staff/cat/volcopy/t_attr_edit.tt2    |    6 +++---
 .../web/js/ui/default/staff/cat/volcopy/app.js     |   13 -------------
 2 files changed, 3 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list