LP#1673870: show spinner in My Account while loading from ebook API
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Fri, 18 Aug 2017 20:35:09 +0000 (13:35 -0700)
committerBill Erickson <berickxx@gmail.com>
Fri, 1 Sep 2017 20:06:50 +0000 (16:06 -0400)
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/templates/opac/myopac/ebook_checkout.tt2
Open-ILS/src/templates/opac/myopac/ebook_circs.tt2
Open-ILS/src/templates/opac/myopac/ebook_holds.tt2
Open-ILS/src/templates/opac/myopac/ebook_holds_ready.tt2
Open-ILS/src/templates/opac/myopac/ebook_place_hold.tt2
Open-ILS/web/js/ui/default/opac/ebook_api/loggedin.js

index 2b38da3..b48835d 100644 (file)
@@ -13,6 +13,7 @@
     <div class="clear-both"></div>
     <div id="ebook_checkout_failed" class="warning_box hidden">[% l('E-item could not be checked out.') %]</div>
     <div id="ebook_checkout_succeeded" class="success hidden">[% l('E-item successfully checked out.') %]</div>
+    <div id="ebook_spinner"><img src="/opac/images/progressbar_green.gif" alt="[% l("Loading...") %]"/></div>
     <div id='ebook_circs_main' class="hidden">
         <table id="ebook_circs_main_table"
             title="[% l('Check Out E-Item') %]"
index 1bee6e7..0e97f8e 100644 (file)
@@ -24,6 +24,7 @@
     </div>
     <div class="clear-both"></div>
     <div id="no_ebook_circs" class="warning_box hidden">[% l('You have no e-items checked out.') %]</div>
+    <div id="ebook_spinner"><img src="/opac/images/progressbar_green.gif" alt="[% l("Loading...") %]"/></div>
     <div id='ebook_circs_main' class="hidden">
         <table id="ebook_circs_main_table"
             title="[% l('E-Items Currently Checked Out') %]"
index 1a77a71..7914639 100644 (file)
@@ -33,6 +33,7 @@
     <div id="no_ebook_holds" class="warning_box hidden">[% l('You have no e-item holds.') %]</div>
     <div id="ebook_cancel_hold_failed" class="warning_box hidden">[% l('Hold could not be canceled.') %]</div>
     <div id="ebook_cancel_hold_succeeded" class="success hidden">[% l('Your hold has been canceled.') %]</div>
+    <div id="ebook_spinner"><img src="/opac/images/progressbar_green.gif" alt="[% l("Loading...") %]"/></div>
     <div id='ebook_holds_main' class="hidden">
         <table id="ebook_holds_main_table"
             title="[% l('E-Items on Hold') %]"
index 006c986..807357c 100644 (file)
@@ -31,6 +31,7 @@
     </div>
     <div class="clear-both"></div>
     <div id="no_ebook_holds" class="warning_box hidden">[% l('You have no e-item holds ready to be checked out.') %]</div>
+    <div id="ebook_spinner"><img src="/opac/images/progressbar_green.gif" alt="[% l("Loading...") %]"/></div>
     <div id='ebook_holds_main' class="hidden">
         <table id="ebook_holds_main_table"
             title="[% l('E-Items Ready for Checkout') %]"
index 6cdbc54..7e7d5d9 100644 (file)
@@ -14,6 +14,7 @@
     <div class="clear-both"></div>
     <div id="ebook_place_hold_failed" class="warning_box hidden">[% l('Hold could not be placed.') %]</div>
     <div id="ebook_place_hold_succeeded" class="success hidden">[% l('E-item is now on hold.') %]</div>
+    <div id="ebook_spinner"><img src="/opac/images/progressbar_green.gif" alt="[% l("Loading...") %]"/></div>
     <div id='ebook_holds_main' class="hidden">
         <table id="ebook_holds_main_table"
             title="[% l('Place Hold on E-Item') %]"
index 56846bc..335cecf 100644 (file)
@@ -67,6 +67,7 @@ function addTransactionsToPage() {
     if (active_ebook && typeof active_ebook.vendor !== 'undefined') {
         active_ebook.ses = active_ebook.ses || dojo.cookie(active_ebook.vendor);
     }
+    dojo.addClass('ebook_spinner', "hidden");
     if (myopac_page) {
         console.log('updating page with cached transaction details, if applicable');
         if (myopac_page === 'ebook_circs')