b23347ae by Michael Richards

Build 0.4.4.

1 parent 22fbb3cd
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 "name": "rivets", 2 "name": "rivets",
3 "repo": "mikeric/rivets", 3 "repo": "mikeric/rivets",
4 "description": "Declarative data binding facility.", 4 "description": "Declarative data binding facility.",
5 "version": "0.4.3", 5 "version": "0.4.4",
6 "keywords": ["data binding", "template"], 6 "keywords": ["data binding", "template"],
7 "scripts": ["lib/rivets.js"], 7 "scripts": ["lib/rivets.js"],
8 "main": "lib/rivets.js", 8 "main": "lib/rivets.js",
......
1 // rivets.js 1 // rivets.js
2 // version: 0.4.3 2 // version: 0.4.4
3 // author: Michael Richards 3 // author: Michael Richards
4 // license: MIT 4 // license: MIT
5 (function() { 5 (function() {
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
135 }; 135 };
136 136
137 Binding.prototype.unbind = function() { 137 Binding.prototype.unbind = function() {
138 var keypath, _i, _len, _ref, _ref1, _ref2, _results; 138 var dependency, keypath, model, _i, _len, _ref, _ref1, _ref2, _results;
139 if ((_ref = this.binder.unbind) != null) { 139 if ((_ref = this.binder.unbind) != null) {
140 _ref.call(this, this.el); 140 _ref.call(this, this.el);
141 } 141 }
...@@ -146,8 +146,16 @@ ...@@ -146,8 +146,16 @@
146 _ref2 = this.options.dependencies; 146 _ref2 = this.options.dependencies;
147 _results = []; 147 _results = [];
148 for (_i = 0, _len = _ref2.length; _i < _len; _i++) { 148 for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
149 keypath = _ref2[_i]; 149 dependency = _ref2[_i];
150 _results.push(Rivets.config.adapter.unsubscribe(this.model, keypath, this.sync)); 150 if (/^\./.test(dependency)) {
151 model = this.model;
152 keypath = dependency.substr(1);
153 } else {
154 dependency = dependency.split('.');
155 model = this.view.models[dependency.shift()];
156 keypath = dependency.join('.');
157 }
158 _results.push(Rivets.config.adapter.unsubscribe(model, keypath, this.sync));
151 } 159 }
152 return _results; 160 return _results;
153 } 161 }
......
1 { 1 {
2 "name" : "rivets", 2 "name" : "rivets",
3 "description" : "Declarative data binding facility.", 3 "description" : "Declarative data binding facility.",
4 "version" : "0.4.3", 4 "version" : "0.4.4",
5 "author" : "Michael Richards", 5 "author" : "Michael Richards",
6 "url" : "http://rivetsjs.com", 6 "url" : "http://rivetsjs.com",
7 "main" : "./lib/rivets.js", 7 "main" : "./lib/rivets.js",
......
1 # rivets.js 1 # rivets.js
2 # version : 0.4.3 2 # version : 0.4.4
3 # author : Michael Richards 3 # author : Michael Richards
4 # license : MIT 4 # license : MIT
5 5
......