From: Olivier Lamy Date: Sat, 18 Feb 2012 00:18:07 +0000 (+0000) Subject: repository browse accessible directly via queryparam: http://localhost:9091/archiva... X-Git-Tag: archiva-1.4-M3~1251 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7ae0da9bae1ecf2ea9b4067f90a14e96510361e7;p=archiva.git repository browse accessible directly via queryparam: http://localhost:9091/archiva/index.html?request_lang=en&browse=org.apache.maven git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1245815 13f79535-47bb-0310-9956-ffa450edef68 --- 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(); - } - } - });