diff options
author | Struan Donald <struan@exo.org.uk> | 2013-05-20 11:21:32 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-05-20 11:21:32 +0100 |
commit | 80bb2885931f67b17dcf013d59166c37cc0fbe1f (patch) | |
tree | 02393698a7882d37b86a68d2ff9c3663d09bad5b /www/js | |
parent | 67f91858176bae96bd975d2d583a04576c888940 (diff) |
even if we fail to delete a draft behave as if it worked for now
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/views/existing.js | 1 | ||||
-rw-r--r-- | www/js/views/offline.js | 1 | ||||
-rw-r--r-- | www/js/views/reports.js | 1 | ||||
-rw-r--r-- | www/js/views/save_offline.js | 1 | ||||
-rw-r--r-- | www/js/views/submit.js | 1 |
5 files changed, 5 insertions, 0 deletions
diff --git a/www/js/views/existing.js b/www/js/views/existing.js index 7ba03e5..00dd055 100644 --- a/www/js/views/existing.js +++ b/www/js/views/existing.js @@ -26,6 +26,7 @@ var reset = FMS.removeDraft(this.model.id, true); var that = this; reset.done( function() { that.onDraftRemove(); } ); + reset.fail( function() { that.onDraftRemove(); } ); }, onDraftRemove: function() { diff --git a/www/js/views/offline.js b/www/js/views/offline.js index 84bbe1c..d785d39 100644 --- a/www/js/views/offline.js +++ b/www/js/views/offline.js @@ -113,6 +113,7 @@ var that = this; del.done( function() { that.draftDeleted(); } ); + del.fail( function() { that.draftDeleted(); } ); } else { FMS.clearCurrentDraft(); this.navigate( this.next, 'left' ); diff --git a/www/js/views/reports.js b/www/js/views/reports.js index 23956d4..8340aae 100644 --- a/www/js/views/reports.js +++ b/www/js/views/reports.js @@ -20,6 +20,7 @@ var del = FMS.removeDraft( id, true ); var that = this; del.done( function() { that.onRemoveDraft(el); } ); + del.fail( function() { that.onRemoveDraft(el); } ); }, useReport: function(e) { diff --git a/www/js/views/save_offline.js b/www/js/views/save_offline.js index eb7ff19..875fe42 100644 --- a/www/js/views/save_offline.js +++ b/www/js/views/save_offline.js @@ -20,6 +20,7 @@ var reset = FMS.removeDraft(FMS.currentDraft.id, true); var that = this; reset.done( function() { that.onDraftRemove(); } ); + reset.fail( function() { that.onDraftRemove(); } ); }, onDraftRemove: function() { diff --git a/www/js/views/submit.js b/www/js/views/submit.js index 3c0652c..9eb4de2 100644 --- a/www/js/views/submit.js +++ b/www/js/views/submit.js @@ -55,6 +55,7 @@ var reset = FMS.removeDraft( model.id, true); var that = this; reset.done( function() { that.onRemoveDraft(); } ); + reset.fail( function() { that.onRemoveDraft(); } ); }, onRemoveDraft: function() { |