Build 0.5.11.
Showing
5 changed files
with
11 additions
and
7 deletions
... | @@ -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.5.10", | 5 | "version": "0.5.11", |
6 | "keywords": ["data binding", "templating"], | 6 | "keywords": ["data binding", "templating"], |
7 | "scripts": ["dist/rivets.js"], | 7 | "scripts": ["dist/rivets.js"], |
8 | "main": "dist/rivets.js", | 8 | "main": "dist/rivets.js", | ... | ... |
1 | // Rivets.js | 1 | // Rivets.js |
2 | // version: 0.5.10 | 2 | // version: 0.5.11 |
3 | // author: Michael Richards | 3 | // author: Michael Richards |
4 | // license: MIT | 4 | // license: MIT |
5 | (function() { | 5 | (function() { |
... | @@ -236,7 +236,7 @@ | ... | @@ -236,7 +236,7 @@ |
236 | ComponentBinding.prototype.sync = function() {}; | 236 | ComponentBinding.prototype.sync = function() {}; |
237 | 237 | ||
238 | ComponentBinding.prototype.locals = function(models) { | 238 | ComponentBinding.prototype.locals = function(models) { |
239 | var inverse, key, model, result, _ref, _ref1; | 239 | var inverse, key, model, path, result, _i, _len, _ref, _ref1, _ref2; |
240 | 240 | ||
241 | if (models == null) { | 241 | if (models == null) { |
242 | models = this.view.models; | 242 | models = this.view.models; |
... | @@ -245,11 +245,15 @@ | ... | @@ -245,11 +245,15 @@ |
245 | _ref = this.inflections; | 245 | _ref = this.inflections; |
246 | for (key in _ref) { | 246 | for (key in _ref) { |
247 | inverse = _ref[key]; | 247 | inverse = _ref[key]; |
248 | result[key] = models[inverse]; | 248 | _ref1 = inverse.split('.'); |
249 | for (_i = 0, _len = _ref1.length; _i < _len; _i++) { | ||
250 | path = _ref1[_i]; | ||
251 | result[key] = (result[key] || models)[path]; | ||
252 | } | ||
249 | } | 253 | } |
250 | for (key in models) { | 254 | for (key in models) { |
251 | model = models[key]; | 255 | model = models[key]; |
252 | if ((_ref1 = result[key]) == null) { | 256 | if ((_ref2 = result[key]) == null) { |
253 | result[key] = model; | 257 | result[key] = model; |
254 | } | 258 | } |
255 | } | 259 | } | ... | ... |
This diff is collapsed.
Click to expand it.
1 | { | 1 | { |
2 | "name": "rivets", | 2 | "name": "rivets", |
3 | "description": "Declarative data binding facility.", | 3 | "description": "Declarative data binding facility.", |
4 | "version": "0.5.10", | 4 | "version": "0.5.11", |
5 | "author": "Michael Richards", | 5 | "author": "Michael Richards", |
6 | "url": "http://rivetsjs.com", | 6 | "url": "http://rivetsjs.com", |
7 | "main": "./dist/rivets.js", | 7 | "main": "./dist/rivets.js", | ... | ... |
-
Please register or sign in to post a comment