зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
540b7a6ccc
Коммит
d7fc3af46c
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче