From a522cc3f0c41fccce3fa976d30d4f58aed60ca42 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 5 Oct 2012 20:51:43 +0000 Subject: [PATCH] add redback rest api documentation git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1394804 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/archiva/docs.js | 16 ++++++++++++++++ .../src/main/webapp/js/archiva/main.js | 6 ++++++ .../main/webapp/js/templates/archiva/docs.html | 1 + pom.xml | 2 +- 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/docs.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/docs.js index 4dcd8e8a2..4ee4c0052 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/docs.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/docs.js @@ -52,6 +52,22 @@ define("archiva.docs",["jquery","i18n","jquery.tmpl","bootstrap"], function() { }); } + goToRedbackRestDoc=function(target){ + $("#main-content" ).html(mediumSpinnerImg()); + $.ajax({ + url:"rest-docs/rest-docs-redback-rest-api/"+target, + type:"get", + dataType: "html", + success: function(data){ + $("#main-content" ).html($("#rest_docs").tmpl()); + $("#main-content" ).find("#rest_docs_content" ).html(data); + prettyPrint(); + } + }); + } + displayRedbackRestDocs=function(){ + window.sammyArchivaApplication.setLocation("#rest-docs-redback-rest-api/index.html"); + } displayArchivaRestUIDocs=function(){ window.sammyArchivaApplication.setLocation("#rest-docs-archiva-ui/index.html"); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js index 712f6ce7d..c6caa52ee 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js @@ -643,6 +643,12 @@ function(jquery,ui,sammy,tmpl) { goToArchivaRestUiDoc(target); }); + this.get("#rest-docs-redback-rest-api/:target",function(){ + var target=this.params.target; + $.log("redback-rest-docs, target:"+target); + goToRedbackRestDoc(target); + }); + }); }; diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/docs.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/docs.html index b03cb0b30..13a7fd856 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/docs.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/docs.html @@ -26,6 +26,7 @@ diff --git a/pom.xml b/pom.xml index f55d7e0bd..9a978d447 100644 --- a/pom.xml +++ b/pom.xml @@ -68,7 +68,7 @@ 2.1 5.0.0 2.2 - 2.0 + 2.1-SNAPSHOT 2.0 2.0 2.0 -- 2.39.5