[open-ils-commits] [GIT] Evergreen ILS branch rel_2_12 updated. fc401acfe9526901bf9ab002bb33e79bca7f990e

Evergreen Git git at git.evergreen-ils.org
Mon Apr 10 12:54:48 EDT 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, rel_2_12 has been updated
       via  fc401acfe9526901bf9ab002bb33e79bca7f990e (commit)
      from  6739b7df88b605ec4ac36fb749c3ea6e7cec8e92 (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 fc401acfe9526901bf9ab002bb33e79bca7f990e
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Thu Mar 30 17:03:07 2017 -0400

    LP#1677416: unbreak use of egOrgSelector by egEditFmRecord
    
    This patch fixes a regression where attempting to change
    the value of an egOrgSelector embedded in an egEditFmRecord
    would result in errors like this:
    
    Error: [$compile:nonassign] http://errors.angularjs.org/1.5.11/$compile/nonassign?p0=rec_orgs%5Bfield.name%5D()&p1=selected&p2=egOrgSelector
    
    To test
    -------
    [1] Open the MARC Tag Tables admin interface in the web
        staff client and edit an existing entry. Note that
        changing the selected OU will result in there being
        no change and error messages appearing in the browser
        JavaScript console.
    [2] Apply the patch and repeat step 1.
    [3] Verify that no errors are logged.
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
    Signed-off-by: Bill Erickson <berickxx at gmail.com>

diff --git a/Open-ILS/src/templates/staff/share/t_fm_record_editor.tt2 b/Open-ILS/src/templates/staff/share/t_fm_record_editor.tt2
index 18ee809..f7a7a6e 100644
--- a/Open-ILS/src/templates/staff/share/t_fm_record_editor.tt2
+++ b/Open-ILS/src/templates/staff/share/t_fm_record_editor.tt2
@@ -49,8 +49,8 @@
           </select>
         </span>
         <eg-org-selector ng-if="field.datatype == 'org_unit'"
-          selected="rec_orgs[field.name]()"
-          onchange="rec_orgs[field.name]">
+          selected="rec_org_values[field.name]"
+          onchange="rec_orgs[field.name]" nodefault>
         </eg-org-selector>
       </div>
     </div>
diff --git a/Open-ILS/web/js/ui/default/staff/services/fm_record_editor.js b/Open-ILS/web/js/ui/default/staff/services/fm_record_editor.js
index da95d54..be04844 100644
--- a/Open-ILS/web/js/ui/default/staff/services/fm_record_editor.js
+++ b/Open-ILS/web/js/ui/default/staff/services/fm_record_editor.js
@@ -74,6 +74,7 @@ angular.module('egFmRecordEditorMod',
 
             $scope.record_label = egCore.idl.classes[$scope.idlClass].label;
             $scope.rec_orgs = {};
+            $scope.rec_org_values = {};
 
             if ($scope.mode == 'update') {
                 egCore.pcrud.retrieve($scope.idlClass, $scope.recordId).then(function(r) {
@@ -161,6 +162,9 @@ angular.module('egFmRecordEditorMod',
                             if (arguments.length == 1) $scope.rec[field.name](org.id());
                             return egCore.org.get($scope.rec[field.name]());
                         }
+                        if ($scope.rec[field.name]()) {
+                            $scope.rec_org_values[field.name] = $scope.rec_orgs[field.name]();
+                        }
                     }
                 });
                 return fields.filter(function(field) { return !(field.name in $scope.hidden) });

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

Summary of changes:
 .../templates/staff/share/t_fm_record_editor.tt2   |    4 ++--
 .../ui/default/staff/services/fm_record_editor.js  |    4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list