JBAS-1705 New heading does not fire at load
authorBill Erickson <berickxx@gmail.com>
Mon, 23 Jan 2017 16:25:11 +0000 (11:25 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Avoid starting the report until the user has initiated the report.
Report date range defaults to yesterday.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/templates/cat/authority/new_headings.tt2
Open-ILS/web/js/ui/default/cat/authority/new_headings.js

index c51ab81..9060e45 100644 (file)
 
 <div id='below-nav-div'>
 
-  <div id='loading-indicator'>
+  <div id='loading-indicator' class="hidden">
     Loading page <span id='ind-page'></span>...
     <img src='/opac/images/progressbar_green.gif'/>
   </div>
 
-  <div id='zero-hits'>
+  <div id='zero-hits' class="hidden">
     No new headings were found for the date range specified
   </div>
 
index af98393..bb2e18a 100644 (file)
@@ -75,7 +75,11 @@ function load() {
         load_headings(true); // reset 
     }
 
-    load_headings(true);
+    // seed the report date with yesterday's date.
+    var initDate = new Date();
+    initDate.setDate(initDate.getDate() - 1);
+    startDate.attr('value', initDate);
+    endDate.attr('value', initDate);
 }
 
 // Fetch headings.