aboutsummaryrefslogtreecommitdiffstats
path: root/www/js/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/app.js')
-rw-r--r--www/js/app.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/www/js/app.js b/www/js/app.js
index caf7bed..20eceed 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -69,6 +69,22 @@ var tpl = {
localStorage.currentDraftID = null;
},
+ removeDraft: function(draftID, removePhoto) {
+ console.log( draftID );
+ var draft = FMS.allDrafts.get(draftID);
+ console.log( draft );
+ var uri = draft.get('file');
+ FMS.allDrafts.remove(draft);
+ draft.destroy();
+
+ if ( removePhoto && uri ) {
+ return FMS.files.deleteURI( uri );
+ }
+ var p = $.Deferred();
+ p.resolve();
+ return p;
+ },
+
initialize: function () {
if ( this.initialized == 1 ) {
return this;