From: Bill Erickson Date: Mon, 15 Oct 2018 15:43:33 +0000 (-0400) Subject: LP#1797923 Browser client iframe initial loading page X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=554e7a1a720fae53fedbbf8fa0e1f953211bc16c;p=contrib%2FConifer.git 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 --- 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 0000000000..f864d5fd38 Binary files /dev/null and b/Open-ILS/web/images/progressbar_green.gif differ 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(