Bug 397111 - Places Organizer , next menu won't expand when the pointer gets there, r=mano, a=blocking1.9

This commit is contained in:
martijn.martijn@gmail.com 2007-12-23 14:10:56 -08:00
Родитель 09edd8a5a3
Коммит 20af55fe0d
2 изменённых файлов: 28 добавлений и 1 удалений

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

@ -1643,3 +1643,27 @@ var ViewMenu = {
result.sortingMode = sortingMode;
}
};
var PlacesToolbar = {
// make places toolbar act like menus
openedMenuButton: null,
autoOpenMenu: function (aTarget) {
if (this.openedMenuButton && this.openedMenuButton != aTarget &&
aTarget.localName == "toolbarbutton" &&
(aTarget.type == "menu" || aTarget.type == "menu-button")) {
this.openedMenuButton.open = false;
aTarget.open = true;
}
},
onMenuOpen: function (aTarget) {
if (aTarget.parentNode.localName == "toolbarbutton")
this.openedMenuButton = aTarget.parentNode;
},
onMenuClose: function (aTarget) {
if (aTarget.parentNode.localName == "toolbarbutton")
this.openedMenuButton = null;
}
};

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

@ -141,7 +141,10 @@
</popupset>
<toolbox id="placesToolbox">
<toolbar class="chromeclass-toolbar" id="placesToolbar" align="center">
<toolbar class="chromeclass-toolbar" id="placesToolbar" align="center"
onmouseover="PlacesToolbar.autoOpenMenu(event.target);"
onpopupshowing="PlacesToolbar.onMenuOpen(event.target);"
onpopuphidden="PlacesToolbar.onMenuClose(event.target);">
<toolbarbutton id="back-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
command="OrganizerCommand:Back"
tooltiptext="&backButton.tooltip;"