Releases: gregjacobs/Data.js
Releases · gregjacobs/Data.js
0.5.0
- Remove
data.persistence.request.Batchclass. No longer used. - Add new OperationDeferred class, and use it to clean up Operation class a bit.
- Allow users to attach 'progress' handlers to Operation objects, to be notified of requests within the Operation being completed.
- Add the ability for Proxies to notify of progress for a given Request.
- Consolidate proxy handling for DataComponents (Models and Collections) into the DataComponent class.
- Update Lo-Dash to 2.4.0
0.4.0
New Features:
- Add 'loadsuccess' and 'loaderror' events to Collection.
- Add
getIncompleteRequests()method todata.persistence.operation.Operation - Change Request's
setException()method tosetError(), andgetException()togetError(). - Add
abort()method to Proxy, to allow subclasses to add any proxy-specific implementation. - AjaxProxy (
data.persistence.proxy.Ajax) now aborts individual XHR requests when an Operation is aborted ('load', 'save', etc). - Operation now takes care of setting Requests' success or error states, instead of leaving Proxies to do it. Proxies now resolve their Promise with a ResultSet (if needed), and reject their Promise with an error object or string.
Bug Fixes:
- Fix an issue with Model saving related models/collections, where its 'saveerror' event wouldn't be fired if a related model/collection failed to save/synchronize.
0.3.1
- Fix scope for callbacks provided to Model.save() and Model.destroy().
0.3.0
- Add Memory proxy
- Add
ignoreUnknownAttrsoption to be passed to the Model constructor - Change Model's
ignoreUnknownAttrsconfig toignoreUnknownAttrsOnLoad - Add
ignoreUnknownAttrsOnLoadconfig to Collection. - Model's
load(),save(), anddestroy()methods now return anOperationPromiseobject instead of a rawjQuery.Deferred, allowingcancel()handlers to be attached, and the ability to abort operations. Each method now also accepts a 'cancel' callback function option as well. - Add 'loadsuccess', 'loaderror', 'loadcancel', 'savesuccess', 'saveerror', 'savecancel', 'destroysuccess', 'destroyerror', and 'destroycancel' events to Model, for individual event subscriptions.
- Model's 'load', 'save', and 'destroy' events now fire if their corresponding operations are aborted. This is to maintain the "catch-all" property of these events, and to make these events consistent with the 'complete' callbacks and 'always' handlers that can be attached to the returned promise.
- Model's
load(),save(), anddestroy()methods' promises are now resolved/rejected with the arguments: [model, operation] instead of [model, request]. - Change
Operation.wasCanceled()toOperation.wasAborted() - Remove 'action' parameter from Ajax proxy's
buildParams()method - Model now reads back any server-returned (i.e. proxy-returned) data from a save operation, in order to update the Model with server state.
0.2.3
- Doc fix in persistence/operation/Promise.js
0.2.2
- Ignore vendor/ directory for Bower
0.2.1
- Update Lo-Dash to 2.2.1
0.2.0
- Add
state()andprogress()methods todata.persistence.operation.Operationanddata.persistence.operation.Promise, to make them fully
compatible with jQuery's Promise interface. This allows the use ofjQuery.when()on multiple OperationPromises.
0.1.2
- Update bower.json for latest version numbers on Class.js and Observable.js dependencies.
0.1.1
- Fix a few doc bugs.