v0.9.3 view commit logs
-
CompositeView
- Cleaned up the method to get / cache the
itemViewContainer
- Allow
itemViewContainer
to be a function that return a jQuery selector string
- Cleaned up the method to get / cache the
-
View
render
methods all returnthis
in the standard Marionette views (the async views still return a deferred object).
v0.9.2 view commit logs
-
CompositeView
- Added
itemViewContainer
to specify which element children / itemView instances should be appended to
- Added
-
CollectionView
- Now triggers "before:render" and "render" events
-
Region
- Returns a deferred/promise from the
show
method, with Marionette.Async
- Returns a deferred/promise from the
-
Fixed bug in template cache for Marionette.Async
-
Marionette can now be installed with Volo
v0.9.1 view commit logs
- CollectionView and CompositeView properly close their
emptyView
instance when an item is added to the view's collection - CollectionView and CompositeView will show their
emptyView
after the last item has been removed from the collection
v0.9.0 view commit logs
-
BREAKING Async Support Removed From Core Marionette
- Marionette no longer supports asynchronous / deferred rendering in any view, by default
- Async / deferred rendering are now provided via
backbone.marionette.async.js
add-on
-
Split the single src/backbone.marionette.js file into multiple files for easier maintenance
-
Marionette.Async:
- Added
Marionette.Async
add-on which provides support for rendering and retrieving templates asynchronously
- Added
-
Marionette.View:
- BREAKING Renamed the
getTemplateSelector
method togetTemplate
- Call
unbindAll
to unbind all bound events, later in the close process, so theclose
event can be listened to
- BREAKING Renamed the
-
ItemView:
- BREAKING The
template
attribute no longer allows you to specify a function that returns a jQuery selector. OverridegetTemplate
to do this. - BREAKING The
renderHtml
method has been removed from the ItemView - BREAKING Async support removed
- BREAKING The
-
CollectionView:
- BREAKING Async support removed
- Now supports optional
emptyView
attribute, to specify what view to render when no items exist in the collection - Fixed a memory leak for closed item views
- ItemView is now guaranteed to have it's "onRender" and "onShow" methods called, when rendering the collection and when adding a new item to the collection / rendering the new item view
- Calls an
onItemAdded
method when adding an item/item view, just prior to rendering the item view - Can now specify an
itemViewOptions
object literal on your collection view definition, and the data will be passed to each itemView instance as part of the itemView's options - The
appendHtml
method receives a third argument of the itemView's "index" for sorted collections
-
CompositeView:
- BREAKING When a CompositeView's collection is reset, only the collection will be re-rendered. It will no longe re-render the composite's template/model, just the collection.
- BREAKING Async support removed
- (see change list for
CollectionView
)
-
Layout:
- BREAKING Regions specified within a layout are now available immediately after creating a layout instance
- BREAKING Re-rendering a layout will close all regions and reset them to the new DOM elements that were rendered
- BREAKING Layouts no longer have a
.vent
event aggregator hanging off them - BREAKING Async support removed
-
Region:
- BREAKING Removed the ability to send a second parameter to a regions' "show" method
- BREAKING Changed the implementation of
Region
to allow easier overriding of how the new view is added to the DOM - BREAKING Async support removed
-
TemplateCache:
- BREAKING Moved TemplateCache to object instances instead of single object literal
- BREAKING Moved the
loadTemplate
andcompileTemplate
toTemplateCache.prototype
- BREAKING
TemplateCache.get
no longer accepts a callback method. It always returns jQuery promise
-
Renderer:
- BREAKING Removed the
renderHtml
method - Rendering a pre-compiled template function is now much easier - just override the
Renderer.render
method.
- BREAKING Removed the
-
Modules:
- BREAKING Modules must be defined on an instance of a Marionette.Application, and cannot be defined from another module directly
- BREAKING Modules no longer allow you to return a custom module object from the module definition function
- BREAKING Modules no longer allow you to add initializers to them
- BREAKING Modules no longer have a
.vent
event aggregator hanging off them - Extracted
Marionette.Module
in to it's own constructor function to be used as modules, instead of Marionette.Application - Modules allow you to pass in any arbirary arguments, after the module definition function, and they will be supplied to the module definition function
- The
this
argument in a module definition function is now the module itself
-
Callbacks:
- BREAKING Switched the order of parameters for the
run
method toargs, context
- BREAKING Switched the order of parameters for the
-
BindTo:
- The unbinding of an event now considers the
context
parameter when unbinding, allowing multiple handers to be bound to the same event from the same object, and unbinding only one of them
- The unbinding of an event now considers the
v0.8.4 view commit logs
- Fixed: A call to
.module
will correctly pass theApplication
instance from which.module
was called, as the second parameter of the module definition function
v0.8.3 view commit logs
- Module definitions can be split across multiple files and/or multiple calls to define the module
v0.8.2 view commit logs
- Views now have the ability to define
triggers
which will convert a DOM event in to aview.trigger
event
v0.8.1 view commit logs
- Module definition functions will only be applied to the last module in the . chain
v0.8.0 view commit logs
- Added modules and sub-modules through the Application object
- An
itemView
instance as part of a Collection View or Composite View, will have it's events bubbled up through the parent view, prepended with "itemview:" as the event name
- The
onBefore
method of ItemView can now return a deferred object - Code cleanup for rendering methods
- Fixed issue with
unbindAll
in BindTo, that was skipping some items
- The
bindTo
method on theEventAggregator
now returns a binding configuration object - Automatic mixing in of
templateMethods
as template / view helper methods, in views that use theserializeData
function - A friendlier error message will be thrown from an appRouter if a route is configured with a method that does not exist on the controller
- Extracted
compileTemplate
method in TemplateCache for clarity and easier modification - ItemView will wait until
onRender
has completed before triggering other rendered events - Region now supports an
onShow
method, when defining a custom region - Moved the default
serializeData
method to the base Marionette.View - CompositeView now calls the
serializeData
method to get the model's data for the view BindTo
changes:- The
bindTo
method returns a "binding" object so that it can be unbound easily - Now has an
unbindFrom
method that will unbind a binding object
- The
- ItemView now has a
renderHtml
method that can be overriden to render the item view's data - Region now supports an
initialize
function when extending a region to your own object type - CollectionView correctly defers until all children are rendered
- Underscore templates are cached as pre-compiled templates, instead of re-compiling them on every render
- Updating AMD support to also work with CommonJS / NodeJS
- Correctiong build to include header / license info for all output files
- Pass JSLint with no warnings (run w/ Anvil.js build process)
- Removed GZip release files, as they were broken anyways
- BREAKING: The
renderTemplate
method has moved from theItemView
prototype on to theRenderer
object - BREAKING: The
appendHtml
method of theCollectionView
now takescollectionView, itemView
as the arguments, instead ofel, html
- Added
Marionette.View
object, to contain a few basic parts of every Marionette view - Added
Marionette.Renderer
object, to handle template rendering - Views correctly trigger the "close" events before unbinding event subscribers
- Additional
CollectionView
changes:- Extracted
getItemView
method to retrieve theitemView
type, either fromthis.itemView
orthis.options.itemView
- Extracted
buildItemView
method to build each item's view - Renamed
removeChildView
toremoveItemView
to make the language consistent - Triggers "item:added" event after each item has been added
- Triggers "item:removed" event after an item has been removed
- Extracted
CompositeView
changes:- No longer takes a
modelView
. Now directly renders thetemplate
specified - Defaults to a recurive structure, where
itemView
is the current composite view type
- No longer takes a
- A
Region
will trigger ashow
event from any view that it shows - Added common "render" event to all the view types
- Updated to Backbone v0.9.2
- Updated to jQuery v1.7.2
- AMD / RequireJS compliant version is provided
- Now using Anvil.js for builds
- 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