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() { error: function(data) {
$.notify(locale.ERROR_OCCURRED, 'error'); data = data.responseJSON;
}, if (data.msg){
success: function(data){ $.notify(data.msg);
if (data.status === 'success'){
window.location.reload();
} }
else{ else{
$.notify(locale.ERROR_OCCURED, 'error'); $.notify(locale.ERROR_OCCURRED, 'error');
} }
},
success: function(data){
window.location.reload();
} }
}); });
}); });

Loading…
Cancel
Save