Give ebook dashboard row a distinct id, and hide it until/unless we have totals to... master
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Thu, 8 Jun 2017 16:28:40 +0000 (09:28 -0700)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Thu, 8 Jun 2017 16:28:40 +0000 (09:28 -0700)
src/od_pages_myopac.coffee

index 5bac8da..f16013c 100644 (file)
@@ -24,14 +24,14 @@ define [
                _dashboard: (x) ->
 
                        if arguments.length is 0
-                               @append $('<div id="dashboard">')
+                               @append $('<div id="dash2" class="dashboard hidden">')
 
                        else
                                # Add a new dashboard for to show counts of e-items; start with
                                # zero counts
                                base = '/eg/opac/myopac'
-                               @find 'div'
-                                       .eq 2
+                               @find '#dash2'
+                                       .removeClass("hidden")
                                        .append """
                                        <span class="dash-align">
                                                <a class="dash-link" href="#{base}/circs?e_items"><span class="ncheckouts" id="dash_checked">0</span> E-items Checked Out</a>