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