1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 18:17:03 +00:00

Button to delete the mailbox from the UI (#65), closes #55

This commit is contained in:
Carlos Tadeu Panato Junior
2017-12-18 05:36:14 +01:00
committed by James Hillyerd
parent 4e8c287608
commit 8040b07c28
2 changed files with 21 additions and 0 deletions

View File

@@ -22,6 +22,19 @@ function deleteMessage(id) {
})
}
// Delete the mailbox
function deleteMailBox() {
cont = confirm("Are you sure you want delete the Mailbox?")
if (cont == false) {
return;
}
$.ajax({
type: 'DELETE',
url: '/api/v1/mailbox/' + mailbox,
success: loadList
})
}
// flashTooltip temporarily changes the text of a tooltip
function flashTooltip(el, text) {
var prevText = $(el).attr('data-original-title');