HTTP codes for switch_lang

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

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

Loading…
Cancel
Save