]> source.dussan.org Git - archiva.git/commitdiff
add redback rest api documentation
authorOlivier Lamy <olamy@apache.org>
Fri, 5 Oct 2012 20:51:43 +0000 (20:51 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 5 Oct 2012 20:51:43 +0000 (20:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1394804 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/docs.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/docs.html
pom.xml

index 4dcd8e8a297c5826f9de4f6bfb9f36d68e2560b0..4ee4c0052204acc3b8d32fdfdced99d90fbda70f 100644 (file)
@@ -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");
index 712f6ce7df0f1cb24a2c91c233ee6bfa9c86de35..c6caa52ee363ee4c9c52f2ccde6493db5b4e7c53 100644 (file)
@@ -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);
+        });
+
       });
   };
 
index b03cb0b30591bec57a35f432cd91d7c2b116884c..13a7fd856258303bbc97a7b5297b93153d1d2c61 100644 (file)
@@ -26,6 +26,7 @@
         <ul>
           <li><a onclick="displayArchivaRestDocs();">Archiva Rest Api Docs</a></li>
           <li><a onclick="displayArchivaRestUIDocs();">Archiva Rest Api UI Docs</a></li>
+          <li><a onclick="displayRedbackRestDocs();">Redback Rest Api UI Docs</a></li>
         </ul>
       </div>
     </div>
diff --git a/pom.xml b/pom.xml
index f55d7e0bdcc20df44749e6adf50dcff9e72df22a..9a978d447e4932ad532e9e65fb0d69f2547ddff4 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -68,7 +68,7 @@
     <maven-model-converter.version>2.1</maven-model-converter.version>
     <maven.indexer.version>5.0.0</maven.indexer.version>
     <wagon.version>2.2</wagon.version>
-    <redback.version>2.0</redback.version>
+    <redback.version>2.1-SNAPSHOT</redback.version>
     <redback.cache.version>2.0</redback.cache.version>
     <redback.quartz.version>2.0</redback.quartz.version>
     <redback.registry.version>2.0</redback.registry.version>