epi-cms/widget/ViewSelectorDropDownButton
_aroundNode
The node to display the popup around. Can be set via a data-dojo-attach-point assignment. If missing, then domNode will be used.
_arrowWrapperNode
Will set CSS class dijitUpArrow, dijitDownArrow, dijitRightArrow etc. on this node depending on where the drop down is set to be positioned. Can be set via a data-dojo-attach-point assignment. If missing, then _buttonNode will be used.
_attrPairNames
_blankGif
Path to a blank 1x1 image.
Used by <img>
nodes in templates that really get their image via CSS background-image.
_buttonNode
The button/icon/node to click to display the drop down. Can be set via a data-dojo-attach-point assignment. If missing, then either focusNode or domNode (if focusNode is also missing) will be used.
_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
_popupStateNode
The node to set the popupActive class on. Can be set via a data-dojo-attach-point assignment. If missing, then focusNode or _buttonNode (if focusNode is missing) will be used.
_setClassAttr
_setDirAttr
_setIconClassAttr
_setIdAttr
_setLangAttr
_setTabIndexAttr
_setTypeAttr
_setValueAttr
_skipNodeCache
_started
startup() has completed.
_stopClickEvents
When set to false, the click events will not be stopped, in case you want to use them in your subclass
active
True if mouse was pressed while over this widget, and hasn't been released yet
alt
Corresponds to the native HTML <input>
element's attribute.
aria-label
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:
"focusNode" ---> { node: "focusNode", type: "attribute" }
autoWidth
Set to true to make the drop down at least as wide as this widget. Set to false if the drop down should just be its default width
baseClass
class
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.
cssStateNodes
List of sub-nodes within the widget that need CSS classes applied on mouse hover/press and focus
Each entry in the hash is a an attachpoint names (like "upArrowButton") mapped to a CSS class names (like "dijitUpArrowButton"). Example:
{
"upArrowButton": "dijitUpArrowButton",
"downArrowButton": "dijitDownArrowButton"
}
The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it
is hovered, etc.
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.
disabled
Should this widget respond to user input? In markup, this is specified as "disabled='disabled'", or just "disabled".
dndType
Defines a type of 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.
dropDown
The widget to display as a popup. This widget must be defined before the startup function is called.
dropDownPosition
This variable controls the position of the drop down. It's an array of strings with the following values:
The list is positions is tried, in order, until a position is found where the drop down fits within the viewport.
focused
This widget or a widget it contains has focus, or is "active" because it was recently clicked.
forceWidth
Set to true to make the drop down exactly as wide as this widget. Overrides autoWidth.
hovering
True if cursor is over this widget
iconClass
Class to apply to DOMNode in button to make it display an icon
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.
intermediateChanges
Fires onChange for each value change or only on demand
label
Content to display in button.
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).
maxHeight
The max height for our dropdown. Any dropdown taller than this will have scrollbars. Set to 0 for no max height, or -1 to limit height to available space in viewport
name
Name used when submitting form; same as "name" attribute or plain HTML elements
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
scrollOnFocus
On focus, should this widget scroll into view?
showLabel
Set this to true to hide the label text and display only the icon. (If showLabel=false then iconClass must be specified.) Especially useful for toolbars. If showLabel=true, the label will become the title (a.k.a. tooltip/hint) of the icon.
The exception case is for computers in high-contrast mode, where the label will still be displayed, since the icon doesn't appear.
srcNodeRef
pointer to original DOM node
style
HTML style attributes as cssText string or name/value hash
tabIndex
Order fields are traversed when user hits the tab key
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:
By default is as the page direction.
title
HTML title attribute.
For form widgets this specifies a tooltip to display when hovering over the widget (just like the native HTML title attribute).
For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, etc., it's used to specify the tab label, accordion pane title, etc.
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.
type
Corresponds to the native HTML <input>
element's attribute.
value
Corresponds to the native HTML <input>
element's attribute.
_onBlur
()
This is where widgets do processing for when they stop being active, such as changing CSS classes. See onBlur() for more details.
_onFocus
()
This is where widgets do processing for when they are active, such as changing CSS classes. See onFocus() for more details.
_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
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.
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.
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());
});
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).
disconnect
( handle
)
Deprecated, will be removed in 2.0, use handle.remove() instead.
Disconnects handle created by connect
.
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).
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.
isLeftToRight
()
Return this widget's explicit or implicit orientation (true for LTR, false for RTL)
loadAndOpenDropDown
()
Creates the drop down if it doesn't exist, loads the data if there's an href and it hasn't been loaded yet, and then opens the drop down. This is basically a callback when the user presses the down arrow button to open the drop down.
onBlur
()
Called when the widget stops being "active" because focus moved to something outside of it, or the user clicked somewhere outside of it, or the widget was hidden.
onClose
()
Called when this widget is being displayed as a popup (ex: a Calendar popped up from a DateTextBox), and it is hidden. This is called from the dijit.popup code, and should not be called directly.
Also used as a parameter for children of dijit/layout/StackContainer
or subclasses.
Callback if a user tries to close the child. Child will be closed if this function returns true.
onDblClick
( event
)
Connect to this function to receive notifications of mouse double click events.
onFocus
()
Called when the widget becomes "active" because it or a widget inside of it either has focus, or has recently been clicked.
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
.
onKeyPress
( event
)
Connect to this function to receive notifications of printable keys being typed.
onMouseDown
( event
)
Connect to this function to receive notifications of when the mouse button is pressed down.
onMouseEnter
( event
)
Connect to this function to receive notifications of when the mouse moves onto this widget.
onMouseLeave
( event
)
Connect to this function to receive notifications of when the mouse moves off of this widget.
onMouseMove
( event
)
Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget.
onMouseOut
( event
)
Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget.
onMouseOver
( event
)
Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget.
onMouseUp
( event
)
Connect to this function to receive notifications of when the mouse button is released.
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
.
openDropDown
()
Opens the dropdown for this widget. To be called only when this.dropDown has been created and is ready to display (ie, it's data is loaded).
own
()
Track specified handles and remove/destroy them when this instance is destroyed, unless they were already removed/destroyed manually.
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.
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);
});
toggleDropDown
()
Callback when the user presses the down arrow button or presses the down arrow key to open/close the drop down. Toggle the drop-down widget; if it is up, close it, if not, open it