LP#1673870: display ebook availability when detailed holdings info is unavailable
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Mon, 14 Aug 2017 21:03:59 +0000 (14:03 -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/web/js/ui/default/opac/ebook_api/avail.js

index b65bf87..b822602 100644 (file)
@@ -19,8 +19,10 @@ dojo.addOnLoad(function() {
                             var avail = holdings.available;
                             if (avail == 1) {
                                 node.innerHTML = 'This title is available online.';
+                                dojo.removeClass(ebook.rec_id + '_ebook_checkout', "hidden");
                             } else if (avail == 0) {
                                 node.innerHTML = 'This title is not currently available.';
+                                dojo.removeClass(ebook.rec_id + '_ebook_place_hold', "hidden");
                             } else {
                                 console.log(ebook.id + ' has bad availability: ' + avail);
                             }