1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Fade-out items while waiting for a delete to go through

This commit is contained in:
Daniel Heath 2018-01-03 22:47:13 +11:00
parent 5a82e77738
commit 5803cbdc3f

View File

@ -52,6 +52,9 @@ body {
.pure-menu a {
color: #777;
}
.deleting {
opacity: 0.5;
}
#wrap {
position: absolute;
top: 50px;
@ -460,17 +463,19 @@ body#pad textarea {
$('.deletable').click(function(event) {
event.preventDefault();
var lineNum = $(this).attr('id')
$.ajax({
url: "/listitem" + '?' + $.param({
"lineNum": lineNum,
"page": "{{ .Page }}"
}),
type: 'DELETE',
success: function() {
window.location.reload(true);
}
});
var lineNum = $(this).attr('id');
$.ajax({
url: "/listitem" + '?' + $.param({
"lineNum": lineNum,
"page": "{{ .Page }}"
}),
type: 'DELETE',
success: function() {
window.location.reload(true);
}
});
event.target.classList.add('deleting');
});