Javascript for Episerver 7.5 cms

ItemCollectionViewModel (constructor)

Summary

The link collection editor view model.

Description

That supports: Move next/previous/remove logic

Location

epi-cms/contentediting/viewmodel/ItemCollectionViewModel

Extends

Properties

_attrPairNames

Used across all instances a hash to cache attribute names and their getter and setter names.

_defaultDataStoreName

Default data store name to get from registry, if store is null.

iconTypeKey

Property name for the IconType value.

id

The identifier of this.

itemModelClass

The item's class got from itemModelType.

itemModelType

The item model's class name can be injected from inheritance or caller.

module

"epi-cms/contentediting/viewmodel/ItemCollectionViewModel"

permanentUrl

The permanent url of this item. That prop equal to href prop If the item parsed from an converted item, should update href prop by this.

publicUrl

The public url of this item

textKey

titleKey

typeIdentifier

The item's content type.

Methods

public method _canEditGetter ( )

The method used in "canEdit" link item command


public method _canMoveNextGetter ( )

Override the get('canMoveNext') method that used in command


public method _canMovePreviousGetter ( )

Override the get('canMovePrevious') method that used in command


public inherited method _changeAttrValue ( name , value )

Internal helper for directly changing an attribute value.

Parameters

public method _dataGetter ( )

Override base "get('data')" method to return array of serialized data.


public method _dataSetter ( data )

Override base "set('data')" method to init data of this model.

Parameters

public inherited method _get ( name , names )

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

Parameters

public inherited method _iconTypeIdentifierGetter ( )


public method _init ( data )

Initialize the mode

Parameters

public inherited method _nameGetter ( )


public inherited method _onTryUpdateItemModel ( )

Callback method that called when we need updated item's model


public inherited method _permanentUrlSetter ( value )

Customize default set method for permanentUrl prop.

Parameters

public inherited method _publicUrlGetter ( )

Customize get method to return correct a public url.


public method _selectedItemGetter ( )

Override base "get('selectedItem')" method to return selected item.


public method _selectedItemSetter ( value )

Override base "set('selectedItem')" method to set selected item.

Parameters

public inherited method _textGetter ( )


public inherited method _titleGetter ( )


public method _valueGetter ( )

Override base "get('value')" method to return array of serialized data.


public method addTo ( newItem , item , before )

The method used when drag and drop item into LinkCollectionEdtior

Parameters

public method constructor ( data , options )

Create new instance of ItemCollectionViewModel Parse original data to

Parameters

public inherited method destroy ( preserveDom )

Destroy this class, releasing any resources registered via own().

Parameters

public inherited method emit ( type , event )

Parameters

public inherited method get ( name )

Get a property on a Stateful instance.

Parameters

public method getItemIndex ( item )

Get item index in the data array

Parameters

public inherited method modify ( callback , scope , emitChanged )

Method used to wrap several changes in one "operation" When the callback has been executed the "changed" event will be emitted

Parameters

public method moveNext ( )

The method used in "MoveToNext" command


public method movePrevious ( )

The method used in "MoveToPrevious" command


public method moveTo ( selectedItem , item , before )

The method used when drag and drop selected item to reorder

Parameters

public inherited method on ( type , listener )

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

User can be dnd some kind of data, so we need an generic method to process allover. That should be implemented by deliver class

Parameters

public method postscript ( data )

Parameters

public method remove ( )

The method used in "BlockRemove" command


public inherited method serialize ( )

Serialize data to be accepted by server


public inherited method set ( name , value )

Set a property on a Stateful instance

Parameters

public inherited method watch ( name , callback )

Watches a property for changes

Parameters