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:
parent
5a82e77738
commit
5803cbdc3f
@ -52,6 +52,9 @@ body {
|
|||||||
.pure-menu a {
|
.pure-menu a {
|
||||||
color: #777;
|
color: #777;
|
||||||
}
|
}
|
||||||
|
.deleting {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
#wrap {
|
#wrap {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50px;
|
top: 50px;
|
||||||
@ -460,7 +463,8 @@ body#pad textarea {
|
|||||||
|
|
||||||
$('.deletable').click(function(event) {
|
$('.deletable').click(function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var lineNum = $(this).attr('id')
|
var lineNum = $(this).attr('id');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/listitem" + '?' + $.param({
|
url: "/listitem" + '?' + $.param({
|
||||||
"lineNum": lineNum,
|
"lineNum": lineNum,
|
||||||
@ -471,6 +475,7 @@ body#pad textarea {
|
|||||||
window.location.reload(true);
|
window.location.reload(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
event.target.classList.add('deleting');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user