Recompile!
Showing
1 changed file
with
8 additions
and
10 deletions
1 | // Generated by CoffeeScript 1.3.1 | 1 | // Generated by CoffeeScript 1.3.3 |
2 | (function() { | 2 | (function() { |
3 | var Rivets, attributeBinding, bidirectionals, getInputValue, rivets, stateBinding, | 3 | var Rivets, attributeBinding, bidirectionals, getInputValue, rivets, stateBinding, |
4 | __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, | 4 | __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, |
... | @@ -8,8 +8,6 @@ | ... | @@ -8,8 +8,6 @@ |
8 | 8 | ||
9 | Rivets.Binding = (function() { | 9 | Rivets.Binding = (function() { |
10 | 10 | ||
11 | Binding.name = 'Binding'; | ||
12 | |||
13 | function Binding(el, type, context, keypath, formatters) { | 11 | function Binding(el, type, context, keypath, formatters) { |
14 | this.el = el; | 12 | this.el = el; |
15 | this.type = type; | 13 | this.type = type; |
... | @@ -48,7 +46,9 @@ | ... | @@ -48,7 +46,9 @@ |
48 | return _this.set(value); | 46 | return _this.set(value); |
49 | }); | 47 | }); |
50 | if (_ref = this.type, __indexOf.call(bidirectionals, _ref) >= 0) { | 48 | if (_ref = this.type, __indexOf.call(bidirectionals, _ref) >= 0) { |
51 | return this.el.addEventListener('change', function(el) { | 49 | return this.el.addEventListener('change', function(e) { |
50 | var el; | ||
51 | el = e.target || e.srcElement; | ||
52 | return Rivets.config.adapter.publish(_this.context, _this.keypath, getInputValue(el)); | 52 | return Rivets.config.adapter.publish(_this.context, _this.keypath, getInputValue(el)); |
53 | }); | 53 | }); |
54 | } | 54 | } |
... | @@ -60,8 +60,6 @@ | ... | @@ -60,8 +60,6 @@ |
60 | 60 | ||
61 | Rivets.View = (function() { | 61 | Rivets.View = (function() { |
62 | 62 | ||
63 | View.name = 'View'; | ||
64 | |||
65 | function View(el, contexts) { | 63 | function View(el, contexts) { |
66 | this.el = el; | 64 | this.el = el; |
67 | this.contexts = contexts; | 65 | this.contexts = contexts; |
... | @@ -85,8 +83,9 @@ | ... | @@ -85,8 +83,9 @@ |
85 | }; | 83 | }; |
86 | 84 | ||
87 | View.prototype.build = function() { | 85 | View.prototype.build = function() { |
88 | var attribute, context, dataRegExp, keypath, node, path, pipes, type, _i, _len, _ref, _results; | 86 | var attribute, bindingRegExp, context, keypath, node, path, pipes, type, _i, _len, _ref, _results; |
89 | this.bindings = []; | 87 | this.bindings = []; |
88 | bindingRegExp = this.bindingRegExp(); | ||
90 | _ref = this.el.getElementsByTagName('*'); | 89 | _ref = this.el.getElementsByTagName('*'); |
91 | _results = []; | 90 | _results = []; |
92 | for (_i = 0, _len = _ref.length; _i < _len; _i++) { | 91 | for (_i = 0, _len = _ref.length; _i < _len; _i++) { |
... | @@ -97,9 +96,8 @@ | ... | @@ -97,9 +96,8 @@ |
97 | _results1 = []; | 96 | _results1 = []; |
98 | for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { | 97 | for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { |
99 | attribute = _ref1[_j]; | 98 | attribute = _ref1[_j]; |
100 | dataRegExp = new RegExp(this.data, 'g'); | 99 | if (bindingRegExp.test(attribute.name)) { |
101 | if (this.bindingRegExp().test(attribute.name)) { | 100 | type = attribute.name.replace(bindingRegExp, ''); |
102 | type = attribute.name.replace(this.bindingRegExp(), ''); | ||
103 | pipes = attribute.value.split('|').map(function(pipe) { | 101 | pipes = attribute.value.split('|').map(function(pipe) { |
104 | return pipe.trim(); | 102 | return pipe.trim(); |
105 | }); | 103 | }); | ... | ... |
-
Please register or sign in to post a comment