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 a4d238cb3..3a039693d 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 @@ -162,6 +162,11 @@ $(function() { if (validateMeId) { validateKey(validateMeId); } + + var browse = $.urlParam('browse'); + if (browse){ + displayBrowseGroupId(browse); + } }); startArchivaApplication = function(){ diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js index b0fcc066a..d27f338e4 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js @@ -57,9 +57,7 @@ $(function() { } - findParentGroupId=function(browseViewModel){ - return browseViewModel.groupId; - } + displayGroupDetail=function(groupId,parentBrowseViewModel,restUrl){ var mainContent = $("#main-content"); @@ -108,6 +106,23 @@ $(function() { }); } + /** + * called if browser url contains queryParam browse=groupId + * @param groupId + */ + displayBrowseGroupId=function(groupId){ + clearUserMessages(); + var mainContent = $("#main-content"); + mainContent.html($("#browse-tmpl" ).tmpl()); + mainContent.find("#browse_result").html(mediumSpinnerImg()); + var parentBrowseViewModel=new BrowseViewModel(null,null,null); + displayGroupDetail(groupId,parentBrowseViewModel,null) + } + + function BrowseResultEntry(a, b){ + + } + mapbrowseResultEntries=function(data){ if (data.browseResult && data.browseResult.browseResultEntries) { return $.isArray(data.browseResult.browseResultEntries) ? diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js index 6494ebce1..96638b4d1 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js @@ -287,23 +287,7 @@ $(function() { $("#users-view-tabs-li-user-edit").addClass("active"); } - /** - * not used as we don't have the mapping in web.xml - * but why to handle such urls which go directly to a view - */ - $(document).ready(function() { - // url ends with /users/list - // and current has archiva-manage-users karma - // so display users list - var pathContent = window.location.pathname.split("/"); - var usersIndex = $.inArray("users", pathContent); - if (usersIndex>=0 && pathContent[usersIndex+1]=="list") { - if ($.inArray("archiva-manage-users",window.redbackModel.operatioNames)>=0){ - displayUsersGrid(); - } - } - });