зеркало из https://github.com/mozilla/pjs.git
bug 142215 - Personal Toolbar folders should work like main menu (open on mouseover), p=paradigmk@technodrome.com r=Neil
This commit is contained in:
Родитель
9e09f33099
Коммит
f69bdb4a7f
|
@ -724,6 +724,31 @@ var BookmarksMenuDNDObserver = {
|
|||
|
||||
var BookmarksToolbar =
|
||||
{
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// make bookmarks toolbar act like menus
|
||||
openMenuButton: null,
|
||||
autoOpenMenu: function (aTarget)
|
||||
{
|
||||
if (this.openMenuButton &&
|
||||
this.openMenuButton != aTarget &&
|
||||
aTarget.localName == "toolbarbutton" &&
|
||||
(aTarget.type == "menu" ||
|
||||
aTarget.type == "menu-button")) {
|
||||
this.openMenuButton.open = false;
|
||||
aTarget.open = true;
|
||||
}
|
||||
},
|
||||
onMenuOpen: function (aTarget)
|
||||
{
|
||||
if (aTarget.parentNode.localName == "toolbarbutton")
|
||||
this.openMenuButton = aTarget.parentNode;
|
||||
},
|
||||
onMenuClose: function (aTarget)
|
||||
{
|
||||
if (aTarget.parentNode.localName == "toolbarbutton")
|
||||
this.openMenuButton = null;
|
||||
},
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// returns the node of the last visible bookmark on the toolbar -->
|
||||
getLastVisibleBookmark: function ()
|
||||
|
|
Загрузка…
Ссылка в новой задаче