11c6d643 by Michael Richards

Build 0.4.1.

1 parent 2fa291b5
// rivets.js
// version: 0.4.0
// version: 0.4.1
// author: Michael Richards
// license: MIT
(function() {
......@@ -88,12 +88,12 @@
Binding.prototype.bind = function() {
var dependency, keypath, model, _i, _len, _ref, _ref1, _ref2, _results;
if ((_ref = this.binder.bind) != null) {
_ref.call(this, this.el);
}
if (this.options.bypass) {
this.sync();
} else {
if ((_ref = this.binder.bind) != null) {
_ref.call(this, this.el);
}
Rivets.config.adapter.subscribe(this.model, this.keypath, this.sync);
if (Rivets.config.preloadData) {
this.sync();
......@@ -120,10 +120,10 @@
Binding.prototype.unbind = function() {
var keypath, _i, _len, _ref, _ref1, _ref2, _results;
if ((_ref = this.binder.unbind) != null) {
_ref.call(this, this.el);
}
if (!this.options.bypass) {
if ((_ref = this.binder.unbind) != null) {
_ref.call(this, this.el);
}
Rivets.config.adapter.unsubscribe(this.model, this.keypath, this.sync);
}
if ((_ref1 = this.options.dependencies) != null ? _ref1.length : void 0) {
......@@ -407,10 +407,10 @@
checked: {
publishes: true,
bind: function(el) {
return bindEvent(el, 'change', this.publish);
return this.currentListener = bindEvent(el, 'change', this.publish);
},
unbind: function(el) {
return unbindEvent(el, 'change', this.publish);
return unbindEvent(el, 'change', this.currentListener);
},
routine: function(el, value) {
if (el.type === 'radio') {
......@@ -423,10 +423,10 @@
unchecked: {
publishes: true,
bind: function(el) {
return bindEvent(el, 'change', this.publish);
return this.currentListener = bindEvent(el, 'change', this.publish);
},
unbind: function(el) {
return unbindEvent(el, 'change', this.publish);
return unbindEvent(el, 'change', this.currentListener);
},
routine: function(el, value) {
if (el.type === 'radio') {
......@@ -448,10 +448,10 @@
value: {
publishes: true,
bind: function(el) {
return bindEvent(el, 'change', this.publish);
return this.currentListener = bindEvent(el, 'change', this.publish);
},
unbind: function(el) {
return unbindEvent(el, 'change', this.publish);
return unbindEvent(el, 'change', this.currentListener);
},
routine: function(el, value) {
var o, _i, _len, _ref, _results;
......
{
"name" : "rivets",
"description" : "Declarative data binding facility.",
"version" : "0.4.0",
"version" : "0.4.1",
"author" : "Michael Richards",
"url" : "http://rivetsjs.com",
"main" : "./lib/rivets.js",
......
# rivets.js
# version : 0.4.0
# version : 0.4.1
# author : Michael Richards
# license : MIT
......