From d2101be616d6d6b35747cc26a3639999cde5dfef Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 8 Dec 2005 16:16:08 +0000 Subject: [PATCH] for the future git-svn-id: svn://svn.open-ils.org/ILS/trunk@2287 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../chrome/content/evergreen/main/list.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/evergreen/main/list.js b/Open-ILS/xul/staff_client/chrome/content/evergreen/main/list.js index f8abba5e16..5e1fa20125 100644 --- a/Open-ILS/xul/staff_client/chrome/content/evergreen/main/list.js +++ b/Open-ILS/xul/staff_client/chrome/content/evergreen/main/list.js @@ -6,7 +6,13 @@ main.list = function (id) { this.node = document.getElementById(id); if (!this.node) throw('Could not find element ' + id); - if (this.node.nodeName != 'tree') throw(id + ' is not a tree'); + switch(this.node.nodeName) { + case 'tree' : break; + case 'richlistbox' : + case 'listbox' : + throw(this.node.nodeName + ' not yet supported'); break; + default: throw(this.node.nodeName + ' not supported'); break; + } JSAN.use('util.error'); this.error = new util.error(); @@ -51,6 +57,13 @@ main.list.prototype = { }, 'append' : function (params) { + switch (this.node.nodeName) { + 'tree' : this.append_to_tree(params); break; + default: throw('NYI: Need .append() for ' . this.node.nodeName); break; + } + }, + + 'append_to_tree' : function (params) { if (typeof params.row == 'undefined') throw('main.list.append: Object must contain a row'); -- 2.43.2