Javascript for Episerver 7.5 cms

TooltipDialog (constructor)

Location

epi-cms/widget/TooltipDialog

Extends

Properties

_afterCssClass

_attrPairNames

_availableSpace

_beforeCssClass

_blankGif

Path to a blank 1x1 image. Used by <img> nodes in templates that really get their image via CSS background-image.

_defaultConnectorLeft

_defaultConnectorMargin

_defaultConnectorRight

_earlyTemplatedStartup

A fallback to preserve the 1.0 - 1.3 behavior of children in templates having their startup called before the parent widget fires postCreate. Defaults to 'false', causing child widgets to have their .startup() called immediately before a parent widget .startup(), but always after the parent .postCreate(). Set to 'true' to re-enable to previous, arguably broken, behavior.

_focusManager

_isFirstShow

_left

_pos

_right

_setClassAttr

_setDirAttr

_setIdAttr

_setLangAttr

_skipNodeCache

_started

startup() has completed.

_wrapperPosX

attributeMap

Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute for each XXX attribute to be mapped to the DOM.

attributeMap sets up a "binding" between attributes (aka properties) of the widget and the widget's DOM. Changes to widget attributes listed in attributeMap will be reflected into the DOM.

For example, calling set('title', 'hello') on a TitlePane will automatically cause the TitlePane's DOM to update with the new title.

attributeMap is a hash where the key is an attribute of the widget, and the value reflects a binding to a:

  • DOM node attribute

    focus: {node: "focusNode", type: "attribute"} Maps this.focus to this.focusNode.focus

  • DOM node innerHTML

    title: { node: "titleNode", type: "innerHTML" } Maps this.title to this.titleNode.innerHTML

  • DOM node innerText

    title: { node: "titleNode", type: "innerText" } Maps this.title to this.titleNode.innerText

  • DOM node CSS class

    myClass: { node: "domNode", type: "class" } Maps this.myClass to this.domNode.className

If the value is an array, then each element in the array matches one of the formats of the above list.

There are also some shorthands for backwards compatibility:

  • string --> { node: string, type: "attribute" }, for example:
"focusNode" ---> { node: "focusNode", type: "attribute" }
  • "" --> { node: "domNode", type: "attribute" }

autofocus

A Toggle to modify the default focus behavior of a Dialog, which is to focus on the first dialog element after opening the dialog. False will disable autofocusing. Default: true.

baseClass

The root className to use for the various states of this widget

class

connectorMargin

containerNode

Designates where children of the source DOM node will be placed. "Children" in this case refers to both DOM nodes and widgets. For example, for myWidget:

<div data-dojo-type=myWidget>
    <b> here's a plain DOM node
    <span data-dojo-type=subWidget>and a widget</span>
    <i> and another plain DOM node </i>
</div>

containerNode would point to:

<b> here's a plain DOM node
<span data-dojo-type=subWidget>and a widget</span>
<i> and another plain DOM node </i>

In templated widgets, "containerNode" is set via a data-dojo-attach-point assignment.

containerNode must be defined for any widget that accepts innerHTML (like ContentPane or BorderContainer or even Button), and conversely is null for widgets that don't, like TextBox.

content

The innerHTML of the ContentPane. Note that the initialization parameter / argument to set("content", ...) can be a String, DomNode, Nodelist, or _Widget.

dir

Bi-directional support, as defined by the HTML DIR attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's default direction.

doLayout

Don't change this parameter from the default value. This ContentPane parameter doesn't make sense for TooltipDialog, since TooltipDialog is never a child of a layout container, nor can you specify the size of TooltipDialog in order to control the size of an inner widget.

domNode

This is our visible representation of the widget! Other DOM Nodes may by assigned to other properties, usually through the template system's data-dojo-attach-point syntax, but the domNode property is the canonical "top level" node in widget UI.

errorMessage

Message that shows if an error occurs

extractContent

Extract visible content from inside of <body> .... </body>. I.e., strip <html> and <head> (and it's contents) from the href

focused

This widget or a widget it contains has focus, or is "active" because it was recently clicked.

hideOnBlur

href

The href of the content that displays now. Set this at construction if you want to load data externally when the pane is shown. (Set preload=true to load it immediately.) Changing href after creation doesn't have any effect; Use set('href', ...);

id

A unique, opaque ID string that can be assigned by users or by the system. If the developer passes an ID which is known not to be unique, the specified ID is ignored and the system-generated ID is used instead.

ioArgs

Parameters to pass to xhrGet() request, for example:

<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="href: './bar', ioArgs: {timeout: 500}">

isLayoutContainer

Indicates that this widget will call resize() on it's child widgets when they become visible.

isLoaded

True if the ContentPane has data in it, either specified during initialization (via href or inline content), or set via set('content', ...) / set('href', ...)

False if it doesn't have any content, or if ContentPane is still in the process of downloading href.

lang

Rarely used. Overrides the default Dojo locale used to render this widget, as defined by the HTML LANG attribute. Value must be among the list of locales specified during by the Dojo bootstrap, formatted according to RFC 3066 (like en-us).

loadingMessage

Message that shows while downloading

onLoadDeferred

This is the dojo.Deferred returned by set('href', ...) and refresh(). Calling onLoadDeferred.then() registers your callback to be called only once, when the prior set('href', ...) call or the initial href parameter to the constructor finishes loading.

This is different than an onLoad() handler which gets called any time any href or content is loaded.

ownerDocument

The document this widget belongs to. If not specified to constructor, will default to srcNodeRef.ownerDocument, or if no sourceRef specified, then to dojo/_base/window::doc

parseOnLoad

Parse content and create the widgets, if any.

parserScope

Flag passed to parser. Root for attribute names to search for. If scopeName is dojo, will search for data-dojo-type (or dojoType). For backwards compatibility reasons defaults to dojo._scopeName (which is "dojo" except when multi-version support is used, when it will be something like dojo16, dojo20, etc.)

preload

Force load of data on initialization even if pane is hidden.

preventCache

Prevent caching of data from href's by appending a timestamp to the href.

refreshOnShow

Refresh (re-download) content when pane goes from hidden to shown

srcNodeRef

pointer to original DOM node

state

Will be "Error" if one or more of the child widgets has an invalid value, "Incomplete" if not all of the required child widgets are filled in. Otherwise, "", which indicates that the form is ready to be submitted.

stopParser

style

HTML style attributes as cssText string or name/value hash

templatePath

Path to template (HTML file) for this widget relative to dojo.baseUrl. Deprecated: use templateString with require([... "dojo/text!..."], ...) instead

templateString

textDir

Bi-directional support, the main variable which is responsible for the direction of the text. The text direction can be different than the GUI direction by using this parameter in creation of a widget.

Allowed values:

  1. "ltr"
  2. "rtl"
  3. "auto" - contextual the direction of a text defined by first strong letter.

By default is as the page direction.

title

Description of tooltip dialog (required for a11y)

tooltip

When this widget's title attribute is used to for a tab label, accordion pane title, etc., this specifies the tooltip to appear when the mouse is hovered over that text.

Methods

public inherited method _beforeFillContent ( )


public inherited method _changeAttrValue ( name , value )

Internal helper for directly changing an attribute value.

Parameters

public inherited method _checkIfSingleChild ( )

Test if we have exactly one visible widget as a child, and if so assume that we are a container for that widget, and should propagate startup() and resize() calls to it. Skips over things like data stores since they aren't visible.


public inherited method _fillContent ( source )

Relocate source contents to templated container node. this.containerNode must be able to receive children, or exceptions will be thrown.

Parameters

public inherited method _get ( name , names )

Private function that does a get based off a hash of names

Parameters

public inherited method _getContentAttr ( )

Hook to make get("content") work


public inherited method _getDescendantFormWidgets ( children )

Returns all form widget descendants, searching through non-form child widgets like BorderContainer

Parameters

public inherited method _getFocusItems ( )

Finds focusable items in dialog, and sets this._firstFocusItem and this._lastFocusItem


public inherited method _getState ( )

Compute what this.state should be based on state of children


public inherited method _getValueAttr ( )

Returns Object representing form values. See description of value for details.


public inherited method _isShown ( )

Returns true if the content is currently shown.


public inherited method _layout ( changeSize , resultSize )

Resize myself according to optional changeSize/resultSize parameters, like a layout widget. Also, since I am an isLayoutContainer widget, each of my children expects me to call resize() or layout() on it.

Should be called on initialization and also whenever we get new content (from an href, or from set('content', ...))... but deferred until the ContentPane is visible

Parameters

public inherited method _layoutChildren ( )


public inherited method _load ( )

Load/reload the href specified in this.href


public inherited method _onBlur ( )

This is where widgets do processing for when they stop being active, such as changing CSS classes. See onBlur() for more details.


public inherited method _onChildChange ( attr )

Called when child's value or disabled state changes

Parameters

public inherited method _onError ( type , err , consoleText )

Parameters

public inherited method _onFocus ( )

This is where widgets do processing for when they are active, such as changing CSS classes. See onFocus() for more details.


public inherited method _onLoadHandler ( data )

This is called whenever new content is being loaded

Parameters

public inherited method _onMap ( type )

Maps on() type parameter (ex: "mousemove") to method name (ex: "onMouseMove"). If type is a synthetic event like touch.press then returns undefined.

Parameters

public method _onShow ( )

Overrides from ContentPane


public inherited method _onSubmit ( )

Callback when user hits submit button


public inherited method _onUnloadHandler ( )

This is called whenever the content is being unloaded


public inherited method _scheduleLayout ( changeSize , resultSize )

Resize myself, and call resize() on each of my child layout widgets, either now (if I'm currently visible) or when I become visible

Parameters

public inherited method _set ( name , value )

Helper function to set new value for specified attribute, and call handlers registered with watch() if the value has changed.

Parameters

public inherited method _setContent ( cont , isFakeContent )

Insert the content into the container node

Parameters

public inherited method _setContentAttr ( data )

Hook to make set("content", ...) work. Replaces old content with data content, include style classes from old content

Parameters

public inherited method _setFocusedAttr ( val )

Parameters

public inherited method _setHrefAttr ( href )

Hook so set("href", ...) works.

Parameters

public inherited method _setOwnerDocumentAttr ( val )

Parameters

public inherited method _setStyleAttr ( value )

Sets the style attribute of the widget according to value, which is either a hash like {height: "5px", width: "3px"} or a plain string

Parameters

public inherited method _setTitleAttr ( title )

Parameters

public inherited method _setValueAttr ( obj )

Fill in form values from according to an Object (in the format returned by get('value'))

Parameters

public inherited method _startChildren ( )

Called when content is loaded. Calls startup on each child widget. Similar to ContentPane.startup() itself, but avoids marking the ContentPane itself as "restarted" (see #15581).


public inherited method addChild ( widget , insertIndex )

Makes the given widget a child of this widget.

Parameters

public inherited method applyTextDir ( element , text )

The function overridden in the _BidiSupport module, originally used for setting element.dir according to this.textDir. In this case does nothing.

Parameters

public inherited method attr ( name , value )

Set or get properties on a widget instance.

Parameters

public inherited method buildRendering ( )


public inherited method cancel ( )

Cancels an in-flight download of content


public inherited method connect ( obj , event , method )

Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead.

Connects specified obj/event to specified method of this object and registers for disconnect() on widget destroy.

Provide widget-specific analog to dojo.connect, except with the implicit use of this widget as the target object. Events connected with this.connect are disconnected upon destruction.

Parameters
Examples
var btn = new Button();
// when foo.bar() is called, call the listener we're going to
// provide in the scope of btn
btn.connect(foo, "bar", function(){
    console.debug(this.toString());
});

public inherited method connectChildren ( inStartup )

You can call this function directly, ex. in the event that you programmatically add a widget to the form after the form has been initialized.

Parameters

public inherited method constructor ( params , srcNodeRef )

Create the widget.

Parameters

public inherited method create ( params , srcNodeRef )

Parameters

public inherited method defer ( fcn , delay )

Wrapper to setTimeout to avoid deferred functions executing after the originating widget has been destroyed. Returns an object handle with a remove method (that returns null) (replaces clearTimeout).

Parameters

public inherited method destroy ( )


public inherited method destroyDescendants ( preserveDom )

Destroy all the widgets inside the ContentPane and empty containerNode

Parameters

public inherited method destroyRecursive ( preserveDom )

Destroy the ContentPane and its contents

Parameters

public inherited method destroyRendering ( preserveDom )

Destroys the DOM nodes associated with this widget

Parameters

public inherited method disconnect ( handle )

Deprecated, will be removed in 2.0, use handle.remove() instead.

Disconnects handle created by connect.

Parameters

public inherited method disconnectChildren ( )

Deprecated method. Applications no longer need to call this. Remove for 2.0.


public inherited method emit ( type , eventObj , callbackArgs )

Used by widgets to signal that a synthetic event occurred, ex:

myWidget.emit("attrmodified-selectedChildWidget", {}).

Emits an event on this.domNode named type.toLowerCase(), based on eventObj. Also calls onType() method, if present, and returns value from that method. By default passes eventObj to callback, but will pass callbackArgs instead, if specified. Modifies eventObj by adding missing parameters (bubbles, cancelable, widget).

Parameters

public inherited method execute ( formContents )

Callback when the user hits the submit button. Override this method to handle Dialog execution.

Parameters

public inherited method focus ( )

Focus on first field


public inherited method get ( name )

Get a property from a widget.

Parameters

public inherited method getChildren ( )

Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. Does not return nested widgets, nor widgets that are part of this widget's template.


public inherited method getDescendants ( )

Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. This method should generally be avoided as it returns widgets declared in templates, which are supposed to be internal/hidden, but it's left here for back-compat reasons.


public inherited method getIndexOfChild ( child )

Gets the index of the child in this container or -1 if not found

Parameters

public inherited method getParent ( )

Returns the parent widget of this widget


public inherited method getTextDir ( text , originalDir )

Return direction of the text. The function overridden in the _BidiSupport module, its main purpose is to calculate the direction of the text, if was defined by the programmer through textDir.

Parameters

public inherited method getValues ( )


public inherited method hasChildren ( )

Returns true if widget has child widgets, i.e. if this.containerNode contains widgets.


public method hideTooltipDialog ( )

Simply hide tooltip dialog like dijit tooltip


public inherited method ioMethod ( args )

Function that should grab the content specified via href.

Parameters

public inherited method isFocusable ( )

Return true if this widget can currently be focused and false if not


public inherited method isLeftToRight ( )

Return this widget's explicit or implicit orientation (true for LTR, false for RTL)


public inherited method isValid ( )

Returns true if all of the widgets are valid. Deprecated, will be removed in 2.0. Use get("state") instead.


public inherited method on ( type , func )

Parameters

public method onBlur ( )


public inherited method onCancel ( )

Called when user has pressed the Dialog's cancel button, to notify container.


public inherited method onClick ( event )

Connect to this function to receive notifications of mouse click events.

Parameters

public inherited method onClose ( )

Called when dialog is hidden. This is called from the dijit.popup code, and should not be called directly.


public inherited method onContentError ( error )

Called on DOM faults, require faults etc. in content.

In order to display an error message in the pane, return the error message from this method, as an HTML string.

By default (if this method is not overriden), it returns nothing, so the error message is just printed to the console.

Parameters

public inherited method onDblClick ( event )

Connect to this function to receive notifications of mouse double click events.

Parameters

public inherited method onDownloadEnd ( )

Called when download is finished.


public inherited method onDownloadError ( error )

Called when download error occurs.

In order to display an error message in the pane, return the error message from this method, as an HTML string.

Default behavior (if this method is not overriden) is to display the error message inside the pane.

Parameters

public inherited method onDownloadStart ( )

Called before download starts.


public inherited method onExecute ( )

Called when user has pressed the dialog's OK button, to notify container.


public inherited method onFocus ( )

Called when the widget becomes "active" because it or a widget inside of it either has focus, or has recently been clicked.


public inherited method onHide ( )

Called when another widget becomes the selected pane in a dijit/layout/TabContainer, dijit/layout/StackContainer, dijit/layout/AccordionContainer, etc.

Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane.


public inherited method onKeyDown ( event )

Connect to this function to receive notifications of keys being pressed down.

Parameters

public inherited method onKeyPress ( event )

Connect to this function to receive notifications of printable keys being typed.

Parameters

public inherited method onKeyUp ( event )

Connect to this function to receive notifications of keys being released.

Parameters

public inherited method onLoad ( data )

Event hook, is called after everything is loaded and widgetified

Parameters

public inherited method onMouseDown ( event )

Connect to this function to receive notifications of when the mouse button is pressed down.

Parameters

public inherited method onMouseEnter ( event )

Connect to this function to receive notifications of when the mouse moves onto this widget.

Parameters

public inherited method onMouseLeave ( event )

Connect to this function to receive notifications of when the mouse moves off of this widget.

Parameters

public inherited method onMouseMove ( event )

Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget.

Parameters

public inherited method onMouseOut ( event )

Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget.

Parameters

public inherited method onMouseOver ( event )

Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget.

Parameters

public inherited method onMouseUp ( event )

Connect to this function to receive notifications of when the mouse button is released.

Parameters

public method onOpen ( pos )

Overrides from dijit TooltipDialog

Parameters

public inherited method onShow ( )

Called when this widget becomes the selected pane in a dijit/layout/TabContainer, dijit/layout/StackContainer, dijit/layout/AccordionContainer, etc.

Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane.


public inherited method onUnload ( )

Event hook, is called before old content is cleared


public inherited method onValidStateChange ( isValid )

Stub function to connect to if you want to do something (like disable/enable a submit button) when the valid state changes on the form as a whole.

Deprecated. Will be removed in 2.0. Use watch("state", ...) instead.

Parameters

public inherited method orient ( node , aroundCorner , tooltipCorner )

Configure widget to be displayed in given position relative to the button. This is called from the dijit.popup code, and should not be called directly.

Parameters

public inherited method own ( )

Track specified handles and remove/destroy them when this instance is destroyed, unless they were already removed/destroyed manually.


public inherited method placeAt ( reference , position )

Place this widget somewhere in the DOM based on standard domConstruct.place() conventions.

Parameters
Examples
// create a Button with no srcNodeRef, and place it in the body:
var button = new Button({ label:"click" }).placeAt(win.body());
// now, 'button' is still the widget reference to the newly created button
button.on("click", function(e){ console.log('click'); }));
// create a button out of a node with id="src" and append it to id="wrapper":
var button = new Button({},"src").placeAt("wrapper");
// place a new button as the first element of some div
var button = new Button({ label:"click" }).placeAt("wrapper","first");
// create a contentpane and add it to a TabContainer
var tc = dijit.byId("myTabs");
new ContentPane({ href:"foo.html", title:"Wow!" }).placeAt(tc)

public method postCreate ( )

Inits tooltip dialog


public inherited method postMixInProperties ( )


public inherited method refresh ( )

[Re]download contents of href and display


public inherited method removeChild ( widget )

Removes the passed widget instance from this widget but does not destroy it. You can also pass in an integer indicating the index within the container to remove (ie, removeChild(5) removes the sixth widget).

Parameters

public inherited method reset ( )


public inherited method resize ( changeSize , resultSize )

See dijit/layout/_LayoutWidget.resize() for description. Although ContentPane doesn't extend _LayoutWidget, it does implement the same API.

Parameters

public inherited method set ( name , value )

Set a property on a widget

Parameters

public inherited method setAttribute ( attr , value )

Deprecated. Use set() instead.

Parameters

public inherited method setContent ( data )

Deprecated. Use set('content', ...) instead.

Parameters

public inherited method setHref ( href )

Deprecated. Use set('href', ...) instead.

Parameters

public inherited method setValues ( val )

Parameters

public method showTooltipDialog ( target , orient )

Simply show tooltip dialog like dijit tooltip

Parameters

public inherited method startup ( )

Call startup() on all children including non _Widget ones like dojo/dnd/Source objects


public inherited method subscribe ( t , method )

Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead.

Subscribes to the specified topic and calls the specified method of this object and registers for unsubscribe() on widget destroy.

Provide widget-specific analog to dojo.subscribe, except with the implicit use of this widget as the target object.

Parameters
Examples
var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});

public inherited method toString ( )

Returns a string that represents the widget


public inherited method uninitialize ( )

Deprecated. Override destroy() instead to implement custom widget tear-down behavior.


public inherited method unsubscribe ( handle )

Deprecated, will be removed in 2.0, use handle.remove() instead.

Unsubscribes handle created by this.subscribe. Also removes handle from this widget's list of subscriptions

Parameters

public inherited method validate ( )

returns if the form is valid - same as isValid - but provides a few additional (ui-specific) features:

  1. it will highlight any sub-widgets that are not valid
  2. it will call focus() on the first invalid sub-widget

public inherited method watch ( name , callback )

Watches a property for changes

Parameters