[open-ils-commits] r15616 - trunk/Open-ILS/web/js/ui/default/acq/common (senator)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Feb 22 15:20:28 EST 2010


Author: senator
Date: 2010-02-22 15:20:23 -0500 (Mon, 22 Feb 2010)
New Revision: 15616

Modified:
   trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
Log:
Acq: Fix sorting bug in rev 15614 when use_count >= 10


Modified: trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js	2010-02-22 20:16:00 UTC (rev 15615)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js	2010-02-22 20:20:23 UTC (rev 15616)
@@ -772,9 +772,10 @@
     this._labelFormulasWithCounts = function(store_data) {
         for (var key in store_data.items) {
             var obj = store_data.items[key];
+            obj.use_count = Number(obj.use_count); /* needed for sorting */
 
             if (this.dfaCache[obj.id])
-                obj.use_count = Number(obj.use_count) + this.dfaCache[obj.id];
+                obj.use_count = obj.use_count + Number(this.dfaCache[obj.id]);
 
             obj.dynLabel = "<span class='acq-lit-distrib-form-use-count'>[" +
                 obj.use_count + "]</span>&nbsp; " + obj.name;



More information about the open-ils-commits mailing list