diff --git a/js/crayons.js b/js/crayons.js index 5e72cd7..1558e8d 100644 --- a/js/crayons.js +++ b/js/crayons.js @@ -261,18 +261,12 @@ $.fn.activatecrayon = function(percent) { "error": function(d) { uniAlert('erreur de communication'); crayon - .empty() - .append( - $('
') - .html(d.responseText || d.error || 'erreur inconnue') - ) - .css({ - background: 'white', - color: 'black', - width: '480px', - border: 'red solid 2px', - padding: '10px'} - ); + .restorecrayon(true) + .prepend( + $('
') + .html(d.responseText || d.statusText || 'erreur inconnue') + ) + ; }, "success": function(d) { // parfois le JSON n'est pas renvoye sous forme d'objet