Created new shorcut to open groups quickly

This commit is contained in:
Pierre HUBERT 2018-07-16 15:13:17 +02:00
parent 500633862e
commit 2032017b0c
2 changed files with 15 additions and 1 deletions

View File

@ -54,6 +54,20 @@ function openUserPageFromID(user){
return openPage("user/" + user); return openPage("user/" + user);
} }
/**
* Open a group age
*
* @param {Object} info Information about the target group
*/
function openGroupPage(info){
if(info.virtual_directory != "null")
openPage(info.virtual_directory);
else
openPage("groups/" + info.id);
}
/** /**
* Check if user is signed in or not * Check if user is signed in or not
* *

View File

@ -92,7 +92,7 @@ ComunicWeb.pages.groups.pages.main = {
}); });
groupName.addEventListener("click", function(e){ groupName.addEventListener("click", function(e){
openPage("groups/" + group.id); openGroupPage(group);
}); });
//Offer the user to delete its membership //Offer the user to delete its membership