Skip to content

Commit

Permalink
Update admin_panel.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Taccola A committed Sep 6, 2015
1 parent f8de888 commit 3ae328f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions assets/js/admin_panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,11 @@ function deleteEgg(egg_id){
function checkSpace(id, srv){
var element = document.getElementById(id);
if(element){
setInterval(function (el, srv) {
$.ajax({
url: _webroot_ + 'admin/statistic/space/' + srv,
success: function(result){
if(result.error){
el.innerHTML = result.error;
element.innerHTML = result.error;
}else{
var sizes = {
1: '',
Expand All @@ -129,11 +128,10 @@ function checkSpace(id, srv){
unity = size;
}
}
el.innerHTML = (result.empty_space/unity).toFixed(0) + sizes[unity] + "o";
element.innerHTML = (result.empty_space/unity).toFixed(0) + sizes[unity] + "o";
}
}
})
}, 15000, element, srv);
});
}
}

Expand Down

0 comments on commit 3ae328f

Please sign in to comment.