]> source.dussan.org Git - archiva.git/commitdiff
fix ui due to data structure change
authorOlivier Lamy <olamy@apache.org>
Wed, 23 May 2012 16:26:47 +0000 (16:26 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 23 May 2012 16:26:47 +0000 (16:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1341939 13f79535-47bb-0310-9956-ffa450edef68

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

index 6c34a8ff32d6a25efcded681bc342f011571710f..6ac851f75331dd4cb3fd426fb4fc1ba4ed8de963 100644 (file)
@@ -293,9 +293,8 @@ define("search",["jquery","i18n","jquery.tmpl","choosen","order!knockout","knock
                         mainContent.find("#artifact-content-text" ).html(smallSpinnerImg());
                         $.ajax({
                           url: pomContentUrl,
-                          dataType: "text",
                           success: function(data) {
-                            var text = data.replace(/</g,'&lt;');
+                            var text = data.content.replace(/</g,'&lt;');
                             text=text.replace(/>/g,"&gt;");
                             mainContent.find("#artifact-content-text" ).html(text);
                             prettyPrint();
@@ -327,9 +326,8 @@ define("search",["jquery","i18n","jquery.tmpl","choosen","order!knockout","knock
                           fileContentUrl+="&p="+encodeURIComponent(file.substringBeforeLast("/"));
                           $.ajax({
                            url: fileContentUrl,
-                           dataType: "text",
                            success: function(data) {
-                             var text = data.replace(/</g,'&lt;');
+                             var text = data.content.replace(/</g,'&lt;');
                              text=text.replace(/>/g,"&gt;");
                              mainContent.find("#artifact-content-text" ).html(smallSpinnerImg());
                              mainContent.find("#artifact-content-text" ).html(text);