1
0
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:
Lars Jung 2012-02-23 12:38:11 +01:00
parent f1175f5149
commit 7c1feaebc0
3 changed files with 4 additions and 7 deletions

@ -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()