Skip to content

Commit

Permalink
bumped version to 0.3.3, docs and release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Derick Bailey committed Aug 22, 2011
1 parent 21ffda7 commit 8872555
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backbone.modelbinding.js
@@ -1,4 +1,4 @@
// Backbone.ModelBinding v0.3.2
// Backbone.ModelBinding v0.3.3
//
// Copyright (C)2011 Derick Bailey, Muted Solutions, LLC
// Distributed Under MIT Liscene
Expand Down Expand Up @@ -37,7 +37,7 @@ Backbone.ModelBinding = (function(){
}

return {
version: "0.3.2",
version: "0.3.3",

bind: function(view, options){
Backbone.ModelBinding.Configuration.configureBindingAttributes(options);
Expand Down
35 changes: 35 additions & 0 deletions readme.md
Expand Up @@ -260,6 +260,35 @@ someModel.set({isValid: false});
This will disable the button when the model is invalid and enable the button when the model is
valid.

#### display

This allows you to specify that an element should be shown or hidden by setting the css
of the element according to the value of the model attribute specified.

````
<div data-bind="display isValid" />
someModel.set({isValid: false});
````

When the model's property is set to false, the HTML element's `display` css will be set
to `none`. When the model's property is set to true, the HTML element's `display` css
will be set to `block`.

#### hidden

This is the inverse of `display`.

````
<div data-bind="hidden isValid" />
someModel.set({isValid: true});
````

When the model's property is set to false, the HTML element's `display` css will be set
to `block`. When the model's property is set to true, the HTML element's `display` css
will be set to `none`.

### Data-Bind Substitutions

If a model's property is `unset`, the data-bind may not update correctly when using `text` or `html`
Expand Down Expand Up @@ -457,6 +486,12 @@ to Backbone.ModelBinding in the `backbone.modelbinding.js` file.

## Release Notes

### v0.3.3

* Added data-bind attribute for setting an HTML element's `display` css
* Added inserve of data-bind `display` as data-bind `hidden`
* Corrected issue with binding a model's property to a checkbox, when the property is false

### v0.3.2

* Data-bind substitutions - lets you replace "undefined" with another, set value, when using data-bind
Expand Down

0 comments on commit 8872555

Please sign in to comment.