Javascript for Episerver 7.5 cms

ContentViewModel (constructor)

Location

epi-cms/contentediting/ContentViewModel

Extends

Properties

_attrPairNames

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

_contentVersionStore

_converterRegistry

_isSuspended

_syncRetryTimeout

contentData

contentDataStore

contentLink

contentModel

contextTypeName

editorFactory

hasErrors

hasPendingChanges

hasRedoSteps

hasUndoSteps

isChangingContentStatus

isCreatingNewVersion

isOnline

isSaved

isSaving

isValid

languageContext

lastSaved

metadata

profileHandler

syncInterval

syncService

undoManager

validator

viewName

Methods

public inherited method _changeAttrValue ( name , value )

Internal helper for directly changing an attribute value.

Parameters

public method _commitChanges ( properties )

Schedules the supplied properties to the server and creates ONE undo step for the changes

Parameters

public method _contentLinkChanged ( oldContentLink , newContentLink )

Parameters

public method _createSyncService ( )

Creates and returns a new sync service instance.


public inherited method _get ( name , names )

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

Parameters

public method _loadPublishedVersion ( contentLink )

Parameters

public method _onSynchronizeSuccess ( contentLink , properties , results )

Handler when a property has been successfully synchronized

Parameters

public method _patchContentDataStore ( contentLink , propertyName , oldValue , newValue )

Updates the named named property in the current content data store with value in newValue

Parameters

public method _populateContentModel ( data , metadata )

Parameters

public method _save ( )


public method _saveProperties ( properties )

Updates the model with an array of properties as one "unit" causing one undo step. Primaryly used as undo/redo callback

Parameters

public method _setModelProperty ( propertyName , value , oldValue )

Sets a property value on the content model and adds a save operation to the internal operation object

Parameters

public method abortOperation ( )

Abort an ongoing multi property operation.


public method beginOperation ( )

Start a multi property operation where all property changes are should be handled as one undo step.


public method canChangeContent ( action )

Check if current user can change on the active content using the given action.

Parameters

public method canEditCurrentLanguage ( )

Check if the current content language can be edited in the current language context.


public method canTranslateContent ( )


public method changeContentStatus ( status )

Parameters

public method clear ( )


public method connectLocal ( targetArray , obj , evt , listener )

Parameters

public method constructor ( )


public method createContentModelObject ( metadata )

Create

Parameters

public method createDraft ( )


public method destroy ( )


public method disconnectLocal ( targetArray )

Parameters

public method editCommonDraft ( )


public method endOperation ( )

End a multi property operation, creating an undo step.


public method ensureWritableVersion ( )

Ensures that we are editing a writable version

tags: private


public inherited method get ( name )

Get a property on a Stateful instance.

Parameters

public method getContentModelAndMetadata ( )


public method getMetadataThenUpdateModel ( )


public method getProperty ( propertyName )

Parameters

public method getPropertyMetaData ( propertyName )

Return metadata of a property.

Parameters

public method hasAccess ( action )

Check if current user has access on the active content using the given action.

Parameters

public method hasEditAccess ( )

Check if current user has access right to edit the content


public method onContentChange ( )

Raised before making changes that will eventually change content


public method onMetadataResolve ( success )

Fired when content metadata resolves or fails to load.

Parameters

public method onPropertyEdited ( propertyName , value )

Called when a property has been edited.

Parameters

public method onSuspend ( )

Raise onSuspend current view model


public inherited method own ( )

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


public method postscript ( )


public method publishProperty ( propertyName , value )

Parameters

public method redo ( )


public method resetNotifications ( )


public method revertToPublished ( )


public method save ( )


public inherited method set ( name , value )

Set a property on a Stateful instance

Parameters

public method setActiveProperty ( name )

Set property to active, which would bring up property's editor.

Parameters

public method setProperty ( propertyName , value , oldValue )

Parameters

public method suspend ( )

Suspends the editing for this view model.


public method undo ( )


public method validate ( )

Validate the model

tags: public


public method wakeUp ( )

Wake the suspended content view model up.


public inherited method watch ( name , callback )

Watches a property for changes

Parameters