Vandelay: show record match counts in record queue UI
authorBill Erickson <berick@esilibrary.com>
Fri, 12 Aug 2011 13:07:35 +0000 (09:07 -0400)
committerMike Rylander <mrylander@gmail.com>
Tue, 23 Aug 2011 18:38:15 +0000 (14:38 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/web/js/ui/default/vandelay/vandelay.js

index 48423c5..75da815 100644 (file)
@@ -682,14 +682,17 @@ function vlGetViewMatches(rowIdx, item) {
         var id = this.grid.store.getValue(item, 'id');
         var rec = queuedRecordsMap[id];
         if(rec.matches().length > 0)
-            return id;
+            return id + ':' + rec.matches().length;
     }
     return -1
 }
 
 function vlFormatViewMatches(id) {
     if(id == -1) return '';
-    return '<a href="javascript:void(0);" onclick="vlLoadMatchUI(' + id + ');">' + this.name + '</a>';
+    var chunks = id.split(':');
+    id = chunks[0];
+    count = chunks[1];
+    return '<a href="javascript:void(0);" onclick="vlLoadMatchUI(' + id + ');">' + this.name + ' (' + count + ')</a>';
 }
 
 function vlGetViewErrors(rowIdx, item) {