From a9cbc650097e45385045101ba4475551c6c72b7e Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 21 May 2012 22:07:12 +0000 Subject: [PATCH] [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 --- .../archiva-webapp-js/src/main/webapp/index.html | 2 ++ .../archiva-webapp-js/src/main/webapp/js/archiva/search.js | 7 ++++--- .../src/main/webapp/js/templates/archiva/search.html | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) 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 -- 2.39.5