bug 142215 - Personal Toolbar folders should work like main menu (open on mouseover), p=paradigmk@technodrome.com r=Neil

This commit is contained in:
kairo%kairo.at 2007-05-05 04:37:29 +00:00
Родитель 9e09f33099
Коммит f69bdb4a7f
1 изменённых файлов: 25 добавлений и 0 удалений

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

@ -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 ()