Display footer

This commit is contained in:
Pierre 2018-04-08 15:16:32 +02:00
parent cca7b536b2
commit 0c68a6c8e8
4 changed files with 81 additions and 5 deletions

View File

@ -509,6 +509,20 @@ var ComunicWeb = {
}, },
}, },
/**
* Pages bottom
*/
bottom: {
/**
* Main bottom script file
*/
main: {
//TODO : implement
},
},
/** /**
* Mails caching component * Mails caching component
*/ */

View File

@ -203,8 +203,8 @@ ComunicWeb.common.page = {
//We check if the page is a full screen page or not //We check if the page is a full screen page or not
if(pageInfos.disableMenus){ if(pageInfos.disableMenus){
//We force the screen to be cleaned //We force the screen to be cleaned
var mainContainerElem = this.emptyPage(true); var mainContainerElem = this.emptyPage(true);
var pageTarget = mainContainerElem; //The page directly goes to the main target var pageTarget = mainContainerElem; //The page directly goes to the main target
} }
//Else //Else
else { else {
@ -228,9 +228,7 @@ ComunicWeb.common.page = {
//Set wrapper class //Set wrapper class
pageTarget.className = "content-wrapper"; pageTarget.className = "content-wrapper";
//Ask adminLTE to fix layout
if($.AdminLTE.layout)
$.AdminLTE.layout.fix();
//Set body class //Set body class
document.body.className="hold-transition fixed skin-blue layout-top-nav"; document.body.className="hold-transition fixed skin-blue layout-top-nav";
@ -238,6 +236,9 @@ ComunicWeb.common.page = {
//We load the menubar //We load the menubar
ComunicWeb.components.menuBar.common.display(); ComunicWeb.components.menuBar.common.display();
//Bottom
ComunicWeb.components.bottom.main.display();
//We load specific components for logged in users //We load specific components for logged in users
if(ComunicWeb.user.userLogin.getUserLoginState()){ if(ComunicWeb.user.userLogin.getUserLoginState()){
@ -247,6 +248,10 @@ ComunicWeb.common.page = {
//We load conversations manager (login required) //We load conversations manager (login required)
ComunicWeb.components.conversations.manager.display(); ComunicWeb.components.conversations.manager.display();
} }
//Ask adminLTE to fix layout
if($.AdminLTE.layout)
$.AdminLTE.layout.fix();
} }
//Add the subfolder URI (if any) //Add the subfolder URI (if any)

View File

@ -0,0 +1,54 @@
/**
* Main bottom script file
*
* @author Pierre HUBERT
*/
ComunicWeb.components.bottom.main = {
/**
* Display the footer of the pages
*/
display: function(){
ComunicWeb.debug.logMessage("Display bottom page.");
//Check if the footer is already shown or not
var footer = byId("footer");
if(footer){
ComunicWeb.debug.logMessage("Notice : The footer is already shown on the screen !");
return;
}
//Create and apply footer
footer = createElem2({
type: "footer",
appendTo: byId("wrapper"),
id: "footer",
class: "main-footer"
});
//Add right element
/*var rightElements = createElem2({
appendTo: footer,
type: "div",
class: "pull-right"
});*/
//Left elements
var leftElements = createElem2({
appendTo: footer,
type: "span",
innerHTML: "Comunic     "
});
//Put the language selector link on the right
var langLink = createElem2({
appendTo: leftElements,
type: "a",
innerHTML: "<i class='fa fa-globe'></i> Language"
});
}
}

View File

@ -211,6 +211,9 @@ class Dev {
"js/components/menuBar/common.js", "js/components/menuBar/common.js",
"js/components/menuBar/notAuthenticated.js", "js/components/menuBar/notAuthenticated.js",
"js/components/menuBar/authenticated.js", "js/components/menuBar/authenticated.js",
//Bottom view
"js/components/bottom/main.js",
//Friends components //Friends components
"js/components/friends/friendsList.js", "js/components/friends/friendsList.js",