bug 451373 — code cleanup: makes it possible for extensions to add another panel without the risk that multiple such extensions would break each other

This commit is contained in:
Daniel Brooks 2008-09-28 08:45:47 -05:00
Родитель c98c41eb6e
Коммит 463b91419b
2 изменённых файлов: 9 добавлений и 5 удалений

Просмотреть файл

@ -394,6 +394,10 @@ var BrowserUI = {
Shortcuts.init();
},
switchPane : function(id) {
document.getElementById("panel-items").selectedPanel = document.getElementById(id);
},
_sizeControls : function(aEvent) {
var rect = document.getElementById("browser-container").getBoundingClientRect();
var containerW = rect.right - rect.left;

Просмотреть файл

@ -241,11 +241,11 @@
</vbox>
<hbox id="panel-container" style="-moz-stack-sizing: ignore;" top="0" left="0">
<vbox id="panel-controls">
<toolbarbutton id="tool-addons" class="browser-control-button" oncommand="this.parentNode.nextSibling.selectedIndex=0;"/>
<toolbarbutton id="tool-downloads" class="browser-control-button" oncommand="this.parentNode.nextSibling.selectedIndex=1;"/>
<toolbarbutton id="tool-preferences" class="browser-control-button" oncommand="this.parentNode.nextSibling.selectedIndex=2;"/>
<toolbarbutton id="tool-shortcuts" class="browser-control-button" oncommand="this.parentNode.nextSibling.selectedIndex=3;"/>
<vbox id="panel-controls" oncommand="BrowserUI.switchPane(event.target.getAttribute('paneid'));">
<toolbarbutton id="tool-addons" class="browser-control-button" paneid="addons-container"/>
<toolbarbutton id="tool-downloads" class="browser-control-button" paneid="downloads-container"/>
<toolbarbutton id="tool-preferences" class="browser-control-button" paneid="prefs-container"/>
<toolbarbutton id="tool-shortcuts" class="browser-control-button" paneid="shortcuts-container"/>
</vbox>
<deck id="panel-items" flex="1">
<iframe id="addons-container" flex="1"/>