Class idx.widget.HoverHelp
Extends
dijit._TemplatedMixin, dijit._Widget, dijit._WidgetsInTemplateMixin.
Provides a button-like widget for context-sensitive hover help.
Defined in: <idx\widget\HoverHelp.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Field Summary
Field Attributes | Field Name and Description |
---|---|
Set this to true if you want to set a limit on the size of tooltip container.
|
|
The prefix to prepend to the provided HREF.
|
|
Set this to true if you want the help message to only open when clicked
rather than when hovered.
|
|
The flag indicating if this widget is disabled.
|
|
The delay (in milliseconds) before the hover help is hidden when hovering ceases.
|
|
The URL or path to use for launching a new window with additional help on
the topic.
|
|
The prefix to prepend to the topicID to create the key for looking up the
href in the resources.
|
|
The suffix to append to the topicID to create the key for looking up the
href in the resources.
|
|
This is the text label to give to the link that launches the external help
system in a new window.
|
|
Defaults for high-contrast mode (when they cannot be discerned from the theme).
|
|
This is the HTML message content to display in the popup.
|
|
The prefix to prepend to the topicID to create the key for looking up the
message in the resources.
|
|
The suffix to append to the topicID to create the key for looking up the
message in the resources.
|
|
Indication of whether or not the "compact" icon is desired instead of the
"standard" icon.
|
|
The resources to use for optionally obtaining the message and href for this
instance.
|
|
Set this to true if you want to show the close icon.
|
|
The delay (in milliseconds) before the hover help is shown.
|
|
Alternatively to directly specifying the message or the href, the
message ID can be specified in order to trigger lookup of the message in
the provided resources object.
|
Method Summary
Method Attributes | Method Name and Description |
---|---|
Overridden to update contained entities.
|
|
constructor(args, node)
Constructor
Handles the reading any attributes passed via markup.
|
|
<static> |
idx.widget.HoverHelp.getDefaultProfile()
Returns the current default profile to use for HoverHelp instances.
|
Overrides dijit._Widget.postMixInProperties() to ensure
that the dijit._Widget.attr() function is called for each
property that was set.
|
|
<static> |
idx.widget.HoverHelp.setDefaultProfile(profile)
Sets the default profile to use for the HoverHelp instances.
|
startup()
Called at startup to set state and update all the
contained resources like the message and href.
|
Constructor Detail
idx.widget.HoverHelp()
Example usage: <div dojoType="dijit.form.TextBox"></div> <div dojoType="idx.widget.HoverHelp" message="Hello, World!" href="http://www.ibm.com"></div>
Field Detail
allowLimitedSize
Set this to true if you want to set a limit on the size of tooltip container.
{String} baseHref
The prefix to prepend to the provided HREF. Typically this is set through
the provided or installed resources, however, it can be overridden here.
If this value is not provided the default value will be taken from resources
using the "idx.widget.HoverHelp" scope and the "baseHref" key. The default
value for this is empty-string.
- Default Value:
- ""
clickToOpen
Set this to true if you want the help message to only open when clicked
rather than when hovered.
disabled
The flag indicating if this widget is disabled.
hideDelay
The delay (in milliseconds) before the hover help is hidden when hovering ceases.
This is ignored if "clickToOpen" is set to true since you must then click to close.
{String} href
The URL or path to use for launching a new window with additional help on
the topic. If this is not privided then an attempt is made to lookup the
href in the resources using the key formed by concatenating hrefKeyPrefix,
topicID, and hrefKeySuffix. If no href can be found, then no link is shown
for additional help. If provided, a link is displayed using the
"moreInfoLabel".
{String} hrefKeyPrefix
The prefix to prepend to the topicID to create the key for looking up the
href in the resources. If this value is not provided the default value
will be taken from resources using the "idx.widget.HoverHelp" scope and
the "hrefKeyPrefix" key. The default value for this is "topic_".
- Default Value:
- ""
{String} hrefKeySuffix
The suffix to append to the topicID to create the key for looking up the
href in the resources. If this value is not provided the default value
will be taken from resources using the "idx.widget.HoverHelp" scope and
the "hrefKeySuffix" key. The default value for this is "_href".
- Default Value:
- ""
{String} hrefLabel
This is the text label to give to the link that launches the external help
system in a new window. If this is not specified during construction, the
default is obtained from resources using the "idx.widget.HoverHelp" scope
and the "moreInfoLabel" key. The default text will be something like
"Learn more...".
- Default Value:
- ""
idxHCDefaults
Defaults for high-contrast mode (when they cannot be discerned from the theme).
{String} message
This is the HTML message content to display in the popup. If this is not
specified, the widget attempts to lookup its content in the resources using
the key formed by concatenating messageKeyPrefix, topicID, and
messageKeySuffix. If no content can be determined then default text is
displayed indicating that no help has been defined.
- Default Value:
- ""
{String} messageKeyPrefix
The prefix to prepend to the topicID to create the key for looking up the
message in the resources. If this value is not provided the default value
will be taken from resources using the "idx.widget.HoverHelp" scope and
the "messageKeyPrefix" key. The default value for this is "topic_".
- Default Value:
- ""
{String} messageKeySuffix
The suffix to append to the topicID to create the key for looking up the
message in the resources. If this value is not provided the default value
will be taken from resources using the "idx.widget.HoverHelp" scope and
the "messageKeySuffix" key. The default value for this is "_message".
- Default Value:
- ""
profile
Indication of whether or not the "compact" icon is desired instead of the
"standard" icon. Typically the compact icon is used when many form fields
are clustered together with HoverHelp in order to prevent the help icons
from overwhelming the appearance of the form. The standard icon is used
when the HoverHelp icon needs to stand out on the page and typically when
it is one of only a few HoverHelp icons displayed on the page.
The default for all instances can be controlled via the idx.widget.HoverHelp.setDefaultProfile() function. If not set then the default is "standard".
- Default Value:
- "standard"
{Object} resources
The resources to use for optionally obtaining the message and href for this
instance. This is also used to obtain the default resources used by this
instance. If not specified the default resources are pulled from
idx.resources using the "idx.widget.HoverHelp" scope. Any resources not
overridden fallback to the default resources.
The default resources that are used by this include:
- defaultHrefLabel: The label for the href linking to additional information.
- defaultTitle: Default title to use for the button.
- defaultMessage: Text to display when the message has not been defined.
- baseHref: The base Href to prepend to all hrefs provided.
Typically, one would specify a resources attribute that defines messages and
hrefs for one or more topicIDs and the same object would be shared among
many instances of this widget, with each one pulling its message and href
using a different topicID.
- Default Value:
- null
showCloseIcon
Set this to true if you want to show the close icon.
showDelay
The delay (in milliseconds) before the hover help is shown. This is ignored
if "clickToOpen" is set to true since hovering does not open the hover help in
that case.
{String} topicID
Alternatively to directly specifying the message or the href, the
message ID can be specified in order to trigger lookup of the message in
the provided resources object. When looking up the message by message ID
the key used for lookup is constructed by concatenating the
messageKeyPrefix, the topicID, and the messageKeySuffix. When looking up
the href, the key for lookup is constructed by concatenating the
hrefKeyPrefix, topicID, and the hrefKeySuffix. If no topicID is provided
then no such lookups are performed.
- Default Value:
- ""
Method Detail
buildRendering()
Overridden to update contained entities.
constructor(args, node)
Constructor
Handles the reading any attributes passed via markup.
- Parameters:
- {Object} args
- {Object} node
<static> idx.widget.HoverHelp.getDefaultProfile()
Returns the current default profile to use for HoverHelp instances.
If an invalid value was previously set then "standard" is returned.
- Returns:
- The current default profile.
postMixInProperties()
Overrides dijit._Widget.postMixInProperties() to ensure
that the dijit._Widget.attr() function is called for each
property that was set.
- See:
- dijit._Widget.postMixInProperties
<static> idx.widget.HoverHelp.setDefaultProfile(profile)
Sets the default profile to use for the HoverHelp instances.
If set to an invalid value or not set at all then "standard" is used.
Valid values include: "compact" and "standard".
- Parameters:
- profile
- The name of the profile (either "standard" or "compact")
startup()
Called at startup to set state and update all the
contained resources like the message and href.
Also attaches the contained dialog's orient method
for tooltips.