c5fd5f1b by Patrick Gibson

Recompile!

1 parent 7cf880b2
// Generated by CoffeeScript 1.3.1
// Generated by CoffeeScript 1.3.3
(function() {
var Rivets, attributeBinding, bidirectionals, getInputValue, rivets, stateBinding,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
......@@ -8,8 +8,6 @@
Rivets.Binding = (function() {
Binding.name = 'Binding';
function Binding(el, type, context, keypath, formatters) {
this.el = el;
this.type = type;
......@@ -48,7 +46,9 @@
return _this.set(value);
});
if (_ref = this.type, __indexOf.call(bidirectionals, _ref) >= 0) {
return this.el.addEventListener('change', function(el) {
return this.el.addEventListener('change', function(e) {
var el;
el = e.target || e.srcElement;
return Rivets.config.adapter.publish(_this.context, _this.keypath, getInputValue(el));
});
}
......@@ -60,8 +60,6 @@
Rivets.View = (function() {
View.name = 'View';
function View(el, contexts) {
this.el = el;
this.contexts = contexts;
......@@ -85,8 +83,9 @@
};
View.prototype.build = function() {
var attribute, context, dataRegExp, keypath, node, path, pipes, type, _i, _len, _ref, _results;
var attribute, bindingRegExp, context, keypath, node, path, pipes, type, _i, _len, _ref, _results;
this.bindings = [];
bindingRegExp = this.bindingRegExp();
_ref = this.el.getElementsByTagName('*');
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
......@@ -97,9 +96,8 @@
_results1 = [];
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
attribute = _ref1[_j];
dataRegExp = new RegExp(this.data, 'g');
if (this.bindingRegExp().test(attribute.name)) {
type = attribute.name.replace(this.bindingRegExp(), '');
if (bindingRegExp.test(attribute.name)) {
type = attribute.name.replace(bindingRegExp, '');
pipes = attribute.value.split('|').map(function(pipe) {
return pipe.trim();
});
......