rem: var select_list = tree.selectedItems for (var nodeIndex=0; nodeIndex<select_list.length; nodeIndex++) { var node = select_list[nodeIndex]; if (!node)    break;  if (node.getAttribute('container') == 'true') { continue; 
add: var sel = tree.treeBoxObject.selection; var ranges = sel.getRangeCount(); for (var range = 0; range < ranges; ++range) { var min = {}, max = {}; sel.getRangeAt(range, min, max); for (var index = min.value; index <= max.value; ++index) { var item = tree.contentView.getItemAtIndex(index); if (item.getAttribute("container") != "true") { var res = RDF.GetResource(item.id);  add_node_to_current_list(database, res); ++added; } 
context: function AddPanel(){  var tree = document.getElementById('other-panels');  var database = tree.database;  var select_list = tree.selectedItems  for (var nodeIndex=0; nodeIndex<select_list.length; nodeIndex++) {    var node = select_list[nodeIndex];    if (!node)    break;    // Skip folders.    if (node.getAttribute('container') == 'true') {      continue;    }    var id = node.getAttribute("id");    // No id? Sorry. Only nodes with id's can get    // in the current panel list.    if (!id)      break;    var rdfNode = RDF.GetResource(id);    // You need an rdf node too. Sorry, those are the rules.    if (!rdfNode) break;    // Add the panel to the current list.    add_node_to_current_list(database, rdfNode);  }  // Remove the selection in the other list.  // Selection will move to "current" list.  var all_panels = document.getElementById('other-panels');  all_panels.clearSelection();  enable_buttons_for_current_panels();  enable_buttons_for_other_panels();}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/d38a0937d9c93a0a9d913e2ac781e4328bb8cc73/customize.js/buggy/xpfe/components/sidebar/resources/customize.js