mirror of https://github.com/velour/catbase.git
meme: add confirm to deletion button
This commit is contained in:
parent
33372ed770
commit
ba47710b46
|
@ -200,6 +200,7 @@ var memeIndex = `
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
}
|
}
|
||||||
|
if (confirm("Are you sure you want to delete this meme?")) {
|
||||||
axios.delete('/meme/rm', { data: this.editConfig })
|
axios.delete('/meme/rm', { data: this.editConfig })
|
||||||
.then(resp => {
|
.then(resp => {
|
||||||
this.editConfig = null;
|
this.editConfig = null;
|
||||||
|
@ -208,6 +209,7 @@ var memeIndex = `
|
||||||
.catch(err => this.err = err);
|
.catch(err => this.err = err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue