From 83491bb1f633f9d1dd335251cb651a1d0c882e32 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 18 Jul 2014 11:27:30 -0400 Subject: [PATCH] move eframe to external; copy detail link for catalog Signed-off-by: Bill Erickson --- .../src/templates/opac/parts/record/copy_table.tt2 | 7 ++++++- Open-ILS/src/templates/staff/css/style.css.tt2 | 3 +++ Open-ILS/src/templates/staff/share/t_eframe.tt2 | 9 +++++++++ Open-ILS/web/js/ui/default/staff/services/eframe.js | 21 ++++++++++++++++----- 4 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 Open-ILS/src/templates/staff/share/t_eframe.tt2 diff --git a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 index 3ae8504378..578be9f641 100644 --- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 @@ -104,8 +104,13 @@ END; # FOREACH bib [%- END %] [%- IF ctx.is_staff -%] + [%- IF ctx.is_browser_staff %] + [% copy_info.barcode | html %] + [% ELSE %] [% copy_info.barcode | html %] - [%- ELSE -%][% copy_info.barcode | html %] + [%- END -%] + [%- ELSE -%] + [% copy_info.barcode | html %] [%- END -%] [%- IF attrs.gtin13; ''; diff --git a/Open-ILS/src/templates/staff/css/style.css.tt2 b/Open-ILS/src/templates/staff/css/style.css.tt2 index 0a8becf37b..9f817354af 100644 --- a/Open-ILS/src/templates/staff/css/style.css.tt2 +++ b/Open-ILS/src/templates/staff/css/style.css.tt2 @@ -172,6 +172,9 @@ table.list tr.selected td { /* deprecated? */ /* embedded UI iframe */ .eg-embed-frame { width: 100%; +} +.eg-embed-frame iframe { + width: 100%; border: none; margin: 0px; padding: 0px; diff --git a/Open-ILS/src/templates/staff/share/t_eframe.tt2 b/Open-ILS/src/templates/staff/share/t_eframe.tt2 new file mode 100644 index 0000000000..8fc95ca6c6 --- /dev/null +++ b/Open-ILS/src/templates/staff/share/t_eframe.tt2 @@ -0,0 +1,9 @@ +
+ + +
+ diff --git a/Open-ILS/web/js/ui/default/staff/services/eframe.js b/Open-ILS/web/js/ui/default/staff/services/eframe.js index 7e18246270..d4c01763c0 100644 --- a/Open-ILS/web/js/ui/default/staff/services/eframe.js +++ b/Open-ILS/web/js/ui/default/staff/services/eframe.js @@ -19,12 +19,11 @@ angular.module('egCoreMod') onchange : '=' }, - template : '', + templateUrl : './share/t_eframe', controller : - ['$scope','$window','$location','$q','egCore', - function($scope , $window , $location , $q , egCore) { + ['$scope','$window','$location','$q','$timeout','egCore', + function($scope , $window , $location , $q , $timeout , egCore) { // Set the iframe height to just under the window height. // leave room for the navbar, padding, margins, etc. @@ -67,7 +66,17 @@ angular.module('egCoreMod') var page = iframe.contentWindow.location.href; console.debug('egEmbedFrameLoader(): ' + page); - if ($scope.onchange) $scope.onchange(page); + + $scope.prev_page = function() { + iframe.contentWindow.history.back(); + } + $scope.reload_page = function() { + iframe.contentWindow.location.replace( + iframe.contentWindow.location); + } + $scope.next_page = function() { + iframe.contentWindow.history.forward(); + } // tell the iframe'd window its inside the staff client iframe.contentWindow.IAMXUL = true; @@ -195,6 +204,8 @@ angular.module('egCoreMod') iframe.contentWindow.xulG[key] = val; }); } + + if ($scope.onchange) $scope.onchange(page); } }] } -- 2.11.0