#acq-lit-li-details-table th {padding:0px 3px 1px 3px; font-weight:bold;}
#acq-lit-li-details-table .dijit {width:130px;}
#acq-lit-li-details-table td input {width:100px;}
-.acq-lit-note-textarea div { padding: 2px 5px 2px 5px; }
+.acq-lit-note-textarea { border-right: 2px solid #aaa; width:50%;}
+.acq-lit-note-textarea div { padding: 4px; font-weight: bold; }
+#acq-lit-notes-tbody td {padding: 20px 10px 20px 10px; border-bottom:2px solid #aaa;}
.acq-lit-li-menu-bar {width:99%; text-align:left; border:1px solid #aaa; margin:5px 0px 10px 0px;}
.acq-lit-table-spacer { height:20px; }
.acq-lit-row td[name="selector"] { width:1.5em; font-weight:bold; color:blue; font-size:110%;}
+
this.addLineitem = function(li) {
this.liCache[li.id()] = li;
- // sort the lineitem notes on create_time
- if(li.lineitem_notes()) {
- li.lineitem_notes(
- li.lineitem_notes().sort(
- function(a, b) {
- if(a.create_time() < b.create_time()) return 1;
- return -1;
- }
- )
- );
- } else {
- li.lineitem_notes([]);
- }
+ // sort the lineitem notes on edit_time
+ if(!li.lineitem_notes()) li.lineitem_notes([]);
var liWrapper = new openils.acq.Lineitem({lineitem:li});
var row = self.rowTemplate.cloneNode(true);
this.drawLiNotes = function(li) {
var self = this;
+ li.lineitem_notes(
+ li.lineitem_notes().sort(
+ function(a, b) {
+ if(a.edit_time() < b.edit_time()) return 1;
+ return -1;
+ }
+ )
+ );
+
while(this.liNotesTbody.childNodes[0])
this.liNotesTbody.removeChild(this.liNotesTbody.childNodes[0]);
this.show('notes');
</table>
</div>
- <table class='oils-generic-table'>
+ <table class='oils-generic-table' style='width:90%;'>
<thead><tr>
+ <th>Note</th>
<th>Creator</th>
<th>Create Time</th>
<th>Editor</th>
<th>Edit Time</th>
- <th>Value</th>
<th/>
</tr></thead>
<tbody id='acq-lit-notes-tbody'>
<tr id='acq-lit-notes-row'>
+ <td class='acq-lit-note-textarea'><div name='value'/></td>
<td><div name='creator'/></td>
<td><div name='create_time'/></td>
<td><div name='editor'/></td>
<td><div name='edit_time'/></td>
- <td class='acq-lit-note-textarea'><div name='value'/></td>
<td><div name='delete' dojoType='dijit.form.Button' style='color:red;'>X</div></td>
</tr>
</tbody>