error is deprecated, use fail instead of

This commit is contained in:
Michael RICOIS 2013-02-20 14:18:25 +00:00
parent ac46cf4d53
commit f5513b3dea
5 changed files with 6 additions and 9 deletions

View File

@ -197,7 +197,7 @@ span.poste input { width:50px; }
$('input#'+step).css('display', 'inline');
}
}, 'json'
).error(function(){
).fail(function(){
$('div#saveMsg').html('Error Timeout');
$('input#'+step).css('display', 'block');
});

View File

@ -262,7 +262,7 @@ $('#dialog').dialog({ buttons: [
var form = $('form[name=lien]');
$.post(form.attr('action'), form.serialize(), function(data){
$('form[name=lien]').replaceWith(data);
}).error(function(){ alert('Unknow error'); });
}).fail(function(){ alert('Unknow error'); });
} else {
alert("Quelque chose manque !");
}

View File

@ -87,7 +87,7 @@ $('input.autocomplete').autocomplete({
var form = $('form[name=lienchange]');
$.post(form.attr('action'), form.serialize(), function(data){
$('form[name=lienchange]').replaceWith(data);
}).error(function(){ alert('Unknow error'); });
}).fail(function(){ alert('Unknow error'); });
}
}}, {
text: "Annuler", click: function() { $(this).dialog('close'); } }

View File

@ -22,7 +22,7 @@
var form = $('form[name=saveLienRef]');
$.post(form.attr('action'), form.serialize(), function(data){
form.replaceWith(data);
}).error(function(){ alert('Unknow error'); });
}).fail(function(){ alert('Unknow error'); });
} },
{ text: "Annuler", click: function() { $(this).dialog("close"); } }
] });
@ -121,7 +121,7 @@ $('form[name=saveLienRef]').submit(function(e){
} else {
$('div#searchFiche').replaceWith(data.error);
}
}, 'json').error(function(){ alert('Unknow error'); });
}, 'json').fail(function(){ alert('Unknow error'); });
return false;
});

View File

@ -103,12 +103,9 @@ $(document).ready(function(){
data = '<br/>Le chargement du fichier a échoué';
}
objet.replaceWith(data);
}).error(function(){
}).fail(function(){
objet.replaceWith('Unknown error');
});
}
});
});