LogInView
Provides a Backbone.View
allowing a user to login or sign up.
Constructor Summary
Public Constructor | ||
public |
Sets the element this view is associated with to |
Member Summary
Public Members | ||
public get |
Delegated events for logging in and signing up. |
Method Summary
Public Methods | ||
public |
Binds |
|
public |
Attempts to login a user and on success dispatches a |
|
public |
render() Renders the login view. |
|
public |
Attempts to sign up a user and on success dispatches a |
Inherited Summary
From class Events | ||
public |
bind(): * Delegates to |
|
public |
Tell an object to listen to a particular event on an other object. |
|
public |
listenToOnce(obj: object, name: string, callback: function): Events Just like |
|
public |
Remove a previously-bound callback function from an object. |
|
public |
Bind a callback function to an object. |
|
public |
Just like |
|
public |
stopListening(obj: object, name: string, callback: function): Events Tell an object to stop listening to events. |
|
public |
Trigger callbacks for the given event, or space-delimited list of events. |
|
public |
unbind(): * Delegates to |
From class View | ||
public get |
The default |
|
public |
Cached jQuery context for element. |
|
public |
Client ID |
|
public |
Cached element |
|
public |
If jQuery is included on the page, each view has a $ function that runs queries scoped within the view's element. If you use this scoped jQuery function, you don't have to use model ids as part of your query to pull out specific elements in a list, and can rely much more on HTML class attributes. |
|
public |
Add a single event listener to the view's element (or a child element using |
|
public |
delegateEvents(events: object): View Uses jQuery's on function to provide declarative callbacks for DOM events within a view. If an events hash is not passed directly, uses this.events as the source. Events are written in the format {"event selector": "callback"}. The callback may be either the name of a method on the view, or a direct function body. Omitting the selector causes the event to be bound to the view's root element (this.el). |
|
public abstract |
Initialize is an empty function by default. |
|
public |
Removes a view and its el from the DOM, and calls stopListening to remove any bound events that the view has listenTo'd. |
|
public abstract |
The default implementation of render is a no-op. |
|
public |
setElement(element: string | object): View If you'd like to apply a Backbone view to a different DOM element, use setElement, which will also create the cached $el reference and move the view's delegated events from the old element to the new one. |
|
public |
undelegate(eventName: string, selector: string, listener: function): View A finer-grained |
|
public |
Removes all of the view's delegated events. Useful if you want to disable or remove a view from the DOM temporarily. |
|
protected |
_createElement(tagName: string): Element Produces a DOM element to be assigned to your view. |
|
protected |
Ensure that the View has a DOM element to render into. |
|
protected |
Remove this view's element from the document and all event listeners attached to it. Exposed for subclasses using an alternative DOM manipulation API. |
|
protected |
_setAttributes(attributes: object) Set attributes from a hash on this view's element. Exposed for subclasses using an alternative DOM manipulation API. |
|
protected |
_setElement(el: string | object) Creates the |
Public Constructors
public constructor source
Sets the element this view is associated with to .content
.
Override:
View#constructorPublic Members
Public Methods
public initialize() source
Binds this
to the methods specified and renders the view.