Class NewButtonView
Extends
Backbone.View.
NewButtonView
Defined in: newbuttonview.js.
Constructor Attributes | Constructor Name and Description |
---|---|
New comment creation button
|
Field Attributes | Field Name and Description |
---|---|
The map of delegated event handlers
|
Method Attributes | Method Name and Description |
---|---|
Click event handler that first creates a new empty comment model, and assigns the model to a FormView instance.
|
|
handleFormSuccess(model)
Method to handle FormView success event
|
|
Initialize view, make sure button has a comment collection to work with
|
Field Detail
{Object}
events
The map of delegated event handlers
Method Detail
{Boolean}
createComment()
Click event handler that first creates a new empty comment model, and assigns the model to a FormView instance.
FormView will handle internally new comment creation and existing comment editing.
- Returns:
- {Boolean} Returns false to stop propagation
handleFormSuccess(model)
Method to handle FormView success event
- Parameters:
- {CommentModel} model
- Model data returned by FormViews save request
initialize()
Initialize view, make sure button has a comment collection to work with