69 KiB
v2.3.1 view commit logs
2.3.1 in overview:
Features
- Regions can set a
parentElas a way of specifying the DOM tree (defaultbody) that they are scoped with. (useful for instance inLayoutView).
var region = new Region({parentEl: $(“#sub-tree”)})
Bug Fixes
-
Layout region lookups are now scoped to the layout and not to the entire DOM.
-
Calling
delegateEventsafter theuihash has been modified now works. -
Prevent unsetting event listeners on region swap when a view is swapped out from a region, but not destroyed, its DOM events will not be removed.
-
A view's
isDestroyedstate is now explicitly set tofalsewhen the view is created.
Refactors
-
Added
Marionette._getValue. This method is similar to_.result. If a function is provided we call it with context otherwise just return the value. If the value is undefined return a default value. This method is private and should not be used directly in your code. -
Various other code refactors.
v2.3.0 view commit logs
2.3.0 in overview:
This release of Marionette contains a significant amount of code optimizations and refactors. These changes will not be visible to you as end user however as they improve the underlying base of Marionette and speed up your app to improve consistency across the base classes. Such speed ups are most visible in the great work @megawac has been doing in both serializeData and triggerMethod
As always you can come chat with us in the main chatroom at https://gitter.im/marionettejs/backbone.marionette/
Work has been continuing on improving the documentation of Marionette, via an external custom JSDOC tool that @ChetHarrison has been spear heading via https://github.com/ChetHarrison/jsdoccer
If you have not already checked out Marionette Inspector, it is a great tool that Jason Laster has been working on to make debugging and working with marionette much easier. https://github.com/MarionetteLabs/marionette.inspector
Features
- Marionette.isNodeAttached
- Determines whether the passed-in node is a child of the
documentor not.
- Determines whether the passed-in node is a child of the
- View "attach" / onAttach event
- Triggered anytime that showing the view in a Region causes it to be attached to the
document. Like other Marionette events, it also executes a callback method,onAttach, if you've specified one.
- Triggered anytime that showing the view in a Region causes it to be attached to the
- View "before:attach" / onBeforeAttach
- This is just like the "attach" event described above, but it's triggered right before the view is attached to the
document.
- This is just like the "attach" event described above, but it's triggered right before the view is attached to the
- AppRouter Enhancements
triggerMethod,bindEntityEvents, andunbindEntityEventsare now available on AppRouter
- Marionette.Application is now a subclass of Marionette.Object
- Marionette.Behavior is now a subclass of Marionette.Object
- Marionette.Region is now a subclass of Marionette.Object
- CompositeView’s
getChildViewContainernow receiveschildViewas a second argument. - Region Triggers now pass the view, region instance, and trigger options to all handler methods
- CollectionView
emptyViewOptionmethod now receives the model and index as options. - Allow non-DOM-backed regions with
allowMissingElallowMissingEloption is respected by_ensureElement_ensureElementreturns a boolean, indicating whether or not element is available- Region#show early-terminates on missing element
- Regions now ensure the view being shown is valid
- Allowing you to handle the error of a region.show without the region killing the currentView and breaking without recourse.
- Appending isDestroyed to a Backbone.View on region empty now adds the same safety for not re-showing a removed Backbone view.
- Marionette is now aliased as Mn on the
window. - Collection/Composite Views now support passing in 'sort' as both a class property and as an option.
- RegionManager will now auto instantiate regions that are attached to the regionManager instance.
new Marionette.RegionManager({
regions: {
"aRegion": "#bar"
}
});
Fixes
- Region now uses
$.el.html(‘’)instead of.innerHTMLto clear contents.- We can not use
.innerHTMLdue to the fact that IE will not let us clear the html of tables and selects. We also do not want to use the more declarativeemptymethod that jquery exposes since.emptyloops over all of the children DOM nodes and unsets the listeners on each node. While this seems like a desirable thing, it comes at quite a high performance cost. For that reason we are simply clearing the html contents of the node.
- We can not use
- Destroying an old view kept alive by
{preventDestroy: true}no longer empties its former region.- Now the destroy listener from previous view is removed on region show
- AppRouter
this.optionsnow assigned prior toinitializebeing called.
Deprecation Warnings
- Marionette.Application.addInitializer
- Marionette.Application Channel
- Marionette.Application Regions
- Marionette.Callbacks
- Marionette.Deferred
- Marionette.Module.addInitializer
- Marionette.Module.addFinalizer
v2.2.2 view commit logs
-
Fixes
- Remove duplicate call to region.empty on view destroy.
- Fix call time of
swapOut. - Fix broken link in Marionette Error messages
v2.2.1 view commit logs
-
Fixes
- Revert collection type checking for
collectionView.
- Revert collection type checking for
v2.2.0 view commit logs
-
Features
- Normalize region selectors hash to allow a user to use the
@ui.syntax Marionette.triggerMethodOntriggerMethodOninvokestriggerMethodon a specific context
- Marionette.Error
captureStackTracecleans up stack traces
- add view _behaviors reference to associated behaviors
- enabling you to easily test and spy on your behaviors
- CollectionViews now receive events from emptyViews in the childEvents hash
- Regions now receive
swapOutandbeforeSwapOutevents. - Application has
this.options - Application has
initializemethod - Behaviors no longer wrap view methods
- Normalize region selectors hash to allow a user to use the
-
Bug Fixes
- LayoutView’s regions are scoped inside its
el - Fix inconsistent Marionette.Object constructor implementation.
- emptyView instances now proxy their events up to the collection / compositeView
- collection / compositeView does not listen to collection add/remove/reset events until after render.
- Marionette.normalizeUIKeys no longer mutates UI hash
- LayoutView’s regions are scoped inside its
-
Better Errors
- View destroyed error now includes the view cid in the error message.
- Throw an error when Marionette.bindEntityEvents is not an object or function
- Throw a descriptive error for
collectionViews- If you do not pass a valid
collectionViewinstance you are now given a logical error.
- If you do not pass a valid
-
Documentation Improvements
- New API docs are in progress
- Examples have been cleaned up
v2.2.0-pre.2 view commit logs
v2.2.0-pre view commit logs
v2.1.0 view commit logs
-
Features
-
Marionette.Object
- A base class which other classes can extend from. Marionette.Object incorporates many Backbone conventions and utilities like
initializeandBackbone.Events. It is a user friendly class to base your classes on to get Backbone conventions on any generic class.
- A base class which other classes can extend from. Marionette.Object incorporates many Backbone conventions and utilities like
-
Add a
elreference to the viewselfrom within abehaviorinstance. -
ItemViews can now have no template by settingtemplate: false -
Application objects can now configure their default message channel.
- This will allow you to configure multiple applications to exist at the same time within an app without their event bus colliding.
-
Application objects now have the
getOptionmethod. -
Regions now have a
hasViewmethod to determine if there is a view within a given region. -
Views no longer use toJSON directly on models. Instead they call into the new overridable methods
serializeModelandserializeCollectionviaserializeData -
Return chainable objects from more methods to be consistent
-
Application: emptyRegions
-
Application: removeRegion
-
CollectionView renderChildView
-
Controller new
-
LayoutView destroy
-
Region reset
-
Region attachView
-
Region empty
-
RegionManager destroy
-
RegionManager emptyRegions (now returns regions)
-
RegionManager removeRegions (now returns regions)
-
RegionManager removeRegion (now returns region)
-
View destroy
-
View undelegateEvents
-
View delegateEvents
-
-
RegionManager
addRegionsnow accepts a function that returns a region definition in addition to a region definition object- This extends to Marionette.Application’s and CompositeView’s
regionsproperties
- This extends to Marionette.Application’s and CompositeView’s
-
Added CollectionView
resortView- Override this method on a subclass of CollectionView to provide custom logic for rendering after sorting the collection.
-
View instance is now passed as a third argument to
Marionette.Renderer.render -
Add
getRegionManagerto Application
-
-
Fixes
- CollectionView now maintains proper order when adding a mode
- Fix component.js path
- Prevent AppRouter from erroring when appRoutes are passed into the router constructor as an option.
- UI hash keys now only allow documented syntax, enforcing
@ui.stuffinstead of@ui<ANY_CHAR>stuff
v2.1.0-pre view commit logs
v2.0.3 view commit logs
-
Bug Fixes
-
Fixed an issue where
before:showwas not triggered on a view's behavior when shown within a region. -
Destroying a view outside of its region will now cause the region to remove its reference to that view.
-
v2.0.2 view commit logs
-
Bug Fixes
- Fixed issue where
render:collectioncalled before the entire collection and children had been rendered.
- Fixed issue where
-
General
- Remove bundled main entry point for bower.
v2.0.1 view commit logs
- Fix missing Wreqr and Babysitter in Core AMD definition.
v2.0.0 view commit logs
- This is a breaking release and contains many API updates and changes, thus changelog is quite large for this release, please refer to the google doc for the full details of what is new and what has changed.
v2.0.0-pre.2 view commit logs
- The changelog is quite large for this release, please refer to the google doc
v2.0.0-pre.1 view commit logs
- The changelog is quite large for this release, please refer to the google doc
v1.8.8 view commit logs
- Fixes
- Fixed the case where
onShowwas not called on child view behaviors when inside aCollectionorCompositeview.
- Fixed the case where
v1.8.7 view commit logs
-
Fixes
- Fixed nasty ui interpolation bug with behaviors.
-
General
- Minor Doc cleanup
v1.8.6 view commit logs
-
Regions
Region.shownow returns the region instance to allow for region operation chaining.Region.showtriggers the view's nativetriggerMethodif it exists. This is to handle the case that triggerMethod is wrapped by aMarionette.Behavior.
-
General
- Update jquery 2.x upper bound dependency restrictions.
- The grunt test command will now complain if you do not have bower components installed.
- Readme cleanups.
v1.8.5 view commit logs
- Fixes
- Update the UMD build to be inline with the 2.x branch UMD implementation.
v1.8.4 view commit logs
- General
- Update bundled build to use the latest version of babysitter and wreqr.
v1.8.3 view commit logs
- Fixes
- Behaviors now have access to the views options and events during their initialize.
v1.8.2 view commit logs
- Fixes
- Behaviors now calls
stopListeningon close. - Behaviors now undelegate
modelEventsandcollectionEventswhen the parent view callsundelegateEvents.
- Behaviors now calls
v1.8.0 view commit logs
-
General
- Update Gruntfile.
- The default task (
grunt) now runs tests. $ grunt devwatch for watching.$ grunt buildruns the tests and compiles.- Add better inline documentation for module implementation.
- Add better inline behavior documentation.
-
Fixes
- Behaviors now correctly lookup methods for
modelEventsandcollectionEvents. - The
CollectionViewnow triggers close on its children in the correct order.
- Behaviors now correctly lookup methods for
-
Features
- Add
onRouteto theappRouter.
Backbone.Marionette.AppRouter.extend({ onRoute: function(route, params) { } })Region.shownow takes an option to prevent closing the previous view in the region. By default a region will automatically close the previous view, however you can prevent this behavior by passing{preventDestroy: true}in the options parameter.
myRegion.show(view2, { preventDestroy: true })-
Add a
getRegionmethod toLayout. This is in line with the eventual goal of not attaching regions to the root layout object. -
Behavior instances now extend from Backbone.Events, allowing you to use
.listenToand.on. -
Allow Behaviors to have a functional hash lookup.
Marionette.ItemView.extend({ behaviors: function() { // “this” will refer to the view instance return : { BehaviorA: {} } } })- RegionManagers now calls
stopListeningon a regions on removal.
- Add
-
Refactors
- Abstract underscore collection method mixin into a generic helper.
- Use built in marionette extend for behaviors.
-
Tests
- Add a whitespace linter to the text coverage. Trailing whitespace now causes travis.ci to fail.
- Add test coverage for
bindEntitiyEventsandunbindEntityEvents. - Test public API for the
regionManager. - Improve view trigger tests for better control when testing.
v1.7.4 view commit logs
-
General
- Update bower dependencies to take advantage of the fact that marionette repos follow semver.
-
Fixes
- Behaviors events no longer collide with each other.
- Revert
stopListeningcall onstopfor modules. While this was a "fix", the docs were quite vague leading to breaking changes for many people. startWithParentis now respected when using amoduleClassproperty.
v1.7.3 view commit logs
-
Behaviors
- Adds the ability to use
@uiinterpolation within the events hash on a behavior.
- Adds the ability to use
-
Fixes
- Corrects broken view $el proxy in behaviors.
v1.7.2 view commit logs
- Fixes
- Binds behavior events to the behavior instance, as compared to the view.
v1.7.1 view commit logs
- Fixes
- Enables the use of string based behavior event methods.
v1.7.0 view commit logs
Version 1.7 represents a significant step in formalizing the ways to improve your view code though reusable behaviors. Say goodbye to custom mixin strategies and welcome behaviors into town.
-
Behaviors
A
Behavioris an isolated set of DOM / user interactions that can be mixed into anyView.Behaviorsallow you to blackboxViewspecific interactions into portable logical chunks, keeping yourviewssimple and your code DRY. Read the docs here. -
Modules
- Call stop listening on module stop.
-
Events
- add a before:show event for views and regions
-
Docs
- Entire refactor of application docs.
-
Tests
- Rework the module tests to improve readability and consistency.
-
General
- switch from
~to^for trusted dependencies.
- switch from
v1.6.4 view commit logs
- Fixes
- Patches a bug that would cause modules to be initialized twice when a custom module class is passed
v1.6.3 view commit logs
- Improvements
-
Enable more direct module instantiation on
Marionette.App.var ItemModule = Marionette.Module.extend({ startWithParent: false, initialize: function(options) {}, onStart: function() {} }); // ... this.app.module('Items', ItemModule); -
uihash interpolation now supports a functionaluihash.ui: function() { return { "foo": ".foo" } }
-
- Fixes
-
Fix
@uiinterpolation for handling complex selectors.{ "click div:not(@ui.bar)": "tapper" } -
Bump
backbone.babysitterandbackbone.wreqrversions.
-
- General
- Improve readme docs for
CollectionView,AppRouterandItemView. - Handle THE npm self sign cert problem
- Replace unneeded argument slicing.
- Normalize error throwing to use internal
throwErrorhelper method. - Use
_type checks for non performant code to improve readability and consistency.
- Improve readme docs for
v1.6.2 view commit logs
- CollectionView/CompositeView
- allow
itemEventsto use string based method names PR 875
- allow
- Modules
- update module initialize to include moduleName and app PR 898
- General
- significantly improve module documentation PR 897
v1.6.1 view commit logs
- Modules
- Fix a bug where a module would not start by default when defined as an object literal
v1.6.0 view commit logs
-
CompositeView
- add a
composite:collection:before:renderevent
- add a
-
CollectionView
checkEmptycan now be overridden
-
Modules
Modulescan now be created using the extend method, and then attached to an Application.
-
General
- add a component.json file
- update bower.json
- add AMD build in bower.json
-
Tests
- general clean up
- add sinon.js for test spys
v1.5.1 view commit logs
- CollectionView/CompositeView
- Fix bug where
showandonDomRefreshwas not called onitemViewsin certain conditions
- Fix bug where
v1.5.0 view commit logs
-
Views
-
CollectionView/CompositeView
itemViewContaineris now called with the correct context- Fix bug where reseting a
collectionwithin acollectionViewwould causeonShowandonDomRefreshto be called incorrectly on the itemViews. addItemViewnow returns theviewthat was added- You can now specify an
itemEventshash or method which allows you to capture all bubbling itemEvents without having to manually set bindings.
itemEvents: { "render": function() { console.log("an itemView has been rendered"); } } -
Regions
- Region
closeevent now passes theviewbeing closed with the event.
- Region
-
General
- Updated bower ignore folder
- Added an editor config file
v1.4.1 view commit logs
- Views
- fix for inital view class options. Now retains set options at class instantiation
v1.4.0 view commit logs
- Views
- adds the ability to use the new
@ui.syntax within the events and triggers hash to prevent selector duplication
- adds the ability to use the new
v1.3.0 view commit logs
- CompositeView / CollectionView
- Massive perf boost in rendering collection and composite views by using document fragments jsPerf
v1.2.3 view commit logs
- CompositeView
- Fixed bug where
child viewswere being added before the initial render, thus raising errors.
- Fixed bug where
v1.2.2 view commit logs
- Views
- Move the instantiation of
viewoptions above theconstructorThis allows for view options to be accessed from within theinitializemethod for a givenviewThis is needed since backbone views no longer set the view options in the constructor
- Move the instantiation of
v1.2.1 view commit logs
- Views
- fixed a bug so now view options are {} by default and not undefined.
- fixed a bug where the triggers preventDefault and stopPropagation were executing in the wrong context – triggers now prevent default and stop propagation by default once more.
v1.2.0 view commit logs
-
Update Backbone to 1.1.0
-
Views
- added the ability to customize the behavior of
triggerspreventDefault and stopPropagation
- added the ability to customize the behavior of
-
Collection View / CompositeView
- added the ability to specifiy
getEmptyViewfor dynamicemptyViewlookups
- added the ability to specifiy
v1.1 view commit logs
-
Marionette.View / All Views
- Fix for
uibindings to not be removed from view prototype, if unrendered view is closed - Template helpers can now be provided as a constructor function option
- Fix for
-
Layout
- Will properly attach regions if the layout's
closemethod was called prior torender - Calling
.addRegionswill correctly modify the layout instance' region list instead of the prototype's - Fixed bug that prevented default
regionTypefrom being used
- Will properly attach regions if the layout's
-
CompositeView
- The
itemViewContainercan be supplied in the constructor function options
- The
-
Application
- Added
closeRegionsmethod to close all regions on the app instance - Added
getRegionmethod to retrieve a region by name
- Added
-
AppRouter
- Added
appRoutemethod to create app router handlers at runtime - Added ability to set
appRoutesin constructor function options
- Added
-
Marionette.triggerMethod
- Calls to the
Marionette.triggerMethodcan be made on objects that do not have atriggermethod
- Calls to the
v1.0.4 view commit logs
-
ItemView
- Added needed
constructorfunction back - it added lots of things and needed to be there
- Added needed
-
CompositeView
- Added explicit call to CollectionView constructor to allow for inheritance overriding
-
Layout
- Small clarification for consistency on call to ItemView constructor
v1.0.3 view commit logs
-
ItemView
- Deleted unneeded
constructorfunction - it added nothing and didn't need to be there
- Deleted unneeded
-
CompositeView
- Added
indexparameter to method signature, to show that it is available - Deleted unneeded
constructorfunction and removed call togetItemViewas it was causing problems and was not needed in the constructor.
- Added
-
All Views
- Fixed a bug in the entity and collection event bindings, where
stopListeningwould not unbind the event handlers
- Fixed a bug in the entity and collection event bindings, where
-
Renderer / All Views
- The
Renderer.rendermethod will throw a more meaningful error if the supplied template is falsey
- The
-
Region
- Re-showing a closed view now works by re-rendering and re-inserting the view in to the DOM
- Region will trigger a
showevent when showing a view (updated the code to work like the docs already said) - Set the
currentViewbefore triggering theshowevents from the region / view
-
RegionManager
- Fixed a bug to decrement the
.lengthwhen a region is removed
- Fixed a bug to decrement the
v1.0.2 view commit logs
-
UI Elements
- Fix bug to unbind them after the "close" event /
onClosemethod, so theuielements are available during these
- Fix bug to unbind them after the "close" event /
-
AppRouter
- Fix bug that was reversing the order of routes, causing the wrong route to be fired in many cases
v1.0.1 view commit logs
-
AMD build: Removed
require('jQuery')as Marionette now pulledBackbone.$asMarionette.$. -
Fixed RegionManager to allow region types to be specified again, not just region instances.
-
NPM: Removed hard dependency on jQuery from the dependency list. This will be pulled in by other libs, or should be pulled in manually, to get the right version.
v1.0.0 view commit logs
-
RegionManager
- Created new
Marionette.RegionManagerobject to manage a set of regions
- Created new
-
Region
- Region will call the
closemethod on a view, or theremovemethod ifcloseis not found, when closing a view - When calling the
showmethod with the same view instance multiple times, subsequent calls will only re-render the view and not close / re-open it
- Region will call the
-
Application
- Now uses
Marionette.RegionManagerto manage regions
- Now uses
-
Layout
- Now uses
Marionette.RegionManagerto manage regions - Now supports dynamic add / remove of regions
- Can specify
regionsas a function that takes anoptionsargument (the view's constructor options)
- Now uses
-
CollectionView / CompositeView
- When specifying
itemViewOptionsas a function, an itemindexargument will be passed as the second parameter - Will call the
closeorremovemethod when closing a view, withclosemethod taking precedence
- When specifying
-
CompositeView
- Fixed a bug that caused an error when the collection was
reset(loaded) before the view was rendered
- Fixed a bug that caused an error when the collection was
-
All Views
- Closing a view will properly unbind
uielements - Closing and then re-rendering a view will re-bind the
uielements
- Closing a view will properly unbind
-
Functions
- Removed the
Marionette.createObjectfunction - it was never used by Marionette, directly
- Removed the
-
jQuery
- Replaced direct calls to
$with newMarionette.$, which is assigned toBackbone.$for consistency w/ Backbone.
- Replaced direct calls to
-
Backbone.Wreqr
- Updated to v0.2.0
- Renamed
addHandlermethod tosetHandler - For more information, see the Wreqr changelog
-
Code Cleanup
- Replaced
that = thiswith thecontextparam of several calls to_.eachto clean up the code - Removed an unused method from the CompositeView implementation
- Replaced
-
Build process
- Updated to Grunt v0.4.x
- Added code coverage and other analysis reports
v1.0.0-rc6 view commit logs
- CompositeView
- Corrected the timing of the "before:render" event /
onBeforeRendercallback, so that it will be called before serializing the data for the model / template
- Corrected the timing of the "before:render" event /
v1.0.0-rc5 view commit logs
- CollectionView / ItemView
- Corrected the timing on the "show" event /
onShowcallback for itemView instances that are added after the CollectionView is in the DOM
- Corrected the timing on the "show" event /
v1.0.0-rc4 view commit logs
-
EventBinder
- BREAKING: Removed
Marionette.addEventBinderfunction.
- BREAKING: Removed
-
EventAggregator
- BREAKING: Removed
Marionette.EventAggregatorobject. UseBackbone.Wreqr.EventAggregatorinstead
- BREAKING: Removed
-
CollectionView / CompositeView
- Fixed several issues related to resetting the collection, and producing zombie "empty" views
- Fixed a bug that caused multiple emptyView instances when resetting the collection
- Forwarded events from child views are now called with
triggerMethod, meaning they trigger the event and call the corresponding "onEventName" method
-
Modules
- Finalizers now run with the module as the
thiscontext
- Finalizers now run with the module as the
-
Marionette.getOption
- Fixed support for "falsey" values in an object's
options
- Fixed support for "falsey" values in an object's
-
Build process
- Fixed build process to work on case-sensitive file systems (Linux, for example)
v1.0.0-rc3 view commit logs
-
Updated Backbone v0.9.10
-
Updated jQuery to v1.9.0
- Fixed a few minor unit test issues w/ jQuery update
-
Read the upgrade guide for upgrading from v1.0.0-rc2 to v1.0.0-rc3
v1.0.0-rc3 view commit logs
-
IMPORTANT: Be sure to read the upgrade guide for upgrading from v1.0.0-rc2 to v1.0.0-rc3
-
Backbone v0.9.9
- BREAKING: Backbone v0.9.2 is no longer supported
- Backbone v0.9.9 is now supported
-
Marionette.Async
- BREAKING: Marionette.Async is no longer supported
-
Backbone.EventBinder / Marionette.EventBinder
- BREAKING: Marionette.EventBinder / Backbone.EventBinder have been removed entirely.
- Backbone.Events supercedes the older objects
- Backbone.Wreqr.EventAggregator also supercedes Marionette.EventBinder
-
EventBinder -> EventAggregator
- BREAKING: Backbone.Werqr.EventAggregator largely replaces Backbone.EventBinder
- BREAKING:
bindTohas been replaced withlistenTo - BREAKING:
unbindAllhas been replaced withstopListening - BREAKING:
unbindFromhas been removed and will not be replaced
-
Marionette.addEventBinder
- BREAKING: This function will mix in Backbone.Events to the target object if it does not exist
- BREAKING: This function will alter the
listenTomethod of the target to accept acontextparameter as the 4th parameter of the method
-
All Views, Controller, etc
- BREAKING: Backbone.EventBinder is no longer mixed in
- BREAKING: See 'EventBinder -> EventAggregator' changes regarding method names to use for binding / unbinding events
-
CollectionView
- Added
removeChildViewto remove a specific view instance - Fixed event handler leak for child views that have been removed
- Changed the implementation for triggering the "show" event / "onShow" method call, to avoid memory leaks
- Fixed the
indexparameter for adding a model to the collection, and getting the view in to the right place
- Added
-
All Views
- BREAKING: The
initialEventsmethod has been removed. Use theinitializemethod, thecollectionEventsormodelEventsconfiguration instead. - Allow
modelEventsandcollectionEventsto be a function that returns a hash - Allow
uiconfiguration to be a function that returns a hash modelEventsandcollectionEventsare now delegated / undelegated with Backbone.View's.delegateEventsand.undelegateEventsmethod calls- View
triggersnow include anargsobject withargs.view,args.modelandargs.collection
- BREAKING: The
-
Modules
v1.0.0-rc2 view commit logs
-
CollectionView / CompositeView
- **BREAKING: ** Changed the
item:addedevent tobefore:item:addedandafter:item:added - Fixed the
onShowcallbacks, so they can be used in theinitializemethod
- **BREAKING: ** Changed the
-
AMD build
- Fixed the AMD build by adding Backbone.BabySitter to the AMD dependency list
-
All Views
- All views (include Marionette.View) now have a "dom:refresh" and
onDomRefreshevent / method triggered
- All views (include Marionette.View) now have a "dom:refresh" and
v1.0.0-rc1 view commit logs
-
Fixed IE < 9 support w/ calls to
.applywhenargumentswas null or undefined -
Module
- BREAKING: Renamed "initialize:before" event to "before:start", for consistency
- BREAKING: Renamed "initialize:after" event to "start", for consistency
- Triggers a "before:stop" event/method before the module is stopped
- Triggers a "stop" event/method after the module has been stopped
-
Marionette.View
- BREAKING: The
bindBackboneEntityTomethod has been removed from Marionette.View and replaced withMarionette.bindEntityEventsfunction.
- BREAKING: The
-
Marionette.bindEntityEvents
- This function has been extracted from Marionette.View, and will bind an events hash to the events from an entity (model or collection), using the supplied EventBinder object (or any object with a bindTo method)
-
Marionette.EventBinder
- The context of the callback method defaults to the object w/ the
bindTomethod
- The context of the callback method defaults to the object w/ the
-
CollectionView / CompositeView
- The "item:added"/
onItemAddedcallback method are now fired after an item view has been rendered and added to it's parent collection view - The "itemview:" events - events that are forwarded from item views - can now have a custom prefix with the
itemViewEventPrefixsetting
- The "item:added"/
-
ItemView
- Added a "dom:refresh" event/callback method that fires after a view has been rendered, placed in the DOM with a Marionette.Region, and is re-rendered
-
All Views
- The
modelEventsandcollectionEventscan now have a function configured as the value in the{ "event:name": "value" }configuration hash - A view that uses
bindTofor its own "close" event will have it's close handler called correctly - Returning
falsefrom theonBeforeClosemethod will prevent the view from being closed
- The
v1.0.0-beta6 view commit logs
-
CollectionView / CompositeView
- BREAKING: The
.childrenattribute, used to store child views, is no longer an object literal. It is now an instance ofBackbone.ChildViewContainerfrom Backbone.BabySitter - Updated to use Backbone.BabySitter to store and manage child views
- BREAKING: The
-
Controller
- Added a default
closemethod to unbind all events on the controller instance and controller event binder - Trigger a "close"/onClose event/method when closing
- Fixed initialize method so
optionsparameter is always a valid object
- Added a default
-
Modules
- Fixed an issue with grand-child modules being defined with a non-existent direct parent, and starting the top level parent directly
v1.0.0-beta5 view commit logs
- Modules
- Fixed the
startWithParentoption so that you only have to specifystartWithParent: falseonce, no matter how many files the module definition is split in to
- Fixed the
v1.0.0-beta4 view commit logs
-
CollectionView / CompositeView
- BREAKING: Changed when the
itemViewOptionsgets called, in order to simplify thebuildItemViewmethod and make it easier to override - BREAKING: The
storeChildmethod now requires an instance of the item being rendered, as well as the view that was rendered for it
- BREAKING: Changed when the
-
CompositeView / templateHelpers
- BREAKING: Fixed the
CompositeViewso thatserializeDatais no longer responsible for mixing in thetemplateHelpers
- BREAKING: Fixed the
-
Controller
- Added a very basic
Marionette.Controllerobject, and basic documentation for it
- Added a very basic
-
Marionette.getOption
- Added a convience method to get an object's options either from the object directly, or from it's
this.options, withthis.optionstaking precedence - Converted use of
this.optionsto useMarionette.getOptionthrough most of the code
- Added a convience method to get an object's options either from the object directly, or from it's
-
Marionette.createObject
- Added a convience method to create an object that inherits from another, as a wrapper / shim around
Object.create
- Added a convience method to create an object that inherits from another, as a wrapper / shim around
v1.0.0-beta3 view commit logs
- Region
- Fixed "show" method so that it includes the view instance being shown, again
v1.0.0-beta2 view commit logs
-
templateHelpers
- BREAKING: Changed when the templateHelpers is mixed in to the data for a view, so that it is no longer dependent on the
serializeDataimplementation
- BREAKING: Changed when the templateHelpers is mixed in to the data for a view, so that it is no longer dependent on the
-
Region
- BREAKING: Changed "view:show" event to "show"
- BREAKING: Changed "view:closed" event to "close"
- All region events and events that the triggers from a view are now triggered via Marionette.triggerMethod.
-
Marionette.EventAggregator
- BREAKING: The
bindTomethod no longer assumes you are binding to the EventAggregator instance. You must specify the object that is triggering the event:ea.bindto(ea, "event", callback, context) - Marionette.EventAggregator combines Backbone.Wreqr.EventAggregator with Backbone.EventBinder, allowing the event aggregator to act as it's own event binder
- BREAKING: The
-
CollectionView
- Fixed bug where adding an item to a collection would not allow the CollectionView to propagate the itemView's events
- Allow
itemViewOptionsto be specified in CollectionView constructor options
-
Application
- The events triggered from the Application object instance are now triggered with corresponding "on{EventName}" method calls
-
Backbone.EventBinder
- Updated to v0.1.0 of Backbone.EventBinder, allowing for jQuery/DOM events to be handled within the EventBinder instances /
bindTomethods
- Updated to v0.1.0 of Backbone.EventBinder, allowing for jQuery/DOM events to be handled within the EventBinder instances /
-
AMD Wrapper
- The "core" AMD wrapper specifies Backbone.Wreqr and Backbone.EventBinder
- The "standard" AMD wrapper does not specify Backbone.Wreqr / EventBinder, as these are built in
-
Build / downloads
- The standard and AMD versions of
backbone.marionette.jsandbackbone.marionette.min.jsinclude all dependencies (EventBinder, Wreqr) - The "core" versions of
backbone.marionette.jsandbackbone.marionette.min.jsdo not include any dependencies (EventBinder, Wreqr)
- The standard and AMD versions of
v1.0.0-beta1 view commit logs
-
Backbone.EventBinder
- BREAKING: Marionette's EventBinder has been extracted to the Backbone.EventBinder repository and plugin. You must include this file in your app, available at https://github.com/marionettejs/backbone.eventbinder
-
Backbone.Wreqr
- BREAKING: Marionette's EventAggregator has been extracted to the Backbone.Wreqr repository and plugin. You must include this file in your app, available at https://github.com/marionettejs/backbone.wreqr
-
All Views
- BREAKING:
beforeRendermethod is nowonBeforeRender - BREAKING:
beforeClosemethod is nowonBeforeClose - BREAKING: The
rendermethod for all Marionette views is bound to the view instance - All view events are now triggered with
triggerMethod, calling their corresponding method on the view if it exists - All views now have an
isClosedattribute on them, which is set totruewhen calling theclose()method and reset tofalsewhen calling therender()method - EventBinder is now attached to the views with the
Marionette.addEventBindermethod call
- BREAKING:
-
CompositeView
- BREAKING: CompositeView will only render a model in to it's template, instead of a model or collection. It will still render the collection as itemView instances.
-
Modules
- BREAKING: Split module definitions can now receive custom args per module definition, instead of sharing / replacing them across all definitions
-
CollectionView / CompositeView
- Cleaned up the
getItemViewContainercode, and improved the error that is thrown when the specified container element is not found - Can attach existing view instance w/ existing DOM element as child of collection view / composite view, in parent's
initializefunction - Fixed a bug where an undefined
this.optionswould prevent child views from being rendered, trying to find the index of the view
- Cleaned up the
-
Layout
- Allow a Layout to be defined without
regions, using Underscore v1.4.x
- Allow a Layout to be defined without
-
View / ItemView / CompositeView
- Removed the
serializeDatamethod and added directly toItemViewandCompositeViewas needed
- Removed the
-
Application
- Application regions can now be specified as a jQuery selector string, a region type, or an object literal with a selector and type:
{selector: "#foo", regionType: MyCustomRegion} - added
.commandsas instance of Backbone.Wreqr.Commands, to facilitate command execution - added
.executemethod for direct command execution - added
.reqresas instance of Backbone.Wreqr.RequestResponse, to facilitate request/response execution - added
.requestmethod for direct requesting of a response
- Application regions can now be specified as a jQuery selector string, a region type, or an object literal with a selector and type:
-
Marionette.triggerMethod
- Added
Marionette.triggerMethodmethod to trigger an event and call the corresponding method. For example,view.triggetMethod("before:render")will trigger the "before:render" event and call theonBeforeRendermethod.
- Added
-
Marionette.addEventBinder
- Added
Marionette.addEventBindermethod to add all of the Backbone.Wreqr.EventBinder methods to a specified target object
- Added
-
Misc
- Added
Marionette.extendas alias to Backbone'sextendmethod for more consistent use - jQuery (
) support now works from global `orwindow.jQuery` - Updated to Underscore.js v1.4.1
- Updated to jQuery v1.8.2
- Added
v0.10.2 view commit logs
-
Callbacks
- Fixed a bug that caused callbacks to fire multiple times after calling
reset
- Fixed a bug that caused callbacks to fire multiple times after calling
-
Layout
- Fixed a bug that prevented the regions from being re-initialized correctly, when using
renderas a callback method for an event
- Fixed a bug that prevented the regions from being re-initialized correctly, when using
v0.10.1 view commit logs
- Modules
- Fixed a bug when defining modules in reverse order, that prevented
startWithParentfrom working correctly
- Fixed a bug when defining modules in reverse order, that prevented
v0.10.0 view commit logs
-
Modules
- BREAKING: Module definition functions are executed immediately and only once, not every time you call
start - BREAKING: Renamed
startWithApptostartWithParentin module definitions - BREAKING: Sub-modules rely on the parent module to start them, by default, but can be started manually
- BREAKING: Sub-modules default to starting with their parent module start
- BREAKING: Specifying
startWithParent: falsefor a sub-module will prevent the module from being started when the parent starts - BREAKING: Specifying
startWithParent: falsefor a top-level module will prevent the module from being started when the parentApplicationstarts - BREAKING: When starting a module, sub-modules will be started / initialized before parent modules (depth-first hierarchy traversal)
- BREAKING: When stopping a module, sub-modules will be stopped / finalized before parent modules (depth-first hierarchy traversal)
- Fixed: retrieving a module by name (
var foo = MyApp.module("Foo");) will not change the module's definition orstartWithParentsetting
- BREAKING: Module definition functions are executed immediately and only once, not every time you call
-
CollectionView
- Allow
itemViewOptionsto be a function, which recieves theitemas an argument
- Allow
-
Callbacks
- Added
resetmethod to reset the list of callbacks and allow them to be run again, when needed
- Added
v0.9.13 view commit logs
-
CollectionView
- Fixed bug that prevented "collection:closed" event from being triggered
- Allow different item view to be rendered for each item in collection by overriding
getItemViewmethod
-
CompositeView
- Allow different item view to be rendered for each item in collection by overriding
getItemViewmethod
- Allow different item view to be rendered for each item in collection by overriding
-
Layout
- Regions are initialized before prototype constructor, or
initializefunction are called
- Regions are initialized before prototype constructor, or
-
All Views
- Adds declarative event binding for models and collections. See Marionette.View documentation for more information.
-
Build and test
- Removed all dependencies on Ruby, in favor of NodeJS and Grunt
v0.9.12 view commit logs
- Moved Marionette.Async to it's own repository
- De-linted source code
- Corrected throwing an "Exception" to throwing an "Error"
v0.9.11 view commit logs
-
JamJS Support
- Updated the
package.jsonfile with more detail and support for JamJS.
- Updated the
-
Layout
- Fixed a global variable leak
v0.9.10 view commit logs
- ItemView and Layout
- BREAKING: Removed the default implementation of
initialEvents, so that a collection "reset" event won't cause the ItemView or Layout to re-render
- BREAKING: Removed the default implementation of
- Build Process
- Changed from Anvil.js to Grunt.js for the build process
v0.9.9 view commit logs
- Regions
- Added a
resetmethod to regions, which closes the open view and deletes the region's cachedel
- Added a
v0.9.8 view commit logs
- Modules
- Fixed a bug that ensures modules will start and stop the correct number of times, instead of always stopping immediately after they have been stopped once
v0.9.7 view commit logs
-
Modules
- Fixed a bug to ensure modules are only started once, no matter how many definitions the module is split in to
-
View Templates
- Better support for pre-compiled templates - can specify a function as the
templatesetting for a view, and the function will be run as the template, directly.
- Better support for pre-compiled templates - can specify a function as the
v0.9.6 view commit logs
- All Marionette Views
- Fixed bug that prevented
bindTofunction and otherEventBinderfunctions from being available ininitializemethod of views
- Fixed bug that prevented
v0.9.5 view commit logs
- Layout
- Fixed a typo / bug in default Region type used for layouts
v0.9.4 view commit logs
-
BindTo -> EventBindings
- BREAKING: Renamed
Marionette.BindTotoMarionette.EventBindingsand made it a constructor function instead of an object literal
- BREAKING: Renamed
-
Modules
- BREAKING: Changed the API of
Module.createto be more clear and explicit aboutappparameter - BREAKING: Defer module definition until module is started
- Modules now have
addInitializermethod to add initializers - Modules can be started (run the initializers) with
startmethod - Modules are automatically started when Marionette.Application
startmethod is called - App.start sends options to module initializers
- Modules that are defined (or loaded from external source) afer app is started will auto-start by default
- Can specify a module is not started with the app, to prevent the module from being started when app.start is called
- Calling
starton a module will start all of the sub-modules for that module
- BREAKING: Changed the API of
-
CollectionView/CompositeView
- Correctly handles non-existent collection and removing child item views that were added manually
- Corrected showing empty view and closing empty view when resetting collection and adding items
- Fixed bug to prevent showing the empty view more than once when rendering the collection view
-
Application
- Added a
removeRegionmethod to close / remove regions, as a counter-function to theaddRegionsmethod
- Added a
-
Marionette.View (all views / base view)
- Can specify a set of
uielements that are cached jQuery selectors
- Can specify a set of
-
Layout
- An already closed layout can be re-rendered, and the regions will regenerate
- Allow a custom region type to be specified for all regions, as well as per-region instance
v0.9.3 view commit logs
-
CompositeView
- Cleaned up the method to get / cache the
itemViewContainer - Allow
itemViewContainerto be a function that return a jQuery selector string
- Cleaned up the method to get / cache the
-
View
rendermethods all returnthisin the standard Marionette views (the async views still return a deferred object).
v0.9.2 view commit logs
-
CompositeView
- Added
itemViewContainerto 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
showmethod, 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
emptyViewinstance when an item is added to the view's collection - CollectionView and CompositeView will show their
emptyViewafter 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.jsadd-on
-
Split the single src/backbone.marionette.js file into multiple files for easier maintenance
-
Marionette.Async:
- Added
Marionette.Asyncadd-on which provides support for rendering and retrieving templates asynchronously
- Added
-
Marionette.View:
- BREAKING Renamed the
getTemplateSelectormethod togetTemplate - Call
unbindAllto unbind all bound events, later in the close process, so thecloseevent can be listened to
- BREAKING Renamed the
-
ItemView:
- BREAKING The
templateattribute no longer allows you to specify a function that returns a jQuery selector. OverridegetTemplateto do this. - BREAKING The
renderHtmlmethod has been removed from the ItemView - BREAKING Async support removed
- BREAKING The
-
CollectionView:
- BREAKING Async support removed
- Now supports optional
emptyViewattribute, 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
onItemAddedmethod when adding an item/item view, just prior to rendering the item view - Can now specify an
itemViewOptionsobject literal on your collection view definition, and the data will be passed to each itemView instance as part of the itemView's options - The
appendHtmlmethod 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
.ventevent 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
Regionto 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
loadTemplateandcompileTemplatetoTemplateCache.prototype - BREAKING
TemplateCache.getno longer accepts a callback method. It always returns jQuery promise
-
Renderer:
- BREAKING Removed the
renderHtmlmethod - Rendering a pre-compiled template function is now much easier - just override the
Renderer.rendermethod.
- 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
.ventevent aggregator hanging off them - Extracted
Marionette.Modulein 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
thisargument in a module definition function is now the module itself
-
Callbacks:
- BREAKING Switched the order of parameters for the
runmethod toargs, context
- BREAKING Switched the order of parameters for the
-
BindTo:
- The unbinding of an event now considers the
contextparameter 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
.modulewill correctly pass theApplicationinstance from which.modulewas 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
triggerswhich will convert a DOM event in to aview.triggerevent
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
v0.7.6
- An
itemViewinstance 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
v0.7.5
- The
onBeforemethod of ItemView can now return a deferred object - Code cleanup for rendering methods
v0.7.4
- Fixed issue with
unbindAllin BindTo, that was skipping some items
v0.7.3
- The
bindTomethod on theEventAggregatornow returns a binding configuration object - Automatic mixing in of
templateMethodsas template / view helper methods, in views that use theserializeDatafunction - 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
v0.7.2
- Extracted
compileTemplatemethod in TemplateCache for clarity and easier modification - ItemView will wait until
onRenderhas completed before triggering other rendered events - Region now supports an
onShowmethod, when defining a custom region - Moved the default
serializeDatamethod to the base Marionette.View - CompositeView now calls the
serializeDatamethod to get the model's data for the view BindTochanges:- The
bindTomethod returns a "binding" object so that it can be unbound easily - Now has an
unbindFrommethod that will unbind a binding object
- The
v0.7.1
- ItemView now has a
renderHtmlmethod that can be overriden to render the item view's data - Region now supports an
initializefunction 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
v0.7.0
- BREAKING: The
renderTemplatemethod has moved from theItemViewprototype on to theRendererobject - BREAKING: The
appendHtmlmethod of theCollectionViewnow takescollectionView, itemViewas the arguments, instead ofel, html - Added
Marionette.Viewobject, to contain a few basic parts of every Marionette view - Added
Marionette.Rendererobject, to handle template rendering - Views correctly trigger the "close" events before unbinding event subscribers
- Additional
CollectionViewchanges:- Extracted
getItemViewmethod to retrieve theitemViewtype, either fromthis.itemVieworthis.options.itemView - Extracted
buildItemViewmethod to build each item's view - Renamed
removeChildViewtoremoveItemViewto 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
CompositeViewchanges:- No longer takes a
modelView. Now directly renders thetemplatespecified - Defaults to a recurive structure, where
itemViewis the current composite view type
- No longer takes a
- A
Regionwill trigger ashowevent 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
v0.6.4
- CollectionView and CompositeView can render without a collection
v0.6.3
ItemViewchanges- Calls a
beforeRenderandbeforeClosemethod on the view, if it exists - Triggers a
item:before:renderevent, just prior to rendering - Triggers a
item:before:closeanditem:closedevents, around the view'sclosemethod
- Calls a
CollectionViewchanges- Calls a
beforeRenderandbeforeClosemethod on the view, if it exists - Triggers a
collection:before:renderevent before rendering - Triggers a
collection:before:closeandcollection:closedevent, surrounding closing of the view
- Calls a
- The
CollectionViewandCompositeViewnow close child views before closing itself
v0.6.2
- BREAKING: The
CollectionViewno longer has areRendermethod. Callrenderinstead - BREAKING: The
TemplateCache.getmethod 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
v0.6.1
- 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
v0.6.0
-
BREAKING: Renamed
LayoutManagertoLayout -
BREAKING: Renamed
RegionManagertoRegion -
BREAKING: Renamed
TemplateManagertoTemplateCache -
Layout
- BREAKING:
Layout.renderno longer returns the view itself, now returns a jQuery deferred object - The
.ventattribute is now available in theinitializermethod - Ensures that regions select the
$elwithin the Layout's$elinstead of globally on the page - Initialize the regions before the layout, allowing access to the regions in the
onRendermethod of the layout - Close the Layout's regions before closing the layout itself
- BREAKING:
-
CompositeView
- BREAKING:
CompositeView.renderno longer returns the view itself, now returns a jQuery deffered object - Will only render the collection once. You can call
renderCollectionexplicitly to re-render the entire collection - Will only render the model view once. You can call
renderModelexplicitly 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.renderno longer returns the view itself, now returns a jQuery deferred object - Optimization to only call
.toJSONon 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.renderno 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/thento better support asynchronous templates and rendering
v0.5.2
- BREAKING: Renamed
CompositeRegiontoLayoutManager - Aliased CompsiteRegion to LayoutManager for backwards compatibility
- Bug fix for correctly initializing LayoutManager with specified options in constructor
v0.5.1
- Controller methods fired from an
AppRouterare now called withthisset 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
v0.5.0
- BREAKING: Extraced
CompositeViewout of the collection view - Added
CompositeViewfor managing leaf-branch/composite model structures - Added
CompositeRegionfor managing nested views and nested region managers - Added
attachViewmethod toRegionManagerto attach existing view without rendering / replacing - Specify how to attach HTML to DOM in region manager's
showmethod
v0.4.8
- Don't re-render an ItemView when the view's model "change" event is triggered
v0.4.7
- Allow
RegionManagerto be instantiated with anelspecified in the options - Change how RegionManagers are added to an Application instance, to reduce memory usage from extraneous types
v0.4.6
- AppRouter can have it's
controllerspecified directly in the router definition or in the construction function call - Extracted
Marionette.EventAggregatorout in to it's own explicit object
v0.4.5
- 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
v0.4.4
- 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
v0.4.3
- Fixed bug with RegionManagers trying to select element before DOM is ready, to lazy-select the element on first use of
show
v0.4.2
- BREAKING: Removed the
setOptionsmethod from theCallbacksobject - Refactored
Callbacksobject to use a jQuery Deferred instead of my own code - Fixed template manager's
clearso it properly clears a single template, when only one is specified - Refactored the
RegionManagercode to support several new features- now support returning a jQuery deferred object from a view's
rendermethod - now have a
closemethod 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
bindToandunbindAllmethods, for binding/unbinding region manager events
- now support returning a jQuery deferred object from a view's
v0.4.1
- Minor fix to context of template manager callback, to fix issue w/ async template loading
v0.4.0
- BREAKING: Rewrote the template manager to be async-template loading friendly
- BREAKING: Dropping support for Backbone v0.5.3 and below
- Added
Marionette.Callbacksto 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
v0.3.1
- Make region managers initialize immediately when calling
app.addRegions
v0.3.0
- BREAKING:
view.elforItemViewandCollectionViewis no longer a jQuery selector object. Useview.$elinstead - BREAKING:
regionManger.elis no longer a jQuery selector object. UseregionManager.$elinstead - Updated to use Backbone v0.9.0
- Updated to use Underscore v1.3.1
- Removed default
itemViewfrom theCollectionViewdefinition CollectionViewnow explicitly checks for anitemViewdefined on it, and throws an error if it's not found
v0.2.6
- Bind the context (
this) of application initializer functions to the application object
v0.2.5
- Added
AppRouter, to reduce boilerplate routers down to simple configuration CollectionViewcan be treated as a composite view, rendering anmodeland acollectionof models- Now works with either jQuery, Zepto, or enter.js
ItemViewwill throw an error is no template is specified
v0.2.4
- Return
this(the view itself) fromItemViewandCollectionViewrendermethod - Call
onRenderafter theCollectionViewhas rendered itself
v0.2.3
- Fixed global variable leaks
- Removed declared, but unused variables
v0.2.2
- Fixed binding events in the collection view to use
bindTo(#6) - Updated specs for collection view
- Documentation fixes (#7)
v0.2.1
- Added
TemplateManagerto cache templates - CollectionView binds to add/remove and updates rendering appropriately
- ItemView uses
TemplateManagerfor template retrieval - ItemView and CollectionView set
this.el = $(this.el)in constructor
v0.2.0
- Added
ItemView - Added
CollectionView - Added
BindTo - Simplified the way
extendis pulled from Backbone
v0.1.0
- Initial release
- Created documentation
- Generated annotated source code