- CollectionView and CompositeView can render without a collection
ItemView
changes- Calls a
beforeRender
andbeforeClose
method on the view, if it exists - Triggers a
item:before:render
event, just prior to rendering - Triggers a
item:before:close
anditem:closed
events, around the view'sclose
method
- Calls a
CollectionView
changes- Calls a
beforeRender
andbeforeClose
method on the view, if it exists - Triggers a
collection:before:render
event before rendering - Triggers a
collection:before:close
andcollection:closed
event, surrounding closing of the view
- Calls a
- The
CollectionView
andCompositeView
now close child views before closing itself
- BREAKING: The
CollectionView
no longer has areRender
method. Callrender
instead - BREAKING: The
TemplateCache.get
method now returns a plain string instead of a jQuery selector object - Fixed a bug with closing and then re-using a Layout with defined regions
- Fixed a potential race condition for loading / caching templates where a template would be loaded multiple times instead of just once
- Fixed the composite view so that it renders the collection correctly when the collection is "reset"
- Fixed the composite view so that it re-renders correctly
- Fixed various deferred usages to only return promises, instead of the full deferred object
-
BREAKING: Renamed
LayoutManager
toLayout
-
BREAKING: Renamed
RegionManager
toRegion
-
BREAKING: Renamed
TemplateManager
toTemplateCache
-
Layout
- BREAKING:
Layout.render
no longer returns the view itself, now returns a jQuery deferred object - The
.vent
attribute is now available in theinitializer
method - Ensures that regions select the
$el
within the Layout's$el
instead of globally on the page - Initialize the regions before the layout, allowing access to the regions in the
onRender
method of the layout - Close the Layout's regions before closing the layout itself
- BREAKING:
-
CompositeView
- BREAKING:
CompositeView.render
no longer returns the view itself, now returns a jQuery deffered object - Will only render the collection once. You can call
renderCollection
explicitly to re-render the entire collection - Will only render the model view once. You can call
renderModel
explicitly to re-render the model - Correctly close and dispose of the model view
- Triggers various events during rendering of model view and collection view
- Calls 'onRender' method of composite view, if it exists
- BREAKING:
-
ItemView
- BREAKING:
ItemView.render
no longer returns the view itself, now returns a jQuery deferred object - Optimization to only call
.toJSON
on either model or collection, not both - Trigger "item:rendered" method after rendering (in addition to calling onRender method of the view)
- BREAKING:
-
CollectionView
- BREAKING:
CollectionView.render
no longer returns the view itself, now returns a jQuery deferred object - Trigger "collection:rendered" method after rendering (in addition to calling onRender method)
- BREAKING:
-
Large updates to the readme/documentation
-
Heavy use of
jQuery.Deferred()
andjQuery.when/then
to better support asynchronous templates and rendering
- BREAKING: Renamed
CompositeRegion
toLayoutManager
- Aliased CompsiteRegion to LayoutManager for backwards compatibility
- Bug fix for correctly initializing LayoutManager with specified options in constructor
- Controller methods fired from an
AppRouter
are now called withthis
set to the controller, instead of the router - Fixed a bug in the CompositeView where the list wouldn't render when passing in a populated collection
- BREAKING: Extraced
CompositeView
out of the collection view - Added
CompositeView
for managing leaf-branch/composite model structures - Added
CompositeRegion
for managing nested views and nested region managers - Added
attachView
method toRegionManager
to attach existing view without rendering / replacing - Specify how to attach HTML to DOM in region manager's
show
method
- Don't re-render an ItemView when the view's model "change" event is triggered
- Allow
RegionManager
to be instantiated with anel
specified in the options - Change how RegionManagers are added to an Application instance, to reduce memory usage from extraneous types
- AppRouter can have it's
controller
specified directly in the router definition or in the construction function call - Extracted
Marionette.EventAggregator
out in to it's own explicit object
- CollectionView closes existing child views before re-rendering itself, when "reset" event of collection is triggered
- CollectionView now has "initialEvents" method which configures it's initial events
- ItemView now has "initialEvents" method which configures it's initial events
- CollectionView renders itself when the view's collection "reset" event is fired
- ItemView renders itself when the view's model "change" event is fired
- ItemView renders itself when the view's collection "reset" event is fired
- Fixed bug with RegionManagers trying to select element before DOM is ready, to lazy-select the element on first use of
show
- BREAKING: Removed the
setOptions
method from theCallbacks
object - Refactored
Callbacks
object to use a jQuery Deferred instead of my own code - Fixed template manager's
clear
so it properly clears a single template, when only one is specified - Refactored the
RegionManager
code to support several new features- now support returning a jQuery deferred object from a view's
render
method - now have a
close
method that you can call to close the current view - now trigger a "view:show" and "view:close" event
- correctly remove reference to previous views, allowing garbage collection of the view
- now support the
bindTo
andunbindAll
methods, for binding/unbinding region manager events
- now support returning a jQuery deferred object from a view's
- Minor fix to context of template manager callback, to fix issue w/ async template loading
- BREAKING: Rewrote the template manager to be async-template loading friendly
- BREAKING: Dropping support for Backbone v0.5.3 and below
- Added
Marionette.Callbacks
to manage a collection of callbacks in an async-friendly way - Guarantee the execution of app initializer functions, even if they are added after the app has been started.
- App triggers "start" event after initializers and initializer events
- Updated to Backbone v0.9.1
- Make region managers initialize immediately when calling
app.addRegions
- BREAKING:
view.el
forItemView
andCollectionView
is no longer a jQuery selector object. Useview.$el
instead - BREAKING:
regionManger.el
is no longer a jQuery selector object. UseregionManager.$el
instead - Updated to use Backbone v0.9.0
- Updated to use Underscore v1.3.1
- Removed default
itemView
from theCollectionView
definition CollectionView
now explicitly checks for anitemView
defined on it, and throws an error if it's not found
- Bind the context (
this
) of application initializer functions to the application object
- Added
AppRouter
, to reduce boilerplate routers down to simple configuration CollectionView
can be treated as a composite view, rendering anmodel
and acollection
of models- Now works with either jQuery, Zepto, or enter.js
ItemView
will throw an error is no template is specified
- Return
this
(the view itself) fromItemView
andCollectionView
render
method - Call
onRender
after theCollectionView
has rendered itself
- Fixed global variable leaks
- Removed declared, but unused variables
- Fixed binding events in the collection view to use
bindTo
(#6) - Updated specs for collection view
- Documentation fixes (#7)
- Added
TemplateManager
to cache templates - CollectionView binds to add/remove and updates rendering appropriately
- ItemView uses
TemplateManager
for template retrieval - ItemView and CollectionView set
this.el = $(this.el)
in constructor
- Added
ItemView
- Added
CollectionView
- Added
BindTo
- Simplified the way
extend
is pulled from Backbone
- Initial release
- Created documentation
- Generated annotated source code