Skip to content

Releases: gregjacobs/Data.js

0.5.0

30 Nov 19:54

Choose a tag to compare

0.5.0 Pre-release
Pre-release
  • Remove data.persistence.request.Batch class. 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

21 Nov 20:44

Choose a tag to compare

0.4.0 Pre-release
Pre-release

New Features:

  • Add 'loadsuccess' and 'loaderror' events to Collection.
  • Add getIncompleteRequests() method to data.persistence.operation.Operation
  • Change Request's setException() method to setError(), and getException() to getError().
  • 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

21 Nov 20:31

Choose a tag to compare

0.3.1 Pre-release
Pre-release
  • Fix scope for callbacks provided to Model.save() and Model.destroy().

0.3.0

21 Nov 20:32

Choose a tag to compare

0.3.0 Pre-release
Pre-release
  • Add Memory proxy
  • Add ignoreUnknownAttrs option to be passed to the Model constructor
  • Change Model's ignoreUnknownAttrs config to ignoreUnknownAttrsOnLoad
  • Add ignoreUnknownAttrsOnLoad config to Collection.
  • Model's load(), save(), and destroy() methods now return an OperationPromise object instead of a raw jQuery.Deferred, allowing cancel() 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(), and destroy() methods' promises are now resolved/rejected with the arguments: [model, operation] instead of [model, request].
  • Change Operation.wasCanceled() to Operation.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

21 Nov 20:37

Choose a tag to compare

0.2.3 Pre-release
Pre-release
  • Doc fix in persistence/operation/Promise.js

0.2.2

21 Nov 20:37

Choose a tag to compare

0.2.2 Pre-release
Pre-release
  • Ignore vendor/ directory for Bower

0.2.1

21 Nov 20:34

Choose a tag to compare

0.2.1 Pre-release
Pre-release
  • Update Lo-Dash to 2.2.1

0.2.0

21 Nov 20:33

Choose a tag to compare

0.2.0 Pre-release
Pre-release
  • Add state() and progress() methods to data.persistence.operation.Operation and data.persistence.operation.Promise, to make them fully
    compatible with jQuery's Promise interface. This allows the use of jQuery.when() on multiple OperationPromises.

0.1.2

21 Nov 20:37

Choose a tag to compare

0.1.2 Pre-release
Pre-release
  • Update bower.json for latest version numbers on Class.js and Observable.js dependencies.

0.1.1

21 Nov 20:36

Choose a tag to compare

0.1.1 Pre-release
Pre-release
  • Fix a few doc bugs.