[open-ils-commits] [GIT] Evergreen ILS branch rel_3_1 updated. 0fa9513e9aea21e03cee838a397493877100eeb0

Evergreen Git git at git.evergreen-ils.org
Wed Oct 24 12:19:37 EDT 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_3_1 has been updated
       via  0fa9513e9aea21e03cee838a397493877100eeb0 (commit)
      from  85f9086b9ff9c2363271243da30ae843040a73e4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0fa9513e9aea21e03cee838a397493877100eeb0
Author: Bill Erickson <berickxx at gmail.com>
Date:   Mon Oct 15 11:43:33 2018 -0400

    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 <berickxx at gmail.com>
    Signed-off-by: Jason Boyer <jboyer at library.in.gov>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/templates/staff/loading.tt2 b/Open-ILS/src/templates/staff/loading.tt2
new file mode 100644
index 0000000..5ce0352
--- /dev/null
+++ b/Open-ILS/src/templates/staff/loading.tt2
@@ -0,0 +1,9 @@
+<html>
+  <body>
+    <div style="width:100%; padding: 20px; text-align:center">
+      [% l('Loading...') %]
+      <img src="[% ctx.media_prefix %]/images/progressbar_green.gif"
+        title="[% l('Page Loading') %]"/>
+    </div>
+  </body>
+</html>
diff --git a/Open-ILS/src/templates/staff/share/t_eframe.tt2 b/Open-ILS/src/templates/staff/share/t_eframe.tt2
index 8bb274d..1a117fa 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 @@
 <div class="eg-embed-frame">
   <button type="button" class="btn btn-default btn-xs" ng-show="allowEscape &&  showIframe" ng-click="escapeEmbed()">[% l('Open in New Window') %]</button>
   <button type="button" class="btn btn-default btn-xs" ng-show="allowEscape && !showIframe" ng-click="restoreEmbed()">[% l('Re-embed') %]</button>
-  <!-- height is calculated at render time -->
+  <!--
+    'src' is replaced by the controller, after linking, and as soon as a
+    value is available.  height is calculated at render time.
+  -->
   <iframe 
     ng-show="showIframe"
     ng-attr-style="{{ autoresize ? undefined : 'height:' + height + 'px' }}"
-    src="{{url}}">
+    src="/eg/staff/loading">
   </iframe>
 </div>
 
diff --git a/Open-ILS/web/images/progressbar_green.gif b/Open-ILS/web/images/progressbar_green.gif
new file mode 100644
index 0000000..f864d5f
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 5096165..bf27b88 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(

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/templates/staff/loading.tt2           |    9 +++++++++
 Open-ILS/src/templates/staff/share/t_eframe.tt2    |    7 +++++--
 .../web/{opac => }/images/progressbar_green.gif    |  Bin 2767 -> 2767 bytes
 .../web/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
 copy Open-ILS/web/{opac => }/images/progressbar_green.gif (100%)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list