From: Galen Charlton Date: Mon, 27 Jul 2015 17:14:06 +0000 (+0000) Subject: webstaff: teach eg-record-html how to initialize itself from MARCXML X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fed54a5be0a5b90f7a20febaab9825139c3a13c9;p=evergreen%2Fmasslnc.git webstaff: teach eg-record-html how to initialize itself from MARCXML Signed-off-by: Galen Charlton Signed-off-by: Jason Stephenson --- diff --git a/Open-ILS/web/js/ui/default/staff/cat/services/record.js b/Open-ILS/web/js/ui/default/staff/cat/services/record.js index 6f79a70b43..a67cb87a10 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/services/record.js +++ b/Open-ILS/web/js/ui/default/staff/cat/services/record.js @@ -1,7 +1,9 @@ /** - * Simple directive for rending the HTML view of a bib record. + * Simple directive for rending the HTML view of a MARC record. * * + * OR + * * * The value of myRecordIdScopeVariable is watched internally and the * record is updated to match. @@ -11,7 +13,10 @@ angular.module('egCoreMod') .directive('egRecordHtml', function() { return { restrict : 'AE', - scope : {recordId : '='}, + scope : { + recordId : '=', + marcXml : '@', + }, link : function(scope, element, attrs) { scope.element = angular.element(element); @@ -28,7 +33,9 @@ angular.module('egCoreMod') egCore.net.request( 'open-ils.search', 'open-ils.search.biblio.record.html', - $scope.recordId + $scope.recordId, + false, + $scope.marcXml ).then(function(html) { if (!html) return; @@ -54,7 +61,7 @@ angular.module('egCoreMod') } ); - if ($scope.recordId) + if ($scope.recordId || $scope.marcXml) loadRecordHtml(); } ]