[open-ils-commits] r14467 - trunk/Open-ILS/xul/staff_client/chrome/content/util (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Oct 15 21:57:57 EDT 2009
Author: phasefx
Date: 2009-10-15 21:57:55 -0400 (Thu, 15 Oct 2009)
New Revision: 14467
Modified:
trunk/Open-ILS/xul/staff_client/chrome/content/util/list.js
Log:
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
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/list.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/list.js 2009-10-16 00:36:11 UTC (rev 14466)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/list.js 2009-10-16 01:57:55 UTC (rev 14467)
@@ -706,7 +706,17 @@
//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');
More information about the open-ils-commits
mailing list