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