]> source.dussan.org Git - archiva.git/commitdiff
fix issue rendering error
authorOlivier Lamy <olamy@apache.org>
Thu, 11 Oct 2012 19:26:02 +0000 (19:26 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 11 Oct 2012 19:26:02 +0000 (19:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1397247 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js

index f6638c83a30c22f0cd4ab6f69121adaf24b42b64..24a0d152ebd0664bc4181f6cdfbfab2006712e31 100644 (file)
@@ -233,7 +233,7 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
               displaySuccessMessage( $.i18n.prop('artifact.deleted'));
             },
             error:function(data){
-              displayRestError(data,"user-messages");
+              displayRestError( data,"user-messages");
             },
             complete:function(){
               closeDialogConfirm();
index 6f62e1147bc802eafd93735cd5d4089f6028723a..8e17df8f8c1da872be6c4e5d8aea2c98974f4717 100644 (file)
@@ -287,6 +287,10 @@ require(["jquery","jquery.tmpl","i18n"], function(jquery,jqueryTmpl,i18n) {
    */
   displayRestError=function(data,idToAppend){
     $.log("displayRestError");
+    // maybe data is just the response so test if if we have a responseText and transform it to json
+    if(data.responseText){
+      data= $.parseJSON(data.responseText);
+    }
     if (data.redbackRestError){
       displayRedbackError(archivaRestError,idToAppend)
     }