Clarifies ALL_EDITS_SENT object properties

This commit is contained in:
Andy Gup 2015-03-19 12:14:29 -06:00
parent f6fdc2e978
commit 218e23559a
2 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ Event | Value | Returns | Description
`events.EDITS_SENT_ERROR` | "edits-sent-error" | {msg:error} | **New at v2.5** There was a problem while sending errors to the server.
`events.EDITS_ENQUEUED` | "edits-enqueued" | nothing | When an edit is enqueued and not sent to the server.
`events.EDITS_ENQUEUED_ERROR` | "edits-enqueued-error" | {msg:error} | **New at v2.5** An error occurred while trying to store the edit. In your app it is recommended to verify if the edit is in the database or not.
`events.ALL_EDITS_SENT` | "all-edits-sent" | nothing| After going online and there are no pending edits remaining in the queue. Be sure to also check for `EDITS_SENT_ERROR`.
`events.ALL_EDITS_SENT` | "all-edits-sent" | {[addResults] ,[updateResults], [deleteResults]} | After going online and there are no pending edits remaining in the queue. Be sure to also check for `EDITS_SENT_ERROR`.
`events.ATTACHMENT_ENQUEUED` | "attachment-enqueued" | nothing | An attachment is in the queue to be sent to the server.
`events.ATTACHMENTS_SENT` | "attachments-sent" | nothing | When any attachment is actually sent to the server.

View File

@ -964,7 +964,7 @@ define([
/**
* Attempts to send any edits in the database. Monitor events for success or failure.
* @param callback
* @event ALL_EDITS_SENT when all edits have been successfully sent
* @event ALL_EDITS_SENT when all edits have been successfully sent. Contains {[addResults],[updateResults],[deleteResults]}
* @event EDITS_SENT_ERROR some edits were not sent successfully
* @private
*/
@ -1069,7 +1069,7 @@ define([
this.emit(this.events.EDITS_SENT_ERROR, {msg: "Problem deleting phantom graphic(s)"});
}
else {
this.emit(this.events.ALL_EDITS_SENT);
this.emit(this.events.ALL_EDITS_SENT,responses);
}
callback && callback(true, responses);
}.bind(this))