mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Display bottom links on main menu.
This commit is contained in:
parent
dc7fd44b67
commit
f76d9ba9cd
@ -8,13 +8,15 @@ ComunicWeb.components.bottom.links = [
|
|||||||
|
|
||||||
//Language selector
|
//Language selector
|
||||||
{
|
{
|
||||||
innerHTML: "<i class='fa fa-globe'></i> Language",
|
innerLang: "bottom_bar_action_language",
|
||||||
|
icon: "fa-globe",
|
||||||
onclick: function(){ComunicWeb.components.langPicker.show();}
|
onclick: function(){ComunicWeb.components.langPicker.show();}
|
||||||
},
|
},
|
||||||
|
|
||||||
//About Comunic
|
//About Comunic
|
||||||
{
|
{
|
||||||
innerHTML: "<i class='fa fa-question-circle'></i> About",
|
innerLang: "bottom_bar_action_about",
|
||||||
|
icon: "fa-question-circle",
|
||||||
href: ComunicWeb.__config.aboutWebsiteURL,
|
href: ComunicWeb.__config.aboutWebsiteURL,
|
||||||
target: "_blank"
|
target: "_blank"
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,9 @@ ComunicWeb.components.bottom.main = {
|
|||||||
appendTo: leftElements,
|
appendTo: leftElements,
|
||||||
type: "a",
|
type: "a",
|
||||||
href: link.href,
|
href: link.href,
|
||||||
innerHTML: link.innerHTML
|
innerHTML: link.innerHTML,
|
||||||
|
innerLang: link.innerLang,
|
||||||
|
innerHTMLprefix: "<i class='fa "+link.icon+"'></i> "
|
||||||
});
|
});
|
||||||
|
|
||||||
if(link.target)
|
if(link.target)
|
||||||
|
@ -14,13 +14,15 @@ ComunicWeb.components.menuBar.authenticated = {
|
|||||||
//Conversations
|
//Conversations
|
||||||
{
|
{
|
||||||
innerLang: "menu_bar_action_conversations",
|
innerLang: "menu_bar_action_conversations",
|
||||||
targetPage: "conversations"
|
targetPage: "conversations",
|
||||||
|
icon: "fa-comments-o"
|
||||||
},
|
},
|
||||||
|
|
||||||
//Groups list
|
//Groups list
|
||||||
{
|
{
|
||||||
innerLang: "menu_bar_action_groups",
|
innerLang: "menu_bar_action_groups",
|
||||||
targetPage: "groups",
|
targetPage: "groups",
|
||||||
|
icon: "fa-group"
|
||||||
},
|
},
|
||||||
|
|
||||||
//Dark theme
|
//Dark theme
|
||||||
@ -34,13 +36,15 @@ ComunicWeb.components.menuBar.authenticated = {
|
|||||||
//Settings list
|
//Settings list
|
||||||
{
|
{
|
||||||
innerLang: "menu_bar_action_settings",
|
innerLang: "menu_bar_action_settings",
|
||||||
targetPage: "settings"
|
targetPage: "settings",
|
||||||
|
icon: "fa-gear"
|
||||||
},
|
},
|
||||||
|
|
||||||
//Logout link
|
//Logout link
|
||||||
{
|
{
|
||||||
innerLang: "_menu_bar_action_logout",
|
innerLang: "_menu_bar_action_logout",
|
||||||
targetPage: "logout"
|
targetPage: "logout",
|
||||||
|
icon: "fa-sign-out"
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
@ -120,7 +124,7 @@ ComunicWeb.components.menuBar.authenticated = {
|
|||||||
|
|
||||||
|
|
||||||
//Process links list
|
//Process links list
|
||||||
this.dropdownMenuLinksList.forEach(function(entry){
|
var addMenuOption = function(entry){
|
||||||
|
|
||||||
var linkButton = createElem2({
|
var linkButton = createElem2({
|
||||||
appendTo: dropdownContent,
|
appendTo: dropdownContent,
|
||||||
@ -130,6 +134,7 @@ ComunicWeb.components.menuBar.authenticated = {
|
|||||||
var link = createElem2({
|
var link = createElem2({
|
||||||
appendTo: linkButton,
|
appendTo: linkButton,
|
||||||
type: "a",
|
type: "a",
|
||||||
|
href: entry.href,
|
||||||
innerLang: entry.innerLang,
|
innerLang: entry.innerLang,
|
||||||
innerHTML: entry.innerHTML,
|
innerHTML: entry.innerHTML,
|
||||||
innerHTMLprefix: entry.icon ? "<i class='fa " + entry.icon + "'></i> " : undefined,
|
innerHTMLprefix: entry.icon ? "<i class='fa " + entry.icon + "'></i> " : undefined,
|
||||||
@ -142,6 +147,9 @@ ComunicWeb.components.menuBar.authenticated = {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(entry.target)
|
||||||
|
link.setAttribute("target", entry.target);
|
||||||
|
|
||||||
if(entry.onclick){
|
if(entry.onclick){
|
||||||
linkButton.addEventListener("click", function(){
|
linkButton.addEventListener("click", function(){
|
||||||
entry.onclick(link);
|
entry.onclick(link);
|
||||||
@ -152,8 +160,20 @@ ComunicWeb.components.menuBar.authenticated = {
|
|||||||
entry.oninit(link);
|
entry.oninit(link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
this.dropdownMenuLinksList.forEach(addMenuOption);
|
||||||
|
|
||||||
|
//Add divider
|
||||||
|
createElem2({
|
||||||
|
appendTo: dropdownContent,
|
||||||
|
type: "li",
|
||||||
|
class: "divider"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ComunicWeb.components.bottom.links.forEach(addMenuOption);
|
||||||
|
|
||||||
|
|
||||||
//Return dropdown content element
|
//Return dropdown content element
|
||||||
return dropdownContent;
|
return dropdownContent;
|
||||||
|
@ -57,6 +57,11 @@ ComunicWeb.common.langs.en = {
|
|||||||
menu_bar_action_settings: "Settings",
|
menu_bar_action_settings: "Settings",
|
||||||
_menu_bar_action_logout: "Logout",
|
_menu_bar_action_logout: "Logout",
|
||||||
|
|
||||||
|
//Bottom bar - links
|
||||||
|
bottom_bar_action_language: "Language",
|
||||||
|
bottom_bar_action_about: "About",
|
||||||
|
|
||||||
|
|
||||||
//Posts - Actions
|
//Posts - Actions
|
||||||
posts_actions_err_get_single: "An error occured while getting information about the post !",
|
posts_actions_err_get_single: "An error occured while getting information about the post !",
|
||||||
|
|
||||||
|
@ -58,6 +58,10 @@ ComunicWeb.common.langs.fr = {
|
|||||||
menu_bar_action_settings: "Paramètres",
|
menu_bar_action_settings: "Paramètres",
|
||||||
_menu_bar_action_logout: "Déconnexion",
|
_menu_bar_action_logout: "Déconnexion",
|
||||||
|
|
||||||
|
//Bottom bar - links
|
||||||
|
bottom_bar_action_language: "Langue",
|
||||||
|
bottom_bar_action_about: "A propos",
|
||||||
|
|
||||||
//Posts - Actions
|
//Posts - Actions
|
||||||
posts_actions_err_get_single: "Une erreur a survenue lors de la récupération d'informations sur le post !",
|
posts_actions_err_get_single: "Une erreur a survenue lors de la récupération d'informations sur le post !",
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user