History log of /yui3/src/app/js/model.js
Revision Date Author Comments Expand
421945fc2bca8dfac11d6a92f5cc7933c7ca53c2 27-Mar-2012 Eric Ferraiuolo <eferraiuolo@gmail.com>

All App Framework modules now show up on the API docs overview page. Added `@module app` to all of the source files. Also included `Y.App.Transitions` in the README.

96b3e98e94174f40c588dff3508b107d832babc8 21-Mar-2012 Luke Smith <lsmith@yahoo-inc.com>

Round two copy refinement.

849c8fc59344960665b1537fff3a8d623b7b7668 21-Mar-2012 Luke Smith <lsmith@yahoo-inc.com>

Copy edit for toJSON API docs

83addc5aad532305c5a6c142602032f910e5e46d 23-Feb-2012 Ryan Grove <ryan@wonko.com>

Comment tweak.

27e3f851cf7f14289953ac48fced0b7fd5d28a8c 23-Feb-2012 Ryan Grove <ryan@wonko.com>

Please stop filing bugs about toJSON() not returning a JSON string. ES5 made us do it: http://es5.github.com/#x15.12.3

cc64b310961b0510a522e8ef40086dace8642500 14-Feb-2012 Ryan Grove <ryan@wonko.com>

Model now supports ad-hoc attributes. You no longer need to subclass Y.Model and declare attributes before use. Now you can just fire from the hip! var model = new Y.Model({foo: 'foo', bar: 'bar'}); model.get('foo'); // => 'foo' model.get('bar'); // => 'bar'

68e68fe22863b2afe7851bef4bb9628b6fab1f66 14-Feb-2012 Ryan Grove <ryan@wonko.com>

Clarify that the callback will be called even when not deleting. [Fixes #2531785]

58c5fd7aab3cd8a846fd2bc2e28faf50c2ed6afb 14-Feb-2012 Ryan Grove <ryan@wonko.com>

s/load/save/ in doc comment.

55f24a3cab01e2d217528820c54decb1975c1385 13-Feb-2012 Ryan Grove <ryan@wonko.com>

Publish the right event. [Fixes #2531783]

3f630e41ea190e5f918a371760404cce9f3caa13 07-Feb-2012 Ryan Grove <ryan@wonko.com>

Make Model's destroy event fully preventable. Also preferring options.remove over options['delete'], although both will work.

a22945f6948681117831cb365c68987d67c844e7 11-Jan-2012 Ryan Grove <ryan@wonko.com>

add(), remove(), and reset() now support ModelLists as args. [Ticket #2531408]

ee8c11237e0fb20d3bfc4329e5e5a2a05b223d9c 11-Jan-2012 Ryan Grove <ryan@wonko.com>

Merge options into the change event facade. [Fixes #2531492]

e555c9d01738735fa1493766e1c1a478e02abbc5 10-Jan-2012 Ryan Grove <ryan@wonko.com>

Allow adding models created in another YUI sandbox or window. [Fixes #2531543]

7b7e7864f5071e8445b7023a6cb23d4a324d0426 24-Oct-2011 Ryan Grove <ryan@wonko.com>

Make validate() async. [Ticket #2531218] For backcompat, synchronous validate() methods will still work, but will log a deprecation warning.

d89a7d2fca300684fcbe3426f41ed30d106d17ec 21-Oct-2011 Ryan Grove <ryan@wonko.com>

Add load and save events. [Ticket #2531207]

14ddb6a3257cc72d2fe8c7988685d4fd7f9388b9 23-Sep-2011 Ryan Grove <ryan@wonko.com>

`validate()` is now only called on `save()` [Fixes #2531132]

dc1d6c6756794fedbecb070a16439b5681376d3e 26-Jul-2011 Ryan Grove <ryan@wonko.com>

Add an `error` event to ModelList. [Fixes #2530567] Similar to the `error` event on Model. Fires when a dupe model is added to the list, a nonexistent model is removed, or a parse error occurs. This provides an opportunity to gracefully handle these errors.

dd1438ea909a39d6bb203a40df018e2da8028239 21-Jul-2011 Ryan Grove <ryan@wonko.com>

API doc improvements.

07a68656a93232fbaa9823d05fcd0ad29ae3c905 20-Jul-2011 Ryan Grove <ryan@wonko.com>

Iterate over a copy of the lists array in destroy(). [Fixes #2530558] Since the lists array is modified during the iteration, some lists were being unintentionally skipped.

44b86a1b6d0f3112ab185adfe78170adea90f965 19-Jul-2011 Ryan Grove <ryan@wonko.com>

Fix comment typos.

56c6a0e8b53fa69bb0d04ca0302b096270ae8811 28-Jun-2011 Ryan Grove <ryan@wonko.com>

Comment typo.

e92b354a91ff858a6be7f99970ad902d9afb1087 22-Jun-2011 Ryan Grove <ryan@wonko.com>

Rename the `error` event's `type` property to `src`.

fdb21fcfca5bb919460a1dfb32bfe6f8dc2d4394 16-Jun-2011 Ryan Grove <ryan@wonko.com>

Remove outdated reference to url() in API docs.

e642c14e3a48b3362d024b94eadf65076b2f8964 04-Jun-2011 Ryan Grove <ryan@wonko.com>

First cut of Controller.

28a8e0279a902de63cab9fc58463f2b0dbc2024b 03-Jun-2011 Ryan Grove <ryan@wonko.com>

Allow a single model to exist in multiple ModelLists. The Model.list property is now Model.lists, and is always an array.

6b5704f613b14e7f60b594f328ea82f019dc3f5c 02-Jun-2011 Ryan Grove <ryan@wonko.com>

Copy the attributes object before modifying it.

372400f30f5a055d4ecc55e0c574ef88e80846cb 01-Jun-2011 Ryan Grove <ryan@wonko.com>

Comment tweaks.

19bc33efdb0bbf8cd02dfac2ff6d16f277c5ac3e 01-Jun-2011 Ryan Grove <ryan@wonko.com>

Pass destroy() options to the list, if any.

8fc20c3eda6ced5d96b34619ecac42f7c6693a78 31-May-2011 Ryan Grove <ryan@wonko.com>

Style tweaks.

cdcb2ce76d2db25d234e316dfefc458c097eb1d9 31-May-2011 Eric Ferraiuolo <eferraiuolo@gmail.com>

changed how we are keeping model’s id attribute and custom id attribute initial values in sync, makes unit tests pass too

c4bc13586b52ac0f9c30787e0a8fc94fc54e7688 31-May-2011 Ryan Grove <ryan@wonko.com>

Make Model.undo chainable.

1125beffa0cfb4442dba9799f941064a67b8934c 31-May-2011 Ryan Grove <ryan@wonko.com>

Include the model's name when generating a clientId.

8b09d54ecbad4bfeadfb0bbae3a665f8c6964f26 31-May-2011 Ryan Grove <ryan@wonko.com>

In Model.save(), reset this.changed even when no response is supplied.

90968831445531df5d4c48bdc770cc61afa4d646 27-May-2011 Ryan Grove <ryan@wonko.com>

Make json-parse a hard dependency of model and model-list.

381df4e51db78c6c21fdd5ab2806747a9199f0f5 27-May-2011 Ryan Grove <ryan@wonko.com>

Include the response in the event facade when firing a parse error.

6ef72914c921855291f02033642b4b9aaf5c9bca 27-May-2011 Ryan Grove <ryan@wonko.com>

Fix options not being passed when calling set().

f2729150ac98150b0a69a28d3c83860141aded2e 27-May-2011 Eric Ferraiuolo <eferraiuolo@gmail.com>

fixed the _getAttrInitVal override to actually be correct by always delegating to super since the super impl is smart and will always do the right thing.

98c9efb9241187af62197af2adcdc129a51a5d30 27-May-2011 Ryan Grove <ryan@wonko.com>

Minor tweaks.

8307dadbd4aa4ba4079d3c37394493a808c941d3 27-May-2011 Ryan Grove <ryan@wonko.com>

initValues is sometimes null

2e8bf3ce848062b9a885bc0cff8ef68d1974eb06 26-May-2011 Eric Ferraiuolo <eferraiuolo@gmail.com>

have model work correctly with _getAttrInitVal's documented signature for initValues argument

b88e6f2d169826248f1a4728f3047ae6bf56058e 26-May-2011 Ryan Grove <ryan@wonko.com>

Fix error when destroy() is called with no options and no callback.

2d8d8c68b6800e73f7024fd63a7e831a66a63446 25-May-2011 Ryan Grove <ryan@wonko.com>

Rename Model.delete() to destroy(). This method now overrides Base's destroy(), but calls it after the Model-specific destroy functionality finishes. Use model.destroy({'delete': true}) to both destroy the model instance and delete it from the persistence layer.

cda1d9522255aea025492386930fbf4c9d143272 25-May-2011 Eric Ferraiuolo <eferraiuolo@gmail.com>

Allow custom id attributes to be set at initialization time.

17bbe647a95d202f25a091ade6a2a08fecb34be1 25-May-2011 Ryan Grove <ryan@wonko.com>

Remove url() method.

40f18194cf19ce535f6545638aec807a92460b84 25-May-2011 Ryan Grove <ryan@wonko.com>

Comment fixes.

4c57fe15d60498bea60eaff7b110b548194e227d 24-May-2011 Ryan Grove <ryan@wonko.com>

Exclude `clientId` from Model's toJSON output.

19329680cc5360860da518fceb3dd0aaa8cb9ffd 24-May-2011 Ryan Grove <ryan@wonko.com>

Use dot notation. Silly me.

a598a3cb7ec85efcd3cc489307a373467c482a78 24-May-2011 Eric Ferraiuolo <eferraiuolo@gmail.com>

Make Model's `change` event non-preventable.

3e17c99abbf1c947ffbfb3468d7cb81a593f7841 24-May-2011 Ryan Grove <ryan@wonko.com>

Add an `idAttribute` prototype property to Y.Model to allow custom id attribute names.

9458199c36cf639f5d46be8a3153cf131b2fd1bd 23-May-2011 Eric Ferraiuolo <eferraiuolo@gmail.com>

Updated Model to fix places where sync updates the changed attrs hash. POC for excluding attrs in toJSON which are aggregated from the class hierarchy

4cd94e1376a672c7e4beb69558d7c08e6539478a 22-May-2011 Eric Ferraiuolo <eferraiuolo@gmail.com>

removed pk attr check, it didn't work

a86099fe545ea13059056f99c3b73df5f98127ed 22-May-2011 Eric Ferraiuolo <eferraiuolo@gmail.com>

fixed how pk ATTR works

a597a23ff5c0ba9f01c2be28aa8c82ab0d6120e3 22-May-2011 Eric Ferraiuolo <eferraiuolo@gmail.com>

pure ATTR impl of 'pk' primary key

de8ed7a43631f05ef346b1f1b556edf31faaa776 21-May-2011 Eric Ferraiuolo <eferraiuolo@gmail.com>

made Model event not preventable

d8a50d995ab42eaa9ae46f4002b36f4f23aeb257 19-May-2011 Ryan Grove <ryan@wonko.com>

Remove unnecessary assignment.

b346a82ea2a9f26d35ed2279e7e6f990af012121 19-May-2011 Ryan Grove <ryan@wonko.com>

Add missing hasOwnProperty check.

b9b960b14726c5bf1802425b93eca7ace62e57c5 19-May-2011 Ryan Grove <ryan@wonko.com>

Make change coalescing work even when attr change events are prevented.

675886b56e403d63b862c3e6a597c0d4a708c038 19-May-2011 Eric Ferraiuolo <eferraiuolo@gmail.com>

fix for coalesce, but it's not right

0a78b956f1eec35c2c52835e952014dca4ed828c 18-May-2011 Ryan Grove <ryan@wonko.com>

Make the app framework buildable.

023e9fced7f9fad2a4fdd078e4eda44c1f35c206 18-May-2011 Ryan Grove <ryan@wonko.com>

Bug fixes galore, plus a barebones todo list test app.

44c5bf47bb4c5ef44563f475b8bf2f26f48825f0 18-May-2011 Ryan Grove <ryan@wonko.com>

More work in progress on models and model lists.

68be53eabcd12a9495f65bf15eb9429441154511 18-May-2011 Ryan Grove <ryan@wonko.com>

Work in progress on app framework reimagining. None of this code has even been executed yet, so don't expect it to work!

0367f9f6eecbef9ec951d35e7e89bde7545ad740 17-May-2011 Ryan Grove <ryan@wonko.com>

Bug fixes galore, plus a barebones todo list test app.

0804d9bfe6beb380217cc70ac79d976a1c21eb88 16-May-2011 Ryan Grove <ryan@wonko.com>

More work in progress on models and model lists.

4eb81417f7bbcbaad275e64eb137fada4ca4bcc0 12-May-2011 Ryan Grove <ryan@wonko.com>

Work in progress on app framework reimagining. None of this code has even been executed yet, so don't expect it to work!