From: Mike Rylander Date: Wed, 11 Mar 2015 20:56:23 +0000 (-0400) Subject: webstaff: Allow UIs wrapping the opac to call functions in the opac iframe X-Git-Tag: sprint4-merge-nov22~1173 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=261f9a496b1067382c3e5185fb2fa0f2b9049154;p=working%2FEvergreen.git webstaff: Allow UIs wrapping the opac to call functions in the opac iframe Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton Signed-off-by: Jason Stephenson --- diff --git a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js index 77a8f08eba..c6487e28a4 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/catalog/app.js @@ -125,6 +125,15 @@ function($scope , $routeParams , $location , $q , egCore , egHolds, // set record ID on page load if available... $scope.record_id = $routeParams.record_id; + if ($routeParams.record_id) $scope.from_route = true; + else $scope.from_route = false; + + // will hold a ref to the opac iframe + $scope.opac_iframe = null; + $scope.opac_call = function (thing) { + if ($scope.opac_iframe) $scope.opac_iframe.contentWindow[thing]() + } + // Set the "last bib" cookie, if we have that if ($scope.record_id) egCore.hatch.setLocalItem("eg.cat.last_record_retrieved", $scope.record_id);