| Info: | See github for the latest source. |
|---|---|
| Version: | 0.1.0 |
| License: | MIT, see LICENSE file. |
Just some extensions we have found useful for a Supervisory MVC structure:
Backbone.proxyTranslate a concrete event into an abstract event, or simply pass the message up the MVC chain.
Backbone.ControllerAn alias for View, for semantic clarity.
getModelNameGet the model name from the urlRoot, assuming a URL naming convention of
/api/<model_name>.
toDisplaySimilar to
toJSON, but formats moment.js objects with supplied date format.
toDisplayMap
toDisplayon each model in the collection.
fetchAndAddOneFetch a model object by id and add it to the collection.
addUniqueAdd only models not already in collection, rejecting models with duplicate ids.