mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
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:
parent
71fb5003f7
commit
c5216dcce6
@ -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 );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user