LP#1673870: add support for cache-busting
authorGalen Charlton <gmc@equinoxinitiative.org>
Thu, 31 Aug 2017 15:49:08 +0000 (11:49 -0400)
committerBill Erickson <berickxx@gmail.com>
Fri, 1 Sep 2017 20:06:50 +0000 (16:06 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
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/src/templates/opac/parts/ebook_api/base_js.tt2
Open-ILS/src/templates/opac/parts/record/summary.tt2
Open-ILS/src/templates/opac/parts/result/table.tt2

index b48835d..789ad13 100644 (file)
@@ -13,7 +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_spinner"><img src="[% ctx.media_prefix %]/opac/images/progressbar_green.gif[% ctx.cache_key %]" alt="[% l("Loading...") %]"/></div>
     <div id='ebook_circs_main' class="hidden">
         <table id="ebook_circs_main_table"
             title="[% l('Check Out E-Item') %]"
index 0e97f8e..be1912c 100644 (file)
@@ -24,7 +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_spinner"><img src="[% ctx.media_prefix %]/opac/images/progressbar_green.gif[% ctx.cache_key %]" 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 7914639..f862ed6 100644 (file)
@@ -33,7 +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_spinner"><img src="[% ctx.media_prefix %]/opac/images/progressbar_green.gif[% ctx.cache_key %]" alt="[% l("Loading...") %]"/></div>
     <div id='ebook_holds_main' class="hidden">
         <table id="ebook_holds_main_table"
             title="[% l('E-Items on Hold') %]"
index 807357c..55806d5 100644 (file)
@@ -31,7 +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_spinner"><img src="[% ctx.media_prefix %]/opac/images/progressbar_green.gif[% ctx.cache_key %]" 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 7e7d5d9..cefea21 100644 (file)
@@ -14,7 +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_spinner"><img src="[% ctx.media_prefix %]/opac/images/progressbar_green.gif[% ctx.cache_key %]" 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 bcff091..d5ba0f4 100644 (file)
@@ -90,6 +90,6 @@ dojo.addOnLoad(function() {
 [%- END %]
 
 [%- IF (ctx.page == 'rresult' OR ctx.page == 'record') %]
-<script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/opac/ebook_api/avail.js"></script>
+<script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/opac/ebook_api/avail.js[% ctx.cache_key %]"></script>
 [%- END %]
 
index f893cf6..d26810d 100644 (file)
             <div id="[%- ctx.bre_id -%]_ebook_checkout" class="rdetail_aux_utils ebook_action hidden">
                 <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_checkout',
                     {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'checkout'}, stop_parms) %]"
-                class="no-dec" rel="nofollow" vocab=""><img src="[% ctx.media_prefix %]/images/green_check.png"
+                class="no-dec" rel="nofollow" vocab=""><img src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
                     [% img_alt(l('Check Out [_1]', attrs.title)) %]/>
                 <span class="place_hold">[% l('Check Out E-Item') %]</span></a>
             </div>
             <div id="[%- ctx.bre_id -%]_ebook_place_hold" class="rdetail_aux_utils ebook_action hidden">
                 <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_place_hold',
                     {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'place_hold'}, stop_parms) %]"
-                class="no-dec" rel="nofollow" vocab=""><img src="[% ctx.media_prefix %]/images/green_check.png"
+                class="no-dec" rel="nofollow" vocab=""><img src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
                     [% img_alt(l('Place Hold on [_1]', attrs.title)) %]/>
                 <span class="place_hold">[% l('Place Hold on E-Item') %]</span></a>
             </div>
index 35dc615..ae77275 100644 (file)
@@ -404,7 +404,7 @@ END;
                                                                 ['query','tag','subfield','term','_special','sort','page']) %]"
                                                                 [% html_text_attr('title', l('Check Out [_1]', attrs.title)) %]
                                                                     class="no-dec" rel="nofollow" vocab=""><img
-                                                                src="[% ctx.media_prefix %]/images/green_check.png"
+                                                                src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
                                                                 alt=""/><span class="result_place_hold">[% l('Check Out E-Item') %]</span></a>
                                                         </div>
                                                         <div id="[%- rec.id -%]_ebook_place_hold" class="results_aux_utils result_util ebook_action hidden">
@@ -413,7 +413,7 @@ END;
                                                                 ['query','tag','subfield','term','_special','sort','page']) %]"
                                                                 [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
                                                                     class="no-dec" rel="nofollow" vocab=""><img
-                                                                src="[% ctx.media_prefix %]/images/green_check.png"
+                                                                src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
                                                                 alt=""/><span class="result_place_hold">[% l('Place Hold on E-Item') %]</span></a>
                                                         </div>
                                                         [%- END -%]