archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1397247 - in /archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva: search.js utils.js
Date Thu, 11 Oct 2012 19:26:02 GMT
Author: olamy
Date: Thu Oct 11 19:26:02 2012
New Revision: 1397247

URL: http://svn.apache.org/viewvc?rev=1397247&view=rev
Log:
fix issue rendering error

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

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js?rev=1397247&r1=1397246&r2=1397247&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
Thu Oct 11 19:26:02 2012
@@ -233,7 +233,7 @@ define("archiva.search",["jquery","i18n"
               displaySuccessMessage( $.i18n.prop('artifact.deleted'));
             },
             error:function(data){
-              displayRestError(data,"user-messages");
+              displayRestError( data,"user-messages");
             },
             complete:function(){
               closeDialogConfirm();

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js?rev=1397247&r1=1397246&r2=1397247&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js
Thu Oct 11 19:26:02 2012
@@ -287,6 +287,10 @@ require(["jquery","jquery.tmpl","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)
     }



Mime
View raw message