mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
tooltip infrastructure
This commit is contained in:
parent
6af30c5a92
commit
6dbe1821e5
@ -355,11 +355,11 @@ function SendPage()
|
||||
function FillInTooltip ( tipElement )
|
||||
{
|
||||
var retVal = false;
|
||||
var button = document.getElementById('replaceMe');
|
||||
if ( button ) {
|
||||
var tipText = tipElement.getAttribute('tooltiptext');
|
||||
var textNode = document.getElementById("TOOLTIP_tooltipText");
|
||||
if ( textNode ) {
|
||||
var tipText = tipElement.getAttribute("tooltiptext");
|
||||
if ( tipText != "" ) {
|
||||
button.setAttribute('value', tipText);
|
||||
textNode.setAttribute('value', tipText);
|
||||
retVal = true;
|
||||
}
|
||||
}
|
||||
|
@ -161,12 +161,9 @@
|
||||
</box>
|
||||
|
||||
<popupset id="aTooltipSet">
|
||||
<popup id="aTooltip"
|
||||
oncreate="return FillInTooltip(document.tooltipNode);"
|
||||
style="border: thin solid black;">
|
||||
<titledbutton id="replaceMe" align="left" crop="right" class="borderless"
|
||||
value="Empty Tooltip" />
|
||||
</popup>
|
||||
<popup id="aTooltip" class="tooltip" oncreate="return FillInTooltip(document.tooltipNode);" >
|
||||
<text id="TOOLTIP_tooltipText"/>
|
||||
</popup>
|
||||
</popupset>
|
||||
|
||||
</overlay>
|
||||
|
@ -167,3 +167,19 @@ menuitem[checked="true"][menuactive="true"]
|
||||
{
|
||||
list-style-image : url("chrome://global/skin/menu-arrow-hover.gif");
|
||||
}
|
||||
|
||||
/** Tooltips (tooltip <popup> element)
|
||||
* class="tooltip"
|
||||
**/
|
||||
.tooltip
|
||||
{
|
||||
background-color : #FFFFCC;
|
||||
border : 1px outset #FFFFCC;
|
||||
color : #000000;
|
||||
font : smaller;
|
||||
padding : 3px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -80,7 +80,8 @@
|
||||
<binding id="menubutton-dual">
|
||||
<content excludes="template,observes,menupopup">
|
||||
<xul:box class="menubutton-internal-box">
|
||||
<xul:button class="menubutton-dual-button" allowevents="true" inherits="buttonaction:oncommand,src,value,crop,accesskey"/>
|
||||
<xul:button class="menubutton-dual-button" allowevents="true"
|
||||
inherits="buttontooltiptext:tooltiptext,buttonaction:oncommand,src,value,crop,accesskey"/>
|
||||
<xul:image class="menubutton-dropmarker"/>
|
||||
</xul:box>
|
||||
</content>
|
||||
|
@ -463,7 +463,8 @@
|
||||
|
||||
<binding id="toolbar">
|
||||
<content>
|
||||
<xul:toolbargrippy onclick="var v = parentNode;
|
||||
<xul:toolbargrippy inherits="grippytooltiptext:tooltiptext"
|
||||
onclick="var v = parentNode;
|
||||
var attr = v.getAttribute('collapsed');
|
||||
if (attr == 'true') {
|
||||
v.removeAttribute('collapsed');
|
||||
|
Loading…
Reference in New Issue
Block a user