Releases: vecnatechnologies/backbone-torso
v0.8.10
- Merge pull request #378 from kentmw/master (d5cd87f)
- #371 - making jquery 2.2.4 work. Haven't tested beyond that (4db54a3)
- Merge pull request #377 from kentmw/master (e2aeb04)
- #287 - Remove jquery as a dependency from torso (10d5c95)
- Merge pull request #376 from mandragorn/374 (8487593)
- #374: Remove model id from tracked ids on remove (41330fc)
- Merge pull request #372 from mandragorn/memory-leak (5d24c22)
- Removing unused var and moving var declaration to where it is used. (704555e)
- Moving FormView _deactivate to deactivate (7df79b7)
- Dispose feedback cell correctly (bc617d6)
- updating docs after release (f32a357)
v0.8.9
v0.8.8
- Merge pull request #368 from mandragorn/handlebars-v (df30451)
- Fixing handlebars version in demo/package.json (c58621e)
- Merge pull request #367 from mandragorn/databehavior-dispose (eeee034)
- Actually fixing handlebars version (3657b40)
- Updating bundles and docs (544553a)
- Fix disposed DataBehavior asyn behavior (7747a97)
- Merge pull request #366 from mandragorn/databehavior-fetchoncepromise (92b8559)
- Addressing peer review comments (3603113)
- Reverting back behavior dispose methods (cd920ed)
- Dispose prvtCollection when Databehavior disposed (1277521)
- Add a retrieve promise to DataBehavior (338fee3)
- Tests for behavior dispose (5fa230f)
- Upgrading handlebars to fix security vulnerability (d6639b2)
- Documentation updated for 0.8.7 (1566506)
v0.8.7
v0.8.6
v0.8.5
v0.8.4
v0.8.3
Added injectionSites and untrack shared tracked views on render.
The latest addition is injectionSites
.
var ParentView = TorsoView.extend({
injectionSites: {
foo: 'fooView', //foo is injection site and 'fooView' is view.fooView
bar: 'barView'
},
template: '<div inject="foo"></div><div inject="bar"></div>'
});
You can still use attachTrackedViews
and you don't have to use this new field at all. If you do use it, you can specify the view in a few ways. Direct reference, a string that specifies a view's field, or a function that returns the view. You can also pass in {view: theView, options: {shared: true}}
if you want to attach a shared view.
Lastly, you can hide or show any view by doing: this.set('hide:foo', true)
or this.set('hide:foo', false)
which will immediately re-render the view and show or hide that view.
v0.8.2
Duplicate release of v0.8.1
_prepare
is a hook inside Torso View's that allow you to add new fields to the context returned by the defaultprepare
method without having to overrideprepare
. You can update and add to the context by returning your own context or modify the context passed in to_prepare
. Both options will mix the resulting context into the View's default prepare context (taking precedence, overriding the default keys ofmodel
andview
if you choose to use them). It also will override any keys defined byprepareFields
Example:
_prepare: function(context) {
context.foo = 'bar';
}
or
_prepare: function(context) {
return {
foo: 'bar'
}
}
Will result in a context:
{
model: this.model.toJSON(),
view: this.viewState.toJSON(),
foo: 'bar'
}
during a render.
- Added
has
andunset
to Torso View's which alias toviewState.has
andviewState.unset
prepareFields
now can be written as an object (or function who returns an object) whose keys and values will get added to theprepare
's context. This extends the existing behavior of definingprepareFields
as an array (or a function that returns an array) whose values are {key: 'foo', value: bar}.
prepareFields: {
service: myServiceCell,
count: 4
}
Will result in a context:
{
model: this.model.toJSON(),
view: this.viewState.toJSON(),
service: myServiceCell.toJSON(),
count: 4
}
during a render
v0.8.1
NOTE: There is NO 0.8.1 on npm. Use 0.8.2 instead - it's the same
- Merge pull request #354 from kentmw/master (6ba1bfd)
- Removing unneeded test (750f899)
- Tweeks to tests (9d056cd)
- Fixing bug in prepare and added tests (239ee72)
- Allowing _prepare to update existing context or return a new one (or both) (104e891)
- Updating docs (25116cb)
- 353, #252, #118 - added has and unset in view (for viewState) and added object mapping for prepareFields and _prepare option (be136e4)
- 353, #252, #118 - added has and unset in view (for viewState) and added object mapping for prepareFields and _prepare option (b42955a)
- #353, #252, #118 - added has and unset in view (for viewState) and added object mapping for prepareFields and _prepare option (2478193)
- Updating docs to v0.8.0 (59bf7e7)