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 bde8281ed..e5647cc0c 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 @@ -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() { diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/topbar.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/topbar.html index b9af0133d..a0701f32d 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/topbar.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/topbar.html @@ -40,7 +40,7 @@