From 218e23559a87f59e8c39bf43f4bd6c437f459b19 Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Thu, 19 Mar 2015 12:14:29 -0600 Subject: [PATCH] Clarifies ALL_EDITS_SENT object properties --- doc/offlinefeaturesmanager.md | 2 +- lib/edit/offlineFeaturesManager.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/offlinefeaturesmanager.md b/doc/offlinefeaturesmanager.md index 90f5e70..598228e 100644 --- a/doc/offlinefeaturesmanager.md +++ b/doc/offlinefeaturesmanager.md @@ -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. diff --git a/lib/edit/offlineFeaturesManager.js b/lib/edit/offlineFeaturesManager.js index f8fed58..dd5cb85 100644 --- a/lib/edit/offlineFeaturesManager.js +++ b/lib/edit/offlineFeaturesManager.js @@ -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))