From b4abdb66750005099d472e91bf747b23e190efec Mon Sep 17 00:00:00 2001 From: James Hillyerd Date: Wed, 28 Feb 2018 12:37:56 -0800 Subject: [PATCH] Change to trash glyph for delete mailbox --- themes/bootstrap/public/mailbox.js | 18 ++++++++---------- themes/bootstrap/templates/mailbox/index.html | 4 ++-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/themes/bootstrap/public/mailbox.js b/themes/bootstrap/public/mailbox.js index e807b1c..5a624c6 100644 --- a/themes/bootstrap/public/mailbox.js +++ b/themes/bootstrap/public/mailbox.js @@ -22,17 +22,15 @@ function deleteMessage(id) { }) } -// Delete the mailbox -function deleteMailBox() { - cont = confirm("Are you sure you want delete the Mailbox?") - if (cont == false) { - return; +// deleteMailbox clears the mailbox +function deleteMailbox() { + if (confirm("Are you sure you want delete this mailbox?")) { + $.ajax({ + type: 'DELETE', + url: '/api/v1/mailbox/' + mailbox, + success: loadList + }) } - $.ajax({ - type: 'DELETE', - url: '/api/v1/mailbox/' + mailbox, - success: loadList - }) } // flashTooltip temporarily changes the text of a tooltip diff --git a/themes/bootstrap/templates/mailbox/index.html b/themes/bootstrap/templates/mailbox/index.html index 8103bac..d9a570c 100644 --- a/themes/bootstrap/templates/mailbox/index.html +++ b/themes/bootstrap/templates/mailbox/index.html @@ -62,8 +62,8 @@ $(document).ready(function() { data-toggle="tooltip" data-placement="top" title="Delete Mailbox" - onclick="deleteMailBox()"> - + onclick="deleteMailbox()"> +