mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 12:09:21 +00:00
Pages will be able to welcome a menu
This commit is contained in:
parent
6ecd49d1b0
commit
7b6163328a
@ -124,22 +124,41 @@ ComunicWeb.common.page = {
|
||||
ComunicWeb.common.url.changeURI(document.title, pageURI);
|
||||
|
||||
//Get the main contener of the page
|
||||
var mainContenerElem = document.getElementById("wrapper");
|
||||
var mainContenerElem =byId("wrapper");
|
||||
|
||||
//If we didn't get anything, clean the page and create a wrapper element
|
||||
if(!mainContenerElem){
|
||||
var mainContenerElem = this.emptyPage(true);
|
||||
}
|
||||
|
||||
//We check if the page is a full screen page
|
||||
//We check if the page is a full screen page or not
|
||||
if(pageInfos.disableMenus){
|
||||
//We force the screen to be cleaned
|
||||
var mainContenerElem = this.emptyPage(true);
|
||||
var pageTarget = mainContenerElem;
|
||||
var pageTarget = mainContenerElem; //The page directly goes to the main target
|
||||
}
|
||||
//Else
|
||||
else {
|
||||
//We try to locate menubar
|
||||
|
||||
//We try to locate the target of the page
|
||||
var pageTarget = byId("pageTarget");
|
||||
|
||||
//We empty screen if we couldn't rich it
|
||||
if(!pageTarget){
|
||||
mainContenerElem.innerHTML = "";
|
||||
|
||||
//We create the pagetTarget element
|
||||
var pageTarget = createElem("div", mainContenerElem);
|
||||
pageTarget.id = "pageTarget";
|
||||
}
|
||||
|
||||
//Set wrapper class
|
||||
mainContenerElem.className = "content-wrapper";
|
||||
|
||||
//Set body class
|
||||
document.body.className="hold-transition skin-blue layout-top-nav";
|
||||
|
||||
//We load the menu
|
||||
|
||||
}
|
||||
|
||||
|
@ -12,13 +12,13 @@
|
||||
* @return {HTMLElement} The newly created element
|
||||
*/
|
||||
function createElem(nodeType, appendTo){
|
||||
var newElem = document.createElement(nodeType);
|
||||
var newElem = document.createElement(nodeType);
|
||||
|
||||
if(appendTo)
|
||||
appendTo.appendChild(newElem);
|
||||
if(appendTo)
|
||||
appendTo.appendChild(newElem);
|
||||
|
||||
//Return result
|
||||
return newElem;
|
||||
//Return result
|
||||
return newElem;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -28,5 +28,5 @@ function createElem(nodeType, appendTo){
|
||||
* @return {HTMLElement} The elemnt / False for a failure
|
||||
*/
|
||||
function byId(nodeName){
|
||||
return document.getElementById(nodeName);
|
||||
return document.getElementById(nodeName);
|
||||
}
|
@ -30,6 +30,9 @@ $config['JSfiles'] = array(
|
||||
"%PATH_ASSETS%adminLTE/plugins/jquery-ui/jquery-ui.min.js",
|
||||
"%PATH_ASSETS%adminLTE/plugins/iCheck/icheck.min.js",
|
||||
|
||||
//Utilities
|
||||
"%PATH_ASSETS%js/common/utils.js",
|
||||
|
||||
//Functions schema
|
||||
"%PATH_ASSETS%js/common/functionsSchema.js",
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user