Javascript for Episerver 7.5 cms

SharedBlocksViewModel (constructor)

Location

epi-cms/component/SharedBlocksViewModel

Extends

Properties

_application

Instance of CMS application

_attrPairNames

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

_cachedValue

Represents the tooltip for an icon node

_currentContentContext

_currentContext

_siteTreeModel

Instance of SiteTreeModel

_waitingForContext

category

clipboardManager

Used to handle copy-paste operations with the commands.

commands

Used to handle currently selected items for the commands.

containedTypes

Which types to filter for list queries.

contentDataStore

contentRepositoryDescriptors

contextRootLabel

Overrides label of the contextual root node.

createCommands

Used to handle currently selected items for the commands.

createHierarchyCommands

Used to handle currently selected items for the commands.

currentListItem

The currently selected list item.

currentTreeItem

The currently selected tree item.

ignoreVersionWhenComparingLinks

isAvailableFlags

isMultilingual

Flag which indicates whether to support multi-languages

listQuery

Query object holding parameters to get the children. of the current tree item

listQueryOptions

Extra paramaters needed to query the store for the list items.

mainNavigationTypes

Which types to filter for tree queries. Also used with trash command.

menuType

Enum used with commands to set in what context they should be available.

pseudoContextualCommands

Used to handle currently selected items for the commands.

repositoryKey

searchArea

Used with the search component when querying to scope the search.

searchRoots

Used with the search component to set the roots to search in.

selection

Used to handle currently selected items for the commands.

showAllLanguages

Indicates if to query for items only in current language context or not.

store

Store instance used for all server queries.

storeKey

Key to resolve store from dependency.

treeStoreModel

TreeStoreModel instance.

typeDescriptorManager

Methods

public inherited method _changeAttrValue ( name , value )

Internal helper for directly changing an attribute value.

Parameters

protected method _compareUris ( obj1 , obj2 )

Checks if the URI:s are equal

Parameters

protected method _contentExistsInCurrentLanguage ( contentItem )

Check if the language branch for the current content differs from the current content language for the application.

Parameters

public inherited method _contextChanged ( _11 , _12 )

Parameters

public inherited method _createCommand ( type )

Parameters

public inherited method _createListChildrenQuery ( id , showAllLanguages , contentTypes )

Parameters

public inherited method _currentTreeItemSetter ( value )

Parameters

public inherited method _get ( name , names )

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

Parameters

protected method _getPseudoContextualContent ( )

Get pseudo contextual content


protected method _getSortSettings ( )

Returns the list of sort criteria.


public inherited method _initialContextChanged ( _13 , _14 )

Parameters

protected method _isContentContext ( ctx )

Verifies that the context has content data

Parameters

protected method _isSameAsCurrentContentContext ( ctx )

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

Parameters

protected method _isSameAsCurrentContext ( uri )

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

Parameters

protected method _isSiteMultilingual ( )

Check whether current site allows multilingual


protected method _setupCommands ( )

Creates and registers the commands used.


protected method _setupSearchRoots ( )

Creates and configures the treeStoreModel.


protected method _setupSelection ( )

Get target tree item and list item for selection


protected method _setupTreeStoreModel ( )

Creates an configures the treeStoreModel.


public inherited method _showAllLanguagesSetter ( value )

Parameters

public inherited method _updateAvailabilityForSpecificCommand ( command , menuType , isAvailableFlags )

Parameters

protected method _updateCommandAvailability ( menuType )

Updates the availability of the command dependant on which menu types it is registered for.

Parameters

protected method _updateCommands ( model , menuType )

Updates the current model for all commands needing this.

Parameters

protected method _updateCreateCommandModels ( model )

Update model of create commands.

Parameters

protected method _updateListQuery ( itemRef )

Creates a new query and updates the listQuery property.

Parameters

protected method _updateSelection ( model )

Updates the selection manager to the current model. Used when commands execute.

Parameters

public inherited method canHaveContextualContent ( contentItem )

Verifies the given object allowed to show contextual content or not

Parameters

public inherited method constructor ( _6 )

Parameters

protected method contentContextChanged ( context , callerData )

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

Parameters

protected method contentContextUpdated ( ctx , callerData )

Called when the currently loaded content updated.

Parameters

public inherited method contextChanged ( ctx , callerData )

Parameters

public inherited method contextChangeFailed ( ctx , _10 )

Parameters

public inherited method contextUpdated ( ctx , callerData )

Parameters

public inherited method createCommandClass ( )


public inherited method decoratePseudoContextualCommands ( commands )

Converts the given commands to work in case pseudo contextual content

Parameters

public inherited method destroy ( preserveDom )

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

Parameters

public inherited method get ( name )

Get a property on a Stateful instance.

Parameters

protected method getCommand ( commandName )

Gets a command by command name

Parameters

public inherited method getContentDataStore ( )

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


public inherited method getContextualRoot ( contentItem )

Get contextual content from the given content item data

Parameters

public inherited method getContextualRootName ( contentItem )

Get contextual root name based on the current content context data type.

Parameters

public inherited method getCreateCommands ( index )

Parameters

protected 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 hasContextual ( contentAncestors )

Verifies the given tree node has a ancestor is contextual or not

Parameters

public inherited method isContextualContent ( contentItem )

Verifies the given content item data is contextual or not

Parameters

public inherited method isContextualRoot ( contentItem )

Checks to see the given data item object is contextual root or not

Parameters

public inherited method isPseudoContextualRoot ( contentItem )

Checks to see if the item is a pseudo contextual content

Parameters

public inherited method isTypeOfRoot ( contentItem )

Checks to see if the item is type of root node such as: root, sub root, context root

Parameters

public inherited method itemChanged ( id , item )

Notification event when an item has been patched or reloaded.

Parameters

public inherited method onListItemSelected ( model )

Handles changes to the slection in the list and updates the viev model

Parameters

public inherited method onListItemUpdated ( updatedItems )

Refresh the editing media if it have a new version

Parameters

public inherited method onSearch ( metadata )

Handles changes as a result of a user search

Parameters

public inherited method onTreeItemSelected ( model , isRoot )

Handles changes to the slection in the tree and updates the viev model

Parameters

protected method own ( )

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


public inherited method postscript ( args )

Parameters

public inherited method set ( name , value )

Set a property on a Stateful instance

Parameters

protected method startup ( )

Allows the view model to start reacting to external input.


public method treeStoreModelClass ( )

Class to use as model for the tree.


protected method upload ( fileList )

Implementation needs to overwrite this to process upload files action.

Parameters

public inherited method watch ( name , callback )

Watches a property for changes

Parameters