From: Jason Etheridge <jason@esilibrary.com>
Date: Thu, 22 Mar 2012 05:54:20 +0000 (-0400)
Subject: Fix ordinal column with multiple lists
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4ec1d1489bc6978354dbb0cbd2c2478d4559f077;p=evergreen%2Fmasslnc.git

Fix ordinal column with multiple lists

Before this fix, if more than one util.list powered list existed within a given
document/window, they would each intefere with the other's ordinal column.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
---

diff --git a/Open-ILS/xul/staff_client/chrome/content/util/list.js b/Open-ILS/xul/staff_client/chrome/content/util/list.js
index 6dcc3593c6..ef4c96faf2 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/list.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/list.js
@@ -803,7 +803,7 @@ util.list.prototype = {
         try {
             setTimeout( // Otherwise we can miss a row just added
                 function() {
-                    var nl = document.getElementsByAttribute('label','_');
+                    var nl = obj.node.getElementsByAttribute('label','_');
                     for (var i = 0; i < nl.length; i++) {
                         nl[i].setAttribute(
                             'ord_col',
@@ -814,7 +814,7 @@ util.list.prototype = {
                             'ordinal'
                         );
                     }
-                    nl = document.getElementsByAttribute('ord_col','true');
+                    nl = obj.node.getElementsByAttribute('ord_col','true');
                     for (var i = 0; i < nl.length; i++) {
                         nl[i].setAttribute(
                             'label',