[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 5f5d7abb92d2f09f6e2a9ae71911918623215853

Evergreen Git git at git.evergreen-ils.org
Mon Jul 11 14:53:58 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_1 has been updated
       via  5f5d7abb92d2f09f6e2a9ae71911918623215853 (commit)
      from  f6c4d663986df4968640dff0bdbedd2e48fc15cf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5f5d7abb92d2f09f6e2a9ae71911918623215853
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Mon Jul 11 15:09:34 2011 -0400

    append line items to table in specified order
    
    Prior to this patch, the order that line items were displayed
    in (e.g.) a purchase order view was effetively randomized based
    on the amount of time it would take for async calls to fetch
    additional line item details to return.
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js
index 15679ba..4068294 100644
--- a/Open-ILS/web/js/ui/default/acq/common/li_table.js
+++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js
@@ -253,11 +253,19 @@ function AcqLiTable() {
     this.addLineitem = function(li, skip_final_placement) {
         this.liCache[li.id()] = li;
 
+        // insert the row right away so that final order isn't
+        // dependent on how long subsequent async request take
+        // for a given line item
+        var row = self.rowTemplate.cloneNode(true);
+        if (!skip_final_placement) {
+            self.tbody.appendChild(row);
+            self.selectors.push(dojo.query('[name=selectbox]', row)[0]);
+        }
+
         // 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);
         row.setAttribute('li', li.id());
         var tds = dojo.query('[attr]', row);
         dojo.forEach(tds, function(td) {self.setRowAttr(td, liWrapper, td.getAttribute('attr'), td.getAttribute('attr_type'));});
@@ -360,10 +368,7 @@ function AcqLiTable() {
         // show either "mark received" or "unreceive" as appropriate
         this.updateLiState(li, row);
 
-        if (!skip_final_placement) {
-            self.tbody.appendChild(row);
-            self.selectors.push(dojo.query('[name=selectbox]', row)[0]);
-        } else {
+        if (skip_final_placement) {
             return row;
         }
     };

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/js/ui/default/acq/common/li_table.js |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list