Hide OverDrive API dashboard until/unless we have values for populating it
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Thu, 8 Jun 2017 16:23:18 +0000 (09:23 -0700)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Thu, 8 Jun 2017 16:23:18 +0000 (09:23 -0700)
overdrive-eg-opac/build/od_pages_myopac.js

index bed358e..d23e188 100644 (file)
@@ -15,10 +15,10 @@ define(['jquery-noconflict', 'lodash', 'od_config', 'jquery-ui', 'od_action', 'o
     _dashboard: function(x) {
       var base;
       if (arguments.length === 0) {
-        this.append($('<div id="dash2" class="dashboard">'));
+        this.append($('<div id="dash2" class="dashboard hidden">'));
       } else {
         base = '/eg/opac/myopac';
-        this.find('#dash2').append("<span class=\"dash-align\">\n      <a class=\"dash-link\" href=\"" + base + "/circs?e_items\"><span class=\"ncheckouts\" id=\"dash_checked\">0</span> E-items Checked Out</a>\n</span>\n<span class=\"dash_divider\">|</span>\n<span class=\"dash-align\">\n       <a class=\"dash-link\" href=\"" + base + "/holds?e_items\"><span class=\"nholds\" id=\"dash_holds\">0</span> E-items on Hold</a>\n</span>\n<span class=\"dash_divider\">|</span>\n<span class=\"dash-align\">\n <a class=\"dash-link\" href=\"" + base + "/holds?e_items&available=1\"><span class=\"nholdsready\" id=\"dash_pickup\">0</span> E-items Ready for Checkout</a>\n</span>").end().end();
+        this.find('#dash2').removeClass("hidden").append("<span class=\"dash-align\">\n        <a class=\"dash-link\" href=\"" + base + "/circs?e_items\"><span class=\"ncheckouts\" id=\"dash_checked\">0</span> E-items Checked Out</a>\n</span>\n<span class=\"dash_divider\">|</span>\n<span class=\"dash-align\">\n       <a class=\"dash-link\" href=\"" + base + "/holds?e_items\"><span class=\"nholds\" id=\"dash_holds\">0</span> E-items on Hold</a>\n</span>\n<span class=\"dash_divider\">|</span>\n<span class=\"dash-align\">\n <a class=\"dash-link\" href=\"" + base + "/holds?e_items&available=1\"><span class=\"nholdsready\" id=\"dash_pickup\">0</span> E-items Ready for Checkout</a>\n</span>").end().end();
         this.find('div').css({
           float: 'none'
         }).end();