From: Olivier Lamy Date: Thu, 3 Jan 2013 00:03:43 +0000 (+0000) Subject: [MRM-1737] Improve welcome page X-Git-Tag: archiva-1.4-M4~323 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2d4c2447271b977e7e61bd26d42e907c725f664f;p=archiva.git [MRM-1737] Improve welcome page git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1428116 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/images/archiva.png b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/images/archiva.png new file mode 100644 index 000000000..6965e6302 Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/images/archiva.png differ diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js index 30c0c25b9..c0b65ba03 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js @@ -97,7 +97,7 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa url: 'restServices/redbackServices/loginService/logout', complete: function(){ // go to welcome on logout - window.sammyArchivaApplication.setLocation("#search"); + window.sammyArchivaApplication.setLocation("#welcome"); } }); @@ -688,8 +688,7 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa }); this.get('#welcome', function () { - $.log("#welcome hash"); - checkCreateAdminLink(function(){window.sammyArchivaApplication.setLocation("#search")}); + displayWelcome(); }); @@ -740,6 +739,15 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa }); }; + displayWelcome=function(){ + $.log("#welcome hash"); + checkCreateAdminLink(function(){ + //window.sammyArchivaApplication.setLocation("#search") + $("#main-content" ).html($("#welcome" ).tmpl({runtimeInfo: window.archivaRuntimeInfo})); + drawQuickSearchAutocomplete("#quick-search-autocomplete-welcome"); + }); + } + userLoggedCallbackFn=function(user){ $.log("userLoggedCallbackFn:"+ (user?user.username():null)); var loginLink=$("#login-link"); @@ -840,9 +848,9 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa }; - drawQuickSearchAutocomplete=function(){ + drawQuickSearchAutocomplete=function(selector){ - $( "#quick-search-autocomplete" ).autocomplete({ + $( selector ? selector : "#quick-search-autocomplete" ).autocomplete({ minLength: 3, delay: 600, source: function(request, response){ diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/generics.html b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/generics.html index 9fd3989c8..ff5fda323 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/generics.html +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/generics.html @@ -65,3 +65,29 @@ + +