From: Olivier Lamy Date: Mon, 21 May 2012 22:07:12 +0000 (+0000) Subject: [MRM-1620] add a tab to browse artifact content in artifact detail view. Prettyprint... X-Git-Tag: archiva-1.4-M3~699 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a9cbc650097e45385045101ba4475551c6c72b7e;p=archiva.git [MRM-1620] add a tab to browse artifact content in artifact detail view. Prettyprint source content git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1341225 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html index 4626fb1a1..0b437d720 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html @@ -1,6 +1,7 @@ + @@ -102,6 +103,7 @@ "jquery.fileupload.ip":"jquery.fileupload-ip-1.0.6", "jquery.fileupload.ui":"jquery.fileupload-ui-6.6.3", "tmpl": "tmpl.min", + "prettify": "prettify", "jqueryFileTree": "jqueryFileTree-1.0.1", "redback": "redback/redback", "redback.roles": "redback/roles", diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js index c2c3ec4d2..23273fbe4 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js @@ -16,9 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -define("search",["jquery","i18n","jquery.tmpl","choosen","order!knockout","knockout.simpleGrid","jqueryFileTree"], function() { - - +define("search",["jquery","i18n","jquery.tmpl","choosen","order!knockout","knockout.simpleGrid","jqueryFileTree","prettify"] +, function() { //----------------------------------------- // browse part @@ -299,6 +298,7 @@ define("search",["jquery","i18n","jquery.tmpl","choosen","order!knockout","knock var text = data.replace(//g,">"); mainContent.find("#artifact-content-text" ).html(text); + prettyPrint(); goToAnchor("artifact-content-text-header"); } }); @@ -335,6 +335,7 @@ define("search",["jquery","i18n","jquery.tmpl","choosen","order!knockout","knock text=text.replace(/>/g,">"); mainContent.find("#artifact-content-text" ).html(smallSpinnerImg()); mainContent.find("#artifact-content-text" ).html(text); + prettyPrint(); goToAnchor("artifact-content-text-header"); } }); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/search.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/search.html index a44be1ca8..1d540a039 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/search.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/search.html @@ -824,7 +824,7 @@

Content

-
-
+
+

       
\ No newline at end of file