Makoto #22

Open
wants to merge 43 commits into
from

Conversation

Projects
None yet
2 participants

makoto commented Mar 26, 2012

here is the invalid error event. Not sure if I wrote the test the way it should be, so feel free to tweak or throw away.

benpickles and others added some commits Feb 2, 2012

@benpickles benpickles It's a Model on the Model object... ced26a6
@benpickles benpickles Refactor localStorage persistence. d3f181f
@benpickles benpickles Change the persistence interface to just be save instead of create an…
…d update.

Introduce a NullPersistence adapter.
293c92e
@benpickles benpickles Delegate newRecord to the persistence adapter. 2b2af9c
@benpickles benpickles No need for all that funk anymore. 36d5ae1
@benpickles benpickles toJSON does that. 3b30fb8
@benpickles benpickles Keep the public API to a minimum. 391dec3
@benpickles benpickles Persistence adapters are now just plugins. 7e49b90
@benpickles benpickles Re-enable adding custom REST methods. f91f783
@benpickles benpickles There's only a save event now. 670329a
@benpickles benpickles Merge branch 'persistence' b08a513
@benpickles benpickles Add a separate Collection object. a071ef7
@benpickles benpickles Use a proxy store object. 7dbf19a
@benpickles benpickles Apply delegate array methods in a single pass. c388cb9
@benpickles benpickles Ensure enumerable methods are passed the correct third argument. 162d806
@benpickles benpickles Don't make me had to know the implementation just to access an indexe…
…d element from a collection.
bb275c4
@benpickles benpickles Sort by something.
Sorting an array of objects in IE6 seems to be random.
19668d3
@benpickles benpickles Use length property not count method. ff96a34
@benpickles benpickles Consume your own API. 2cf7066
@benpickles benpickles Add Collection#detect method. 63cedff
@benpickles benpickles Merge branch 'master' into collection 5e8f4d1
@benpickles benpickles Switch to using the a Collection object. b09e2df
@benpickles benpickles Trigger events from Collection #add and #remove. 118d657
@benpickles benpickles Merge branch 'collection' 285938d
@benpickles benpickles Event emitter. 5404aca
@benpickles benpickles Add an anyInstance event emitter. 8c66685
@benpickles benpickles The class's default collection now listens to the anyInstance emitter…
… - no more explicit adding/removing.
023d03f
@benpickles benpickles Allow a custom scope for a event emitter callback. 8eece95
@benpickles benpickles Merge branch 'event-emitter' into v1 7c16d97
@benpickles benpickles Use a slightly modified version of Backbone's `inherits` as a generic…
… means of adding prototypal inheritance.
a3ab5b3
@benpickles benpickles Generate a new Collection sub-class for each model so that custom col…
…lection methods can be defined per-model.
8b65ac5
@benpickles benpickles Not used anymore - get a decent browser or polyfill. 75f84cf
@benpickles benpickles Use Augment.js to get tests (mostly) passing in IE6. 51fe038
@benpickles benpickles Using localStorage in a browser that doesn't support it will fail. c672751
@benpickles benpickles Emit a "change" or "change:ATTRIBUTE_NAME" event when modifying attri…
…butes on an instance.
fd2ec12
@benpickles benpickles Use #get #set instead of #attr. b9944fa
@benpickles benpickles Closurify. 0559b62
@benpickles benpickles The "change" event should also be emitted when changing a single attr…
…ibute.
fbc013b
@benpickles benpickles Indexer. f42bb6e
@benpickles benpickles Allow "anonymous" models to be created. 52cd4ba
@benpickles benpickles Allow custom indexer keys. 8eac3e0
@makoto makoto Added model_callbacks_test 567d174
@makoto makoto Added error event emit bb00800
Owner

benpickles commented May 15, 2012

This is great and is a step towards persistence as a listener (as opposed to explicitly called by the model) but the invalid event could probably just be emitted from within the valid() function - https://github.com/benpickles/js-model/blob/master/src/model_model.js#L126.

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