Created settings page

This commit is contained in:
Pierre
2018-04-12 16:17:41 +02:00
parent 71932197fa
commit 991a950a42
7 changed files with 165 additions and 0 deletions

View File

@ -0,0 +1,39 @@
/**
* User settings main script file
*
* @author Pierre HUBERT
*/
ComunicWeb.pages.settings.main = {
/**
* Open settings page
*
* @param {object} args Optionnal arguments
* @param {HTMLElement} target The target for the page
*/
open: function(args, target){
//Settings page is organized like an array with two columns
//Left column : settings sections menu
//Rigth column : current settings section
//Create a row
var row = createElem2({
appendTo: target,
type: "div",
class: "row settings-page-container"
});
//Left area
var leftArea = createElem2({
appendTo: row,
type: "div",
class: "col-md-3"
});
//Display left navigation pane
ComunicWeb.pages.settings.navigationPane.display(leftArea);
},
}

View File

@ -0,0 +1,65 @@
/**
* Settings navigation pane
*
* @author Pierre HUBERT
*/
ComunicWeb.pages.settings.navigationPane = {
/**
* Display the settings navigation pane
*
* @param {HTMLElement} target The target for the navigation pane
*/
display: function(target){
//Create a box
var navigationBox = createElem2({
appendTo: target,
type: "div",
class: "box box-solid"
});
//Set box header
var boxHeader = createElem2({
appendTo: navigationBox,
type: "div",
class: "box-header with-border",
});
//Set box title
createElem2({
appendTo: boxHeader,
type: "h3",
class: "box-title",
innerHTML: "Sections"
});
//Create box body
var boxBody = createElem2({
appendTo: navigationBox,
type: "div",
class: "box-body no-padding"
});
//Display the list of sections
var elemList = createElem2({
appendTo: boxBody,
type: "ul",
class: "nav nav-pills nav-stacked"
});
//General account information
var sectionGeneral = createElem2({
appendTo: elemList,
type: "li",
});
var sectionGeneralLink = createElem2({
appendTo: sectionGeneral,
type: "a",
innerHTML: "<i class='fa fa-user'></i> General"
});
}
}