LP#1545226 - Fix MARC Batch Editor status screen.
authorJosh Stompro <stomproj@larl.org>
Mon, 15 Feb 2016 14:24:38 +0000 (08:24 -0600)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 2 Mar 2016 19:09:59 +0000 (14:09 -0500)
This patch does the following:

  - The html table was broken, fixed the markup.
  - Added some styling to the table.
  - Added a row with total records info.
  - Fixed the progress bar popup; it now displays
    percentage completion and has a title so it is
    wide enough to do so
  - Added color to failed row (red), and to completion text (green).

To test:

[1] In the staff interface (both XUL and web), perform
    a MARC Batch Edit on a bucket that contains at least
    a few bib records.
[2] Verify that the progress dialog now displays the
    percentage completion of the batch edit; verify
    that there is now a row displaying the total number
    of records.

Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/TemplateBatchBibUpdate.pm

index 5f46799..6d75965 100644 (file)
@@ -247,8 +247,10 @@ sub show_processing_template {
             var u = new openils.User({ authtoken: authtoken });
 
             dojo.addOnLoad(function () {
-                progress_dialog.show(true);
-                progress_dialog.update({maximum:$rec_string});
+                
+                progress_dialog.update({maximum: $rec_string});
+                progress_dialog.attr("title", "MARC Batch Editor Progress......");
+                progress_dialog.show();
 
                 var interval;
                 interval = setInterval( function() {
@@ -290,30 +292,75 @@ sub show_processing_template {
 
             });
         </script>
+<style>
+table {
+    #width:100%;
+}
+table, th, td {
+    border: 1px solid black;
+    border-collapse: collapse;
+}
+th, td {
+    padding: 5px;
+    text-align: left;
+}
+table tr:nth-child(even) {
+    background-color: #eee;
+}
+table tr:nth-child(odd) {
+   background-color:#fff;
+}
+table th       {
+    background-color: black;
+    color: white;
+}
+tr#fail        {
+    color: red;
+}
+tr#processed   {
+    font-weight: bold;
+}
+div#complete_msg {
+    font-weight:bold;
+    color: green;
+    font-size: larger;
+    text-decoration: underline;
+}
+</style>
     </head>
+    
 
-    <body style="margin:10px;" class='tundra'>
+    <body style="margin:10px;font-size: 130%" class='tundra'>
         <div class="hide_me"><div dojoType="openils.widget.ProgressDialog" jsId="progress_dialog"></div></div>
 
-        <table style="width:100%; margin-top:100px;">
-            <th>
-                <td>Status</td>
-                <td>Record Count</td>
-            </th>
+        <h1>MARC Batch Editor Status</h1>
+
+        <table>
+            <tr>
+                <th>Status</th>
+                <th>Record Count</th>
+            </tr>
             <tr>
                 <td>Success</td>
                 <td id='success_count'></td>
             </tr>
-            <tr>
+            <tr id='fail'>
                 <td>Failure</td>
                 <td id='fail_count'></td>
             </tr>
-            <tr>
-                <td></td>
+            <tr id='processed' >
+                <td>Total Processed</td>
                 <td id='total_count'></td>
             </tr>
+            <tr>
+               <td></td>
+            </tr>
+            <tr>
+                <td>Total To Process</td>
+                <td>$rec_string</td>
+            </tr>
         </table>
-
+        <br>
         <div id='complete_msg'></div>
 
     </body>