Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Correct radio change events and optimize CollectionBinder::getManagerForModel #133

merged 4 commits into from Apr 29, 2013


None yet
2 participants

katowulf commented Apr 29, 2013

Fixes for #131 and #132. All test cases passing (see issues for samples and details)

katowulf added some commits Apr 25, 2013

@katowulf katowulf Trigger change events for radio and checkbox items. Currently, no .on…
…('change'...) is fired if the model causes an update. This is necessary for widgets and listeners acting directly on the checkbox/radio items.

The change triggers must be deferred, however, or the old model value is actually thrown out to test units (and presumably public listeners).
@katowulf katowulf Fixes theironcook/Backbone.ModelBinder#131
Optimize CollectionBinder::getManagerForModel to use keyed values already stored internally.

defaultBindings was generating a js error; this did not cause any test cases to fail because it occurred after test cases completed. However, since the checkboxes return boolean values, there is no .replace value available; corrected.
@katowulf katowulf Fixes theironcook/Backbone.ModelBinder#132 - fire checkbox and radio …
…change events when updated from model. Fix tested in all current browser versions (IE 9) and all test cases pass in those browsers.
@katowulf katowulf Minified versions of ModelBinder and CollectionBinder for fixes their… ff53fcb

katowulf commented on 5432d50 Apr 29, 2013

I committed this locally then realized it wasn't working in all browsers during testing. The next commit reverts and corrects this change.

@theironcook theironcook added a commit that referenced this pull request Apr 29, 2013

@theironcook theironcook Merge pull request #133 from katowulf/master
Correct radio change events and optimize CollectionBinder::getManagerForModel

@theironcook theironcook merged commit 21b44e9 into theironcook:master Apr 29, 2013

value.replace doesn't work with booleans; probably never did; it didn't fire until after the test unit was resolved so it never got caught

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment