mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-03-22 13:30:05 +01:00
Changes download button style while zipping.
This commit is contained in:
parent
f1175f5149
commit
7c1feaebc0
src/_h5ai
@ -88,9 +88,6 @@ body > nav {
|
||||
.nav-right;
|
||||
.transition(all 0.2s ease-in-out);
|
||||
|
||||
&.zipping {
|
||||
|
||||
}
|
||||
&.failed {
|
||||
background-color: rgba(255,0,0,0.5);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
left: 0;
|
||||
top: 31px;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
z-index: 3;
|
||||
overflow: auto;
|
||||
font-size: 0.85em;
|
||||
padding: 8px;
|
||||
|
@ -97,7 +97,7 @@
|
||||
.find("img").attr("src", H5AI.core.image("download")).end()
|
||||
.find("a").click(function () {
|
||||
|
||||
$('#download').addClass('zipping');
|
||||
$('#download').addClass('current');
|
||||
$('#download img').attr('src', H5AI.core.image("loading.gif", true));
|
||||
$.ajax({
|
||||
url: H5AI.core.api(),
|
||||
@ -109,8 +109,8 @@
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
|
||||
$('#download').removeClass('current');
|
||||
$('#download img').attr('src', H5AI.core.image("download"));
|
||||
$('#download').removeClass('zipping');
|
||||
if (response.status === 'ok') {
|
||||
window.location = H5AI.core.api() + '?action=getzip&id=' + response.id;
|
||||
} else {
|
||||
@ -121,8 +121,8 @@
|
||||
}
|
||||
},
|
||||
failed: function () {
|
||||
$('#download').removeClass('current');
|
||||
$('#download img').attr('src', H5AI.core.image("download"));
|
||||
$('#download').removeClass('zipping');
|
||||
}
|
||||
});
|
||||
}).end()
|
||||
|
Loading…
x
Reference in New Issue
Block a user