mirror of
https://github.com/dani/vroom.git
synced 2024-06-26 17:43:29 +02:00
Last HTTP codes handling on client side
This commit is contained in:
parent
ff1cda4d4b
commit
8f3243a075
|
@ -472,19 +472,20 @@ function initAdmin(){
|
|||
param: {}
|
||||
})
|
||||
},
|
||||
error: function() {
|
||||
$.notify(locale.ERROR_OCCURRED, 'error');
|
||||
},
|
||||
success: function(data){
|
||||
if (data.status === 'success'){
|
||||
roomList = data.rooms;
|
||||
matches = Object.keys(roomList).length;
|
||||
updateRoomList($('#searchRoom').val(), 0, itemPerPage);
|
||||
updatePagination();
|
||||
error: function(data){
|
||||
data = responseJSON;
|
||||
if (data.msg){
|
||||
$.notify(data.msg, 'error');
|
||||
}
|
||||
else{
|
||||
$.notify(locale.ERROR_OCCURED, 'error');
|
||||
$.notify(locale.ERROR_OCCURRED, 'error');
|
||||
}
|
||||
},
|
||||
success: function(data){
|
||||
roomList = data.rooms;
|
||||
matches = Object.keys(roomList).length;
|
||||
updateRoomList($('#searchRoom').val(), 0, itemPerPage);
|
||||
updatePagination();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1554,15 +1555,18 @@ function initVroom(room) {
|
|||
})
|
||||
},
|
||||
error: function(data) {
|
||||
$.notify(locale.ERROR_OCCURRED, 'error');
|
||||
data = data.responseJSON;
|
||||
if (data.msg){
|
||||
$.notify(data.msg, 'error');
|
||||
}
|
||||
else{
|
||||
$.notify(locale.ERROR_OCCURRED, 'error');
|
||||
}
|
||||
},
|
||||
success: function(data) {
|
||||
if (data.status == 'success' && data.msg){
|
||||
if (data.msg){
|
||||
$.notify(data.msg, 'success');
|
||||
}
|
||||
else if (data.msg){
|
||||
$.notify(data.msg, 'error');
|
||||
}
|
||||
}
|
||||
});
|
||||
checkMoh();
|
||||
|
@ -2090,10 +2094,16 @@ function initVroom(room) {
|
|||
})
|
||||
},
|
||||
error: function(data) {
|
||||
$.notify(locale.ERROR_OCCURRED, 'error');
|
||||
data = data.responseJSON;
|
||||
if (data.msg){
|
||||
$.notify(data.msg, 'error');
|
||||
}
|
||||
else{
|
||||
$.notify(locale.ERROR_OCCURRED, 'error');
|
||||
}
|
||||
},
|
||||
success: function(data) {
|
||||
if (data.status === 'success' && data.msg && data.msg != ''){
|
||||
if (data.msg && data.msg != ''){
|
||||
$.notify(data.msg, {
|
||||
className: 'info',
|
||||
autoHide: false
|
||||
|
|
Loading…
Reference in New Issue
Block a user