do not display login and register links when creating admin is needed

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1234698 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-01-23 08:33:54 +00:00
parent d2c74bfc8e
commit 504251d440
2 changed files with 17 additions and 19 deletions

View File

@ -115,23 +115,6 @@ $(function() {
}
checkCreateAdminLink=function(){
$.ajax("restServices/redbackServices/userService/isAdminUserExists", {
type: "GET",
dataType: 'json',
success: function(data) {
var adminExists = JSON.parse(data);
if (adminExists == false) {
$("#create-admin-link").show();
} else {
$("#create-admin-link").hide();
}
}
});
}
checkSecurityLinks=function(){
var user = userLogged();
$.log("checkSecurityLinks, user:"+user);
@ -149,7 +132,22 @@ $(function() {
}
}
checkCreateAdminLink=function(){
$.ajax("restServices/redbackServices/userService/isAdminUserExists", {
type: "GET",
dataType: 'json',
success: function(data) {
var adminExists = JSON.parse(data);
if (adminExists == false) {
$("#create-admin-link").show();
$("#login-link").hide();
$("#register-link").hide();
} else {
$("#create-admin-link").hide();
}
}
});
}
// handle url with registration link
$(document).ready(function() {

View File

@ -40,7 +40,7 @@
</a>
</li>
<li id="register-link" style="display: none">
<a href="#" onclick="registerBox();">
<a href="#" onclick="registerBox();" id="register-link-a">
<span class="label notice">${register}</span>
</a>
</li>