mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-07-13 14:38:09 +00:00
Send a request to the server to create the group
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
|
||||
ComunicWeb.pages.groups.main = {
|
||||
|
||||
/**
|
||||
/**
|
||||
* Open settings page
|
||||
*
|
||||
* @param {object} args Optionnal arguments
|
||||
@ -14,29 +14,34 @@ ComunicWeb.pages.groups.main = {
|
||||
*/
|
||||
open: function(args, target){
|
||||
|
||||
//Determine which page / group should be opened
|
||||
if(!args.subfolder)
|
||||
var page = "main";
|
||||
|
||||
else {
|
||||
//Determine which page / group should be opened
|
||||
if(!args.subfolder)
|
||||
var page = "main";
|
||||
|
||||
else {
|
||||
|
||||
//Extract the name of the page from the URL
|
||||
if(!args.subfolder.includes("/"))
|
||||
var page = args.subfolder;
|
||||
else {
|
||||
var page = args.subfolder.split("/")[0];
|
||||
}
|
||||
//Extract the name of the page from the URL
|
||||
if(!args.subfolder.includes("/"))
|
||||
var page = args.subfolder;
|
||||
else {
|
||||
var page = args.subfolder.split("/")[0];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//Check if the main page has to be opened
|
||||
if(page == "main"){
|
||||
ComunicWeb.pages.groups.pages.main.open(target);
|
||||
}
|
||||
//Check if the main page has to be opened
|
||||
if(page == "main" && signed_in()){
|
||||
ComunicWeb.pages.groups.pages.main.open(target);
|
||||
}
|
||||
|
||||
//Else the page was not found
|
||||
else
|
||||
ComunicWeb.common.error.pageNotFound(args, target);
|
||||
}
|
||||
|
||||
//Check if the page to create a group has to be opened
|
||||
else if (page == "create" && signed_in()){
|
||||
ComunicWeb.pages.groups.pages.create.open(target);
|
||||
}
|
||||
|
||||
//Else the page was not found
|
||||
else
|
||||
ComunicWeb.common.error.pageNotFound(args, target);
|
||||
}
|
||||
|
||||
};
|
Reference in New Issue
Block a user