From 9d87ffeb9a991c336e131fe908ee0c1cb03bc797 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 1 Mar 2012 21:29:24 +0000 Subject: [PATCH] cleanup handling of special query params really execute at the end of application loading git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1295910 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/archiva/main.js | 49 +++++++++++++------ 1 file changed, 33 insertions(+), 16 deletions(-) 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 4e3fe76d7..869bceaeb 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 @@ -63,6 +63,34 @@ $(function() { }); } + // handle url with registration link + var checkUrlParams=function() { + var validateMeId = $.urlParam('validateMe'); + if (validateMeId) { + validateKey(validateMeId); + return; + } + + var browse = $.urlParam('browse'); + if (browse){ + displayBrowseGroupId(browse); + return; + } + + var screen = $.urlParam('screen'); + $.log("screen:"+screen+',operations:'+window.redbackModel.operatioNames); + if(screen){ + + if(screen='proxy-connectors'&& $.inArray('archiva-manage-configuration',window.redbackModel.operatioNames)>=0){ + displayProxyConnectors(); + return; + } + } + + // by default display search screen + displaySearch(); + } + decorateMenuWithKarma=function(user) { var username = user.username; // we can receive an observable user so take if it's a function or not @@ -86,6 +114,7 @@ $(function() { $("#sidebar-content [redback-permissions]").each(function(element){ checkElementKarma(this); }); + checkUrlParams(); } }); } @@ -156,6 +185,8 @@ $(function() { }); } + + startArchivaApplication = function(){ $.log("startArchivaApplication"); $('#topbar-menu-container').html($("#topbar-menu")); @@ -193,28 +224,14 @@ $(function() { } }); + } + - } startArchivaApplication(); - // handle url with registration link - $(document).ready(function() { - var validateMeId = $.urlParam('validateMe'); - if (validateMeId) { - validateKey(validateMeId); - return; - } - var browse = $.urlParam('browse'); - if (browse){ - displayBrowseGroupId(browse); - return; - } - // by default display search screen - displaySearch(); - }); }) }); -- 2.39.5