mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Splited bottom links list and rendering
This commit is contained in:
parent
f418ee25b0
commit
fba7937d02
@ -592,6 +592,13 @@ var ComunicWeb = {
|
|||||||
*/
|
*/
|
||||||
bottom: {
|
bottom: {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bottom links
|
||||||
|
*/
|
||||||
|
links: [
|
||||||
|
//TODO : implement
|
||||||
|
],
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main bottom script file
|
* Main bottom script file
|
||||||
*/
|
*/
|
||||||
|
21
assets/js/components/bottom/links.js
Normal file
21
assets/js/components/bottom/links.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/**
|
||||||
|
* Comunic bottom links list
|
||||||
|
*
|
||||||
|
* @author Pierre HUBERT
|
||||||
|
*/
|
||||||
|
|
||||||
|
ComunicWeb.components.bottom.links = [
|
||||||
|
|
||||||
|
//Language selector
|
||||||
|
{
|
||||||
|
innerHTML: "<i class='fa fa-globe'></i> Language",
|
||||||
|
onclick: function(){ComunicWeb.components.langPicker.show();}
|
||||||
|
},
|
||||||
|
|
||||||
|
//About Comunic
|
||||||
|
{
|
||||||
|
innerHTML: "<i class='fa fa-question-circle'></i> About",
|
||||||
|
href: ComunicWeb.__config.aboutWebsiteURL,
|
||||||
|
target: "_blank"
|
||||||
|
}
|
||||||
|
];
|
@ -43,27 +43,24 @@ ComunicWeb.components.bottom.main = {
|
|||||||
innerHTML: "Comunic "
|
innerHTML: "Comunic "
|
||||||
});
|
});
|
||||||
|
|
||||||
//Put the language selector link on the right
|
ComunicWeb.components.bottom.links.forEach(function(link){
|
||||||
var langLink = createElem2({
|
|
||||||
appendTo: leftElements,
|
|
||||||
type: "a",
|
|
||||||
innerHTML: "<i class='fa fa-globe'></i> Language"
|
|
||||||
});
|
|
||||||
langLink.onclick = function(){
|
|
||||||
ComunicWeb.components.langPicker.show();
|
|
||||||
};
|
|
||||||
|
|
||||||
add_space(leftElements);
|
var linkEl = createElem2({
|
||||||
add_space(leftElements);
|
appendTo: leftElements,
|
||||||
|
type: "a",
|
||||||
|
href: link.href,
|
||||||
|
innerHTML: link.innerHTML
|
||||||
|
});
|
||||||
|
|
||||||
//Add about link
|
if(link.target)
|
||||||
var aboutLink = createElem2({
|
linkEl.setAttribute("target", link.target);
|
||||||
appendTo: leftElements,
|
|
||||||
type: "a",
|
if(link.onclick)
|
||||||
innerHTML: "<i class='fa fa-question-circle'></i> About",
|
linkEl.onclick = link.onclick;
|
||||||
href: ComunicWeb.__config.aboutWebsiteURL
|
|
||||||
|
add_space(leftElements);
|
||||||
|
add_space(leftElements);
|
||||||
});
|
});
|
||||||
aboutLink.setAttribute("target", "_blank");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -339,6 +339,7 @@ class Dev {
|
|||||||
"js/components/menuBar/authenticated.js",
|
"js/components/menuBar/authenticated.js",
|
||||||
|
|
||||||
//Bottom view
|
//Bottom view
|
||||||
|
"js/components/bottom/links.js",
|
||||||
"js/components/bottom/main.js",
|
"js/components/bottom/main.js",
|
||||||
|
|
||||||
//Language picker
|
//Language picker
|
||||||
|
Loading…
Reference in New Issue
Block a user