From fee916c74305e52feb3619834f5569b1bbc2e887 Mon Sep 17 00:00:00 2001 From: "ian%hixie.ch" Date: Sun, 17 Feb 2002 19:14:08 +0000 Subject: [PATCH] Make Personal Toolbar tooltips also contain the URI of the link. b=105485, r=blake, sr=ben. git-svn-id: svn://10.0.0.236/trunk@114741 18797224-902f-48f8-a5cc-f745e15eee43 --- .../browser/resources/content/navigator.js | 31 +++++++++++++++++++ .../browser/resources/content/navigator.xul | 11 ++++++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/mozilla/xpfe/browser/resources/content/navigator.js b/mozilla/xpfe/browser/resources/content/navigator.js index b2dc46a5907..11f1d7d5c6d 100644 --- a/mozilla/xpfe/browser/resources/content/navigator.js +++ b/mozilla/xpfe/browser/resources/content/navigator.js @@ -1512,3 +1512,34 @@ function updateToolbarStates(toolbarMenuElt) updateComponentBarBroadcaster(); } +// Fill in tooltips for personal toolbar +function FillInPTTooltip(tipElement) +{ + + var title = tipElement.label; + var url = tipElement.statusText; + + if (!title && !url) { + // bail out early if there is nothing to show + return false; + } + + var tooltipTitle = document.getElementById("ptTitleText"); + var tooltipUrl = document.getElementById("ptUrlText"); + + if (title && title != url) { + tooltipTitle.removeAttribute("hidden"); + tooltipTitle.setAttribute("value", title); + } else { + tooltipTitle.setAttribute("hidden", "true"); + } + + if (url) { + tooltipUrl.removeAttribute("hidden"); + tooltipUrl.setAttribute("value", url); + } else { + tooltipUrl.setAttribute("hidden", "true"); + } + + return true; // show tooltip +} diff --git a/mozilla/xpfe/browser/resources/content/navigator.xul b/mozilla/xpfe/browser/resources/content/navigator.xul index 36f0d242375..5fa257d5a02 100644 --- a/mozilla/xpfe/browser/resources/content/navigator.xul +++ b/mozilla/xpfe/browser/resources/content/navigator.xul @@ -268,6 +268,14 @@ Contributor(s): ______________________________________. --> ref="NC:PersonalToolbarFolder" flags="dont-test-empty" rdf:type="http://home.netscape.com/NC-rdf#Folder" oncommand="OpenBookmarkURL(event.target, document.getElementById('innermostBox').database)"> + + + + + +