Javascript for Episerver 7.5 cms

ContentList (constructor)

Location

epi-cms/widget/ContentList

Extends

Properties

_attrPairNames

_blankGif

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

_currentContentContext

_currentContext

_focusManager

_setClassAttr

_setDirAttr

_setIdAttr

_setLangAttr

_started

startup() has completed.

_waitingForContext

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" }

baseClass

This class name is applied to the widget's domNode and also may be used to generate names for sub nodes, for example dijitTabContainer-content.

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.

contentDataStore

contextChangeEvent

Configure double click on a row to cause a context change.

currentItem

defaultGridMixin

An object with default settings for dnd to mixin to the grid class.

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.

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.

editingItem

Keeps the selected content information

focused

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

grid

The grid that is used to display information.

gridAttachNode

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.

ignoreVersionWhenComparingLinks

If item comparison should consider versions or not.

isLayoutContainer

Indicates that this widget is going to call resize() on its children widgets, setting their size, when they become visible.

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).

noDataMessage

No data message text for grid content list incase it has no data to display

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

query

Grid query object

queryOptions

Grid query options object

resources

Public resources for grid content list

srcNodeRef

pointer to original DOM node

store

The store that contains the data.

storeKeyName

style

HTML style attributes as cssText string or name/value hash

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

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.

trackActiveItem

Methods

public inherited method _aroundInsertRow ( original )

Called 'around' the insertRow method to fix the grids less than perfect selection.

Parameters

public inherited method _changeAttrValue ( name , value )

Internal helper for directly changing an attribute value.

Parameters

public inherited method _compareUris ( obj1 , obj2 )

Checks if the URI:s are equal

Parameters

public inherited method _contextChanged ( _11 , _12 )

Parameters

public inherited method _createUserFriendlyUsername ( name )

Parameters

public inherited method _forceKeepContext ( uri )

Parameters

public inherited method _get ( name , names )

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

Parameters

public inherited method _getBaseSettings ( contextMenu )

Parameters

public inherited method _getCurrentItem ( )

Get current context row based on current context


public inherited method _initialContextChanged ( _13 , _14 )

Parameters

public inherited method _isActiveItem ( row )

Parameters

public inherited method _isContentContext ( ctx )

Verifies that the context has content data

Parameters

public inherited method _isSameAsCurrentContentContext ( ctx )

Checks if the content context has Id and PreferredLanguage the same as the already loaded current content context.

Parameters

public inherited method _isSameAsCurrentContext ( uri )

Checks if the URI is the same as the already loaded context.

Parameters

public inherited method _localizeDate ( value )

Parameters

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 method _onChangeContext ( evt )

Go to content edit mode when change context event raised

Parameters

public inherited method _onError ( error )

Shows an error message to the user when failing to load data.

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 _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 inherited method _onShow ( )

Internal method called when this widget is made visible. See onShow for details.


public inherited method _renderContentItem ( object , value , node , options )

Parameters

public inherited method _requestNewContext ( contextParameters , callerData )

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 method _setCurrentItemAttr ( value )

Store the selected content information on the first load

Parameters

public inherited method _setFocusedAttr ( val )

Parameters

public method _setNoDataMessageAttr ( value )

Set text message for grid content list incase it has no data.

Parameters

public inherited method _setOwnerDocumentAttr ( val )

Parameters

public inherited method _setQueryAttr ( value )

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 _setupChild ( child )

Common setup for initial children and children which are added after startup

Parameters

public inherited method _showErrorMessage ( errorMessage )

Parameters

public inherited method addChild ( child , insertIndex )

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 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 constructor ( params , srcNodeRef )

Create the widget.

Parameters

public inherited method contentContextChanged ( ctx , callerData )

Called when the currently loaded content changes. I.e. a new content data object is loaded into the preview area.

Parameters

public inherited method contentContextUpdated ( ctx , callerData )

Called when the currently loaded content updated.

Parameters

public inherited method contextChanged ( context , callerData )

Parameters

public inherited method contextUpdated ( ctx , callerData )

Parameters

public inherited method createList ( )

Hides grid header by default


public inherited method createModel ( )

Override to construct the default model for the list and context menu.


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 )

Recursively destroy the children of this widget and their descendants.

Parameters

public inherited method destroyRecursive ( preserveDom )

Destroy this widget and its descendants

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 method editContent ( item )

Enable editing mode for the given content

Parameters

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 fetchData ( )

Override this method to implement your logic to bind data to the grid.


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 getContentDataStore ( )

Gets the content data store from store registry if it's not already cached


public inherited method getContextMenu ( )


public inherited method getCurrentContent ( )

Returns either the current content or a deferred which will resolve a content data as soon as it becomes available.


public inherited method getCurrentContext ( )


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 getIndexInParent ( )

Returns the index of this widget within its container parent. It returns -1 if the parent does not exist, or if the parent is not a dijit._Container


public inherited method getIndexOfChild ( child )

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

Parameters

public method getListSettings ( )

Initialization a list.


public inherited method getNextSibling ( )

Returns null if this is the last child of the parent, otherwise returns the next element sibling to the "right".


public inherited method getParent ( )

Returns the parent widget of this widget


public inherited method getPreviousSibling ( )

Returns null if this is the first child of the parent, otherwise returns the next element sibling to the "left".


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 hasChildren ( )

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


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 itemChanged ( id , item )

Notification event when an item has been patched or reloaded.

Parameters

public inherited method layout ( )

Widgets override this method to size and position their contents/children. When this is called this._contentBox is guaranteed to be set (see resize()).

This is called after startup(), and also when the widget's size has been changed.


public inherited method on ( type , func )

Parameters

public inherited method 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.


public inherited method onClick ( event )

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

Parameters

public inherited method 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.


public inherited method onContextChanged ( )


public inherited method onDblClick ( event )

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

Parameters

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 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 inherited method onPostCreateSettings ( )


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 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 ( )


public inherited method postMixInProperties ( )


public inherited method removeChild ( child )

Parameters

public inherited method resize ( changeSize , resultSize )

Call this to resize a widget, or after its size has changed.

Parameters

public inherited method restore ( )


public inherited method select ( item )

Select a grid row from the given item

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 method setupEvents ( )

Initialization events on list.


public inherited method startup ( )

Connects event handlers to common grid events.


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 method toggleCut ( item , isCut )

Toggle cutting styles for the given item in the grid content list

Parameters

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 watch ( name , callback )

Watches a property for changes

Parameters