webstaff: have egRecordHtml watch for changes to the MARC XML
authorGalen Charlton <gmc@esilibrary.com>
Tue, 28 Jul 2015 15:06:36 +0000 (15:06 +0000)
committerJason Stephenson <jstephenson@mvlc.org>
Wed, 19 Aug 2015 17:39:20 +0000 (13:39 -0400)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
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();