git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1245815 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-02-18 00:18:07 +00:00
parent a798625071
commit 7ae0da9bae
3 changed files with 23 additions and 19 deletions

View File

@ -162,6 +162,11 @@ $(function() {
if (validateMeId) {
validateKey(validateMeId);
}
var browse = $.urlParam('browse');
if (browse){
displayBrowseGroupId(browse);
}
});
startArchivaApplication = function(){

View File

@ -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) ?

View File

@ -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();
}
}
});