зеркало из https://github.com/mozilla/pjs.git
Bug 397111 - Places Organizer , next menu won't expand when the pointer gets there, r=mano, a=blocking1.9
This commit is contained in:
Родитель
09edd8a5a3
Коммит
20af55fe0d
|
@ -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;"
|
||||
|
|
Загрузка…
Ссылка в новой задаче