Fix bill selection in the billing interface
authorJason Etheridge <jason@esilibrary.com>
Tue, 10 Apr 2012 16:57:16 +0000 (12:57 -0400)
committerJason Etheridge <jason@esilibrary.com>
Tue, 10 Apr 2012 17:32:06 +0000 (13:32 -0400)
We were looking for the checkbox column to be the first treecell in a treerow,
but the ever-present line number column now takes up that position.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/xul/staff_client/server/patron/bill2.js

index 5b98508..2507345 100644 (file)
@@ -516,7 +516,7 @@ function init_lists() {
             var treeItem = g.bill_list.node.contentView.getItemAtIndex(row.value);
             if (treeItem.nodeName != 'treeitem') return;
             var treeRow = treeItem.firstChild;
-            var treeCell = treeRow.firstChild;
+            var treeCell = treeRow.firstChild.nextSibling;
             if (g.check_map[ treeItem.getAttribute('retrieve_id') ] != (treeCell.getAttribute('value') == 'true')) {
                 g.check_map[ treeItem.getAttribute('retrieve_id') ] = treeCell.getAttribute('value') == 'true';
                 g.row_map[ treeItem.getAttribute('retrieve_id') ].row.my.checked = treeCell.getAttribute('value') == 'true';