HTTP codes for switch_lang

master
Daniel Berteaud 10 years ago
parent 2ebe33060b
commit d50c3b385a
  1. 13
      public/js/vroom.js

@ -52,17 +52,18 @@ $('#switch_lang').change(function(){
}
})
},
error: function() {
error: function(data) {
data = data.responseJSON;
if (data.msg){
$.notify(data.msg);
}
else{
$.notify(locale.ERROR_OCCURRED, 'error');
}
},
success: function(data){
if (data.status === 'success'){
window.location.reload();
}
else{
$.notify(locale.ERROR_OCCURED, 'error');
}
}
});
});

Loading…
Cancel
Save