From 554e7a1a720fae53fedbbf8fa0e1f953211bc16c Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 15 Oct 2018 11:43:33 -0400 Subject: [PATCH] LP#1797923 Browser client iframe initial loading page Apply a default value to the browser client iframe URL so the iframe does not attempt to load a copy of the current page. The default value points to a simple loading page, displying "Loading..." plus our standard spinny gif. Progress gif copied from web/opac/images/ to web/images/ to avoid dependence on the old opac directory. Signed-off-by: Bill Erickson Signed-off-by: Jason Boyer Signed-off-by: Galen Charlton --- Open-ILS/src/templates/staff/loading.tt2 | 9 ++++++++ .../src/templates/staff/share/t_eframe.tt2 | 7 ++++-- Open-ILS/web/images/progressbar_green.gif | Bin 0 -> 2767 bytes .../js/ui/default/staff/services/eframe.js | 20 ++++++++++++++++++ 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 Open-ILS/src/templates/staff/loading.tt2 create mode 100644 Open-ILS/web/images/progressbar_green.gif diff --git a/Open-ILS/src/templates/staff/loading.tt2 b/Open-ILS/src/templates/staff/loading.tt2 new file mode 100644 index 0000000000..5ce03522b1 --- /dev/null +++ b/Open-ILS/src/templates/staff/loading.tt2 @@ -0,0 +1,9 @@ + + +
+ [% l('Loading...') %] + +
+ + diff --git a/Open-ILS/src/templates/staff/share/t_eframe.tt2 b/Open-ILS/src/templates/staff/share/t_eframe.tt2 index 8bb274d8e6..1a117fade6 100644 --- a/Open-ILS/src/templates/staff/share/t_eframe.tt2 +++ b/Open-ILS/src/templates/staff/share/t_eframe.tt2 @@ -1,11 +1,14 @@
- +
diff --git a/Open-ILS/web/images/progressbar_green.gif b/Open-ILS/web/images/progressbar_green.gif new file mode 100644 index 0000000000000000000000000000000000000000..f864d5fd38b7466c76b5a36dc0e3e9455c0126e2 GIT binary patch literal 2767 zcmeH``%_bA0*1eHPVNawNVtR;Fkp-nQj8edfS`v<5L7TgR6wi;WfgH-0}4fE+c_uU zB6tf6auF}FAcDdgg|bMU&H)LR5jARM!8$tuwd$nHqS?K-=JNZ+yGv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l!uHq;&?~JO{eE+A2KSSD)s8v&CiV$kV$A=DG@i z;6JY7z*8oPdj@bbJQoTAENW#ls(ucbGA#yhN>zbWqBTbLl>rGqOAY+` z=psSt8VQE=9+X8^$l@oeDzRvja79ry3nvLcOR7+)bIFyJVoz4}URM-47_u>V zY*^e(o`?|l++*Y0uQ#&dKapW1o?J{jx+*_gKV^cW+W87KI7hZ5viXv$$=1IR^Z~yA XWBrHU7iSEP8X8hQyAJO{V6g1pwSv80 literal 0 HcmV?d00001 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 5096165f75..bf27b88c20 100644 --- a/Open-ILS/web/js/ui/default/staff/services/eframe.js +++ b/Open-ILS/web/js/ui/default/staff/services/eframe.js @@ -111,6 +111,26 @@ angular.module('egCoreMod') var page = $scope.iframe.contentWindow.location.href; console.debug('egEmbedFrameLoader(): ' + page); + if (page.match(/eg\/staff\/loading$/)) { // loading page + + // If we have a startup-time URL, apply it now. + if ($scope.url) { + console.debug('Applying initial URL: ' + $scope.url); + iframe.contentWindow.location.href = $scope.url; + } + + // Watch for future URL changes + $scope.$watch('url', function(newVal, oldVal) { + if (newVal && newVal != oldVal) { + iframe.contentWindow.location.href = newVal; + } + }); + + // Nothing more is needed until the iframe is + // loaded once more with a real URL. + return; + } + // reload ifram page w/o reloading the entire UI $scope.reload = function() { $scope.iframe.contentWindow.location.replace( -- 2.43.2