have egRecordHtml watch for chagnes to the MARC XML
authorGalen Charlton <gmc@esilibrary.com>
Tue, 28 Jul 2015 15:06:36 +0000 (15:06 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 28 Jul 2015 21:09:04 +0000 (21:09 +0000)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/web/js/ui/default/staff/cat/services/record.js

index a67cb87..4adfe6c 100644 (file)
@@ -60,6 +60,13 @@ angular.module('egCoreMod')
                         }
                     }
                 );
+                $scope.$watch('marcXml', 
+                    function(newVal, oldVal) {
+                        if (newVal && newVal !== oldVal) {
+                            loadRecordHtml();
+                        }
+                    }
+                );
 
                 if ($scope.recordId || $scope.marcXml) 
                     loadRecordHtml();