show newest checkouts first in the items out lists
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Aug 2008 14:37:18 +0000 (14:37 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Aug 2008 14:37:18 +0000 (14:37 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10451 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/extras/selfcheck/selfcheck.js
Open-ILS/web/opac/extras/selfcheck/selfcheck.xml

index 71ea3f8..582d647 100644 (file)
@@ -343,7 +343,8 @@ function selfckDislplayCheckout(evt) {
         unHideMe($n(template, 'selfck.cotype_rn'));
     }
 
-    $('selfck-items-out-tbody').appendChild(template);
+    var tbody = $('selfck-items-out-tbody');
+    tbody.insertBefore(template, tbody.getElementsByTagName('tr')[0]);
     $('selfck-item-barcode-input').value = '';
 
 
@@ -352,7 +353,7 @@ function selfckDislplayCheckout(evt) {
     $n(ptemplate, 'title').appendChild(text(record.title()));
     $n(ptemplate, 'barcode').appendChild(text(copy.barcode()));
     $n(ptemplate, 'due_date').appendChild(text(circ.due_date().replace(/T.*/,'')));
-    printWrapper.appendChild(ptemplate);
+    printWrapper.insertBefore(ptemplate, printWrapper.getElementsByTagName('li')[0]);
 
     pendingXact = false;
 }
index 23f1d3d..658c9a6 100644 (file)
                                     <span name='selfck.cotype_rn' class='hide_me'>&selfck.cotype_rn;</span>
                                 </td>
                             </tr>
+                            <tr class='hide_me'> </tr>
                         </tbody>
                     </table>
                     <div id='selfck-items-out-done-div'>
                     <span id='selfck-print-lib-addr-post-code'/>
                 </div>
                 <br/>
-                <div><span id='selfck-print-lname'/>, <span id='selfck-print-fname'/></div>
-                &selfck.items_out;
-                <ol id='selfck-print-items-list'>
-                    <li name='selfck-print-items-template'>
-                        <div name='title'/>
-                        &selfck.barcode;: <span name='barcode'/>
-                        &selfck.due_date;: <span name='due_date'/>
-                    </li>
-                </ol>
+                <div id='selfck-print-patron-info'>
+                    <div><span id='selfck-print-lname'/>, <span id='selfck-print-fname'/></div>
+                    &selfck.items_out;
+                    <ol id='selfck-print-items-list'>
+                        <li name='selfck-print-items-template'>
+                            <div name='title'/>
+                            &selfck.barcode;: <span name='barcode'/>
+                            &selfck.due_date;: <span name='due_date'/>
+                        </li>
+                        <li class='hide_me'> </li>
+                    </ol>
+                </div>
                 <br/>
                 <div>&selfck.org_phone; <span id='selfck-print-lib-phone'/></div>
                 <br/>
                 <div>
                     <div>&selfck.org_hours;</div>
-                    <table>
+                    <table id='selfck-print-hours'>
                         <tr><td>&selfck.day0;</td><td id='selfck-print-dow_0_open'/><td id='selfck-print-dow_0_close'/></tr>
                         <tr><td>&selfck.day1;</td><td id='selfck-print-dow_1_open'/><td id='selfck-print-dow_1_close'/></tr>
                         <tr><td>&selfck.day2;</td><td id='selfck-print-dow_2_open'/><td id='selfck-print-dow_2_close'/></tr>