mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 12:09: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
|
||||
{
|
||||
innerHTML: "<i class='fa fa-globe'></i> Language",
|
||||
innerLang: "bottom_bar_action_language",
|
||||
icon: "fa-globe",
|
||||
onclick: function(){ComunicWeb.components.langPicker.show();}
|
||||
},
|
||||
|
||||
//About Comunic
|
||||
{
|
||||
innerHTML: "<i class='fa fa-question-circle'></i> About",
|
||||
innerLang: "bottom_bar_action_about",
|
||||
icon: "fa-question-circle",
|
||||
href: ComunicWeb.__config.aboutWebsiteURL,
|
||||
target: "_blank"
|
||||
}
|
||||
|
@ -49,7 +49,9 @@ ComunicWeb.components.bottom.main = {
|
||||
appendTo: leftElements,
|
||||
type: "a",
|
||||
href: link.href,
|
||||
innerHTML: link.innerHTML
|
||||
innerHTML: link.innerHTML,
|
||||
innerLang: link.innerLang,
|
||||
innerHTMLprefix: "<i class='fa "+link.icon+"'></i> "
|
||||
});
|
||||
|
||||
if(link.target)
|
||||
|
@ -14,13 +14,15 @@ ComunicWeb.components.menuBar.authenticated = {
|
||||
//Conversations
|
||||
{
|
||||
innerLang: "menu_bar_action_conversations",
|
||||
targetPage: "conversations"
|
||||
targetPage: "conversations",
|
||||
icon: "fa-comments-o"
|
||||
},
|
||||
|
||||
//Groups list
|
||||
{
|
||||
innerLang: "menu_bar_action_groups",
|
||||
targetPage: "groups",
|
||||
icon: "fa-group"
|
||||
},
|
||||
|
||||
//Dark theme
|
||||
@ -34,13 +36,15 @@ ComunicWeb.components.menuBar.authenticated = {
|
||||
//Settings list
|
||||
{
|
||||
innerLang: "menu_bar_action_settings",
|
||||
targetPage: "settings"
|
||||
targetPage: "settings",
|
||||
icon: "fa-gear"
|
||||
},
|
||||
|
||||
//Logout link
|
||||
{
|
||||
innerLang: "_menu_bar_action_logout",
|
||||
targetPage: "logout"
|
||||
targetPage: "logout",
|
||||
icon: "fa-sign-out"
|
||||
}
|
||||
|
||||
],
|
||||
@ -120,7 +124,7 @@ ComunicWeb.components.menuBar.authenticated = {
|
||||
|
||||
|
||||
//Process links list
|
||||
this.dropdownMenuLinksList.forEach(function(entry){
|
||||
var addMenuOption = function(entry){
|
||||
|
||||
var linkButton = createElem2({
|
||||
appendTo: dropdownContent,
|
||||
@ -130,6 +134,7 @@ ComunicWeb.components.menuBar.authenticated = {
|
||||
var link = createElem2({
|
||||
appendTo: linkButton,
|
||||
type: "a",
|
||||
href: entry.href,
|
||||
innerLang: entry.innerLang,
|
||||
innerHTML: entry.innerHTML,
|
||||
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){
|
||||
linkButton.addEventListener("click", function(){
|
||||
entry.onclick(link);
|
||||
@ -152,8 +160,20 @@ ComunicWeb.components.menuBar.authenticated = {
|
||||
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 dropdownContent;
|
||||
|
@ -57,6 +57,11 @@ ComunicWeb.common.langs.en = {
|
||||
menu_bar_action_settings: "Settings",
|
||||
_menu_bar_action_logout: "Logout",
|
||||
|
||||
//Bottom bar - links
|
||||
bottom_bar_action_language: "Language",
|
||||
bottom_bar_action_about: "About",
|
||||
|
||||
|
||||
//Posts - Actions
|
||||
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_logout: "Déconnexion",
|
||||
|
||||
//Bottom bar - links
|
||||
bottom_bar_action_language: "Langue",
|
||||
bottom_bar_action_about: "A propos",
|
||||
|
||||
//Posts - Actions
|
||||
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