Class Index | File Index

Classes


Class CommentView


Extends Backbone.View.
CommentView
Defined in: commentview.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Comment controller and view DOM event and comment model event handlers should live here.
Field Summary
Field Attributes Field Name and Description
 
CSS class name of the container element
 
The map of delegated event handlers
 
Html tag name of the container element that'll be created when initializing new instance.
Method Summary
Method Attributes Method Name and Description
 
edit()
Edit button click handler
 
Handles form save success event
 
View init method, subscribing to model events
 
Override the default view remove method with custom actions
 
Render the new comment DOM element from a template using Mustache
 
"Reverse" button click handler
Class Detail
CommentView()
Comment controller and view DOM event and comment model event handlers should live here. This view handles comment edit, delete and the sample text reverse actions, also listens to model change and destroy events to update the view in DOM.
Author: Bodnar Istvan .
Field Detail
{String} className
CSS class name of the container element

{Object} events
The map of delegated event handlers

{String} tagName
Html tag name of the container element that'll be created when initializing new instance. This container is then accessible via the this.el (native DOM node) or this.$el (jQuery node) variables.
Method Detail
{Boolean} edit()
Edit button click handler
Returns:
{Boolean} Returns false to stop propagation

handleEditSuccess(model)
Handles form save success event
Parameters:
model

initialize()
View init method, subscribing to model events

remove()
Override the default view remove method with custom actions

{CommentView} render()
Render the new comment DOM element from a template using Mustache
Returns:
{CommentView} Returns the view instance itself, to allow chaining view commands.

{Boolean} reverse()
"Reverse" button click handler
Returns:
{Boolean} Returns false to stop propagation

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jul 10 2012 11:17:08 GMT+0200 (CEST)