mirror of https://github.com/apache/archiva.git
reuse jquery selectors
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1395091 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e3a794ca9f
commit
e771739ee8
|
@ -25,42 +25,45 @@ define("archiva.docs",["jquery","i18n","jquery.tmpl","bootstrap"], function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
goToArchivaRestDoc=function(target){
|
goToArchivaRestDoc=function(target){
|
||||||
$("#main-content" ).find("#rest_docs_content" ).html(mediumSpinnerImg());
|
var mainContent = $("#main-content");
|
||||||
|
mainContent.find("#rest_docs_content" ).html(mediumSpinnerImg());
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"rest-docs/rest-docs-archiva-rest-api/"+target,
|
url:"rest-docs/rest-docs-archiva-rest-api/"+target,
|
||||||
type:"get",
|
type:"get",
|
||||||
dataType: "html",
|
dataType: "html",
|
||||||
success: function(data){
|
success: function(data){
|
||||||
$("#main-content" ).html($("#rest_docs").tmpl());
|
mainContent.html($("#rest_docs").tmpl());
|
||||||
$("#main-content" ).find("#rest_docs_content" ).html(data);
|
mainContent.find("#rest_docs_content" ).html(data);
|
||||||
prettyPrint();
|
prettyPrint();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
goToArchivaRestUiDoc=function(target){
|
goToArchivaRestUiDoc=function(target){
|
||||||
$("#main-content" ).find("#rest_docs_content" ).html(mediumSpinnerImg());
|
var mainContent = $("#main-content");
|
||||||
|
mainContent.find("#rest_docs_content" ).html(mediumSpinnerImg());
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"rest-docs/rest-docs-archiva-ui/"+target,
|
url:"rest-docs/rest-docs-archiva-ui/"+target,
|
||||||
type:"get",
|
type:"get",
|
||||||
dataType: "html",
|
dataType: "html",
|
||||||
success: function(data){
|
success: function(data){
|
||||||
$("#main-content" ).html($("#rest_docs").tmpl());
|
mainContent.html($("#rest_docs").tmpl());
|
||||||
$("#main-content" ).find("#rest_docs_content" ).html(data);
|
mainContent.find("#rest_docs_content" ).html(data);
|
||||||
prettyPrint();
|
prettyPrint();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
goToRedbackRestDoc=function(target){
|
goToRedbackRestDoc=function(target){
|
||||||
$("#main-content" ).find("#rest_docs_content" ).html(mediumSpinnerImg());
|
var mainContent = $("#main-content");
|
||||||
|
mainContent.find("#rest_docs_content" ).html(mediumSpinnerImg());
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"rest-docs/rest-docs-redback-rest-api/"+target,
|
url:"rest-docs/rest-docs-redback-rest-api/"+target,
|
||||||
type:"get",
|
type:"get",
|
||||||
dataType: "html",
|
dataType: "html",
|
||||||
success: function(data){
|
success: function(data){
|
||||||
$("#main-content" ).html($("#rest_docs").tmpl());
|
mainContent.html($("#rest_docs").tmpl());
|
||||||
$("#main-content" ).find("#rest_docs_content" ).html(data);
|
mainContent.find("#rest_docs_content" ).html(data);
|
||||||
prettyPrint();
|
prettyPrint();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue