Bug 329147 - no tooltips in places toolbar. r=sspitzer.

This commit is contained in:
mozilla.mano%sent.com 2007-01-13 10:18:30 +00:00
Родитель 46bb196672
Коммит 481ad499fe
2 изменённых файлов: 34 добавлений и 4 удалений

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

@ -442,6 +442,31 @@ var BookmarksEventHandler = {
}
}
}
},
fillInBTTooltip: function(aTipElement) {
// Fx2XP: Don't show tooltips for bookmarks under sub-folders
if (aTipElement.localName != "toolbarbutton")
return false;
var url = aTipElement.getAttribute("url");
if (!url)
return false;
var tooltipUrl = document.getElementById("btUrlText");
tooltipUrl.value = url;
var title = aTipElement.label;
var tooltipTitle = document.getElementById("btTitleText");
if (title && title != url) {
tooltipTitle.hidden = false;
tooltipTitle.value = title;
}
else
tooltipTitle.hidden = true;
// show tooltip
return true;
}
};

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

@ -144,16 +144,20 @@
onpopupshowing="return BookmarksMenu.createContextMenu(event);"
onpopuphidden ="BookmarksMenu.destroyContextMenu(event);"/>
</popupset>
#endif
<!-- bookmarks toolbar tooltip -->
<tooltip id="btTooltip" noautohide="true"
<tooltip id="btTooltip" noautohide="true"
#ifdef MOZ_PLACES_BOOKMARKS
onpopupshowing="return BookmarksEventHandler.fillInBTTooltip(document.tooltipNode)">
#else
onpopupshowing="return BookmarksToolbar.fillInBTTooltip(document.tooltipNode)">
#endif
<vbox id="btTooltipTextBox" flex="1">
<label id="btTitleText" />
<label id="btUrlText" />
</vbox>
</tooltip>
#endif
<toolbox id="navigator-toolbox" class="toolbox-top" mode="icons"
defaultmode="icons">
@ -324,13 +328,14 @@
tooltiptext="&placesToolbarButton.tooltip;"
oncommand="PlacesCommandHook.togglePlacesPopup(event);"/>
<toolbaritem flex="1" id="personal-bookmarks" title="&bookmarksItem.title;">
<hbox id="bookmarksBarContent" flex="1" type="places"
<hbox id="bookmarksBarContent" flex="1" type="places"
place="place:&amp;folder=3&amp;group=3&amp;expandQueries=1"
context="placesContext" asyncinit="true"
onclick="BookmarksEventHandler.onClick(event);"
oncommand="BookmarksEventHandler.onCommand(event);"
onpopupshowing="BookmarksEventHandler.onPopupShowing(event);"
ondragexit="PlacesMenuDNDController.onDragExit(event);"/>
ondragexit="PlacesMenuDNDController.onDragExit(event);"
tooltip="btTooltip"/>
</toolbaritem>
<toolbarbutton id="places-bookmark"
label="&location.status.not_bookmarked;"