From 023ed39dc44271e0ca90c8ce6b9d78bcdca6005e Mon Sep 17 00:00:00 2001 From: pines Date: Tue, 24 Oct 2006 19:28:40 +0000 Subject: [PATCH] let clipboard and export deal with just the visible columns in a tree git-svn-id: svn://svn.open-ils.org/ILS/trunk@6502 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/chrome/content/util/list.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 815c9de181..e7f98107a0 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/list.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/list.js @@ -59,6 +59,7 @@ util.list.prototype = { } else { var treecols = document.createElement('treecols'); this.node.appendChild(treecols); + this.treecols = treecols; for (var i = 0; i < this.columns.length; i++) { var treecol = document.createElement('treecol'); @@ -826,7 +827,7 @@ util.list.prototype = { var obj = this; var dump = ''; for (var j = 0; j < obj.columns.length; j++) { - if (obj.columns[j].hidden) { + if (obj.node.treeBoxObject.columns.getColumnAt(j).element.getAttribute('hidden') == 'true') { /* skip */ } else { if (dump) dump += ','; @@ -839,7 +840,7 @@ util.list.prototype = { var treeitem = this.treechildren.childNodes[i]; var treerow = treeitem.firstChild; for (var j = 0; j < treerow.childNodes.length; j++) { - if (obj.columns[j].hidden) { + if (obj.node.treeBoxObject.columns.getColumnAt(j).element.getAttribute('hidden') == 'true') { /* skip */ } else { if (row) row += ','; @@ -870,8 +871,7 @@ util.list.prototype = { var treerow = treeitem.firstChild; for (var j = 0; j < treerow.childNodes.length; j++) { var value = treerow.childNodes[j].getAttribute('label'); - //FIXME - //if (params.skip_hidden_columns) if (obj.node.firstChild.childNodes[j].getAttribute('hidden')) continue; + if (params.skip_hidden_columns) if (obj.node.treeBoxObject.columns.getColumnAt(j).element.getAttribute('hidden') == 'true') continue; var id = obj.columns[j].id; if (params.labels_instead_of_ids) id = obj.columns[j].label; row[ id ] = value; } -- 2.43.2