LP#1452950 Field doc display repair
authorBill Erickson <berickxx@gmail.com>
Sat, 31 Oct 2015 17:03:31 +0000 (13:03 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 25 Feb 2016 22:31:57 +0000 (17:31 -0500)
Set the current field doc via function instead of directly within the
ng-click handler.  For unknown reasons, the direct approach was not
working with addresses.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js

index f8186e4..9caf5e7 100644 (file)
@@ -42,7 +42,7 @@
 
     <!-- field documentation img/link -->
     <img ng-show="field_doc.[% cls %].[% field %]" 
-      ng-click="selected_field_doc=field_doc.[% cls %].[% field %]"
+      ng-click="set_selected_field_doc('[% cls %]','[% field %]')"
       src='[% DOC_IMG %]'></img>
   </div>
 
index 298d8cc..63ab0c4 100644 (file)
@@ -624,6 +624,11 @@ function PatronRegCtrl($scope, $routeParams,
             
     });
 
+    // update the currently displayed field documentation
+    $scope.set_selected_field_doc = function(cls, field) {
+        $scope.selected_field_doc = $scope.field_doc[cls][field];
+    }
+
     // returns the tree depth of the selected profile group tree node.
     $scope.pgt_depth = function(grp) {
         var d = 0;