mozilla side changes for bugscape 16296. r-blake, sr-ben. Given the Component id and panel, open the component and select the panel in the pref window.

This commit is contained in:
suresh%netscape.com 2002-06-04 04:16:14 +00:00
parent 71fb5003f7
commit c5216dcce6

View File

@ -376,9 +376,13 @@ nsPrefWindow.prototype =
{
var panelTree = document.getElementById( "prefsTree" );
var selectItem = document.getElementById( aSelectItem );
var index = panelTree.contentView.getIndexOfItem( selectItem );
if ( !panelTree.view.isContainerOpen( index ) )
panelTree.view.toggleOpenState(index);
var selectItemroot = document.getElementById( aComponentName );
var parentIndex = panelTree.contentView.getIndexOfItem( selectItemroot );
if (parentIndex != -1 && !panelTree.view.isContainerOpen(parentIndex))
panelTree.view.toggleOpenState(parentIndex);
var index = panelTree.view.getIndexOfItem( selectItem );
if (index == -1)
return;
panelTree.treeBoxObject.selection.select( index );
}