From 7a0831b6452ee34dcedc93d02abd33661ec45255 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Wed, 11 Mar 2015 16:56:23 -0400 Subject: [PATCH] webstaff: Allow UIs wrapping the opac to call functions in the opac iframe Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton --- Open-ILS/web/js/ui/default/staff/cat/catalog/app.js | 9 +++++++++ 1 file changed, 9 insertions(+) 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); -- 2.11.0