From: phasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4> Date: Fri, 16 Oct 2009 01:57:55 +0000 (+0000) Subject: tree implementation changed, so we find the scrollbar elsewhere. We need the scrollb... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4a4a32e026f90c2a177d95f28e9355a2a67f366b;p=evergreen%2Fmasslnc.git tree implementation changed, so we find the scrollbar elsewhere. We need the scrollbar to figure out when a row is no longer off-screen, so that we can fire off any pending network calls needed to flesh the row out. Pretty hacky, but for some lists we don't want to pulling down that much data at once. Long run we may need to just pull down data for the columns that are visible, and refetch data if folks use the column pickers git-svn-id: svn://svn.open-ils.org/ILS/trunk@14467 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- 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 fcea5c409d..c79b9d52c1 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/list.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/list.js @@ -706,7 +706,17 @@ util.list.prototype = { //dump('detect_visible obj.node = ' + obj.node + '\n'); /* FIXME - this is a hack.. if the implementation of tree changes, this could break */ try { - var scrollbar = document.getAnonymousNodes( document.getAnonymousNodes(obj.node)[1] )[1]; + /*var s = ''; var A = document.getAnonymousNodes(obj.node); + for (var i in A) { + var B = A[i]; + s += '\t' + (typeof B.nodeName != 'undefined' ? B.nodeName : B ) + '\n'; + if (typeof B.childNodes != 'undefined') for (var j = 0; j < B.childNodes.length; j++) { + var C = B.childNodes[j]; + s += '\t\t' + C.nodeName + '\n'; + } + } + obj.error.sdump('D_XULRUNNER','document.getAnonymousNodes(' + obj.node.nodeName + ') = \n' + s + '\n');*/ + var scrollbar = document.getAnonymousNodes(obj.node)[2].firstChild; var curpos = scrollbar.getAttribute('curpos'); var maxpos = scrollbar.getAttribute('maxpos'); //alert('curpos = ' + curpos + ' maxpos = ' + maxpos + ' obj.curpos = ' + obj.curpos + ' obj.maxpos = ' + obj.maxpos + '\n');