diff options
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/views/reports.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/www/js/views/reports.js b/www/js/views/reports.js index 5241319..f5c1cbb 100644 --- a/www/js/views/reports.js +++ b/www/js/views/reports.js @@ -16,8 +16,9 @@ }, deleteReport: function(e) { + e.preventDefault(); var el = $(e.target); - var id = el.parent('li').attr('id'); + var id = el.parents('li').attr('id'); var del = FMS.removeDraft( id, true ); var that = this; del.done( function() { that.onRemoveDraft(el); } ); @@ -25,14 +26,15 @@ }, useReport: function(e) { + e.preventDefault(); var el = $(e.target); - var id = el.parent('li').attr('id'); + var id = el.parents('li').attr('id'); FMS.currentDraft = FMS.allDrafts.get(id); this.navigate('around'); }, onRemoveDraft: function(el) { - el.parent('li').remove(); + el.parents('li').remove(); }, render: function(){ |