load disponibilites synchronously in order to preserve their order

This commit is contained in:
Serghei Mihai 2014-03-27 13:00:59 +01:00
parent 88d84c735d
commit ab7f3dc996
1 changed files with 2 additions and 0 deletions

View File

@ -305,6 +305,7 @@ function toggle_ressource(ressource) {
if ($(tab_selector).length) {
/* load disponibility column */
$.ajaxSetup({async:false});
$.get(url + 'disponibility/' + ressource_id,
function(data) {
if ($(tab_selector).hasClass('active')) {
@ -313,6 +314,7 @@ function toggle_ressource(ressource) {
}
}
);
$.ajaxSetup({async:true});
} else {
// remove hidden ressource availability
$('ul#availability li.' + ressource_id).remove();