Created security section

This commit is contained in:
Pierre 2018-04-18 18:11:45 +02:00
parent 1fc8be35dd
commit 7726145a63
6 changed files with 83 additions and 0 deletions

View File

@ -0,0 +1,5 @@
/**
* Security settings section
*
* @author Pierre HUBERT
*/

View File

@ -1109,6 +1109,12 @@ var ComunicWeb = {
//TODO : implement
},
/**
* Security section
*/
security: {
//TODO : implement
},
},
},

View File

@ -63,6 +63,20 @@ ComunicWeb.pages.settings.navigationPane = {
sectionGeneralLink.onclick = function(){
openPage("settings/general");
};
//Account security
var sectionSecurity = createElem2({
appendTo: elemList,
type: "li",
});
var sectionSecurityLink = createElem2({
appendTo: sectionSecurity,
type: "a",
innerHTML: "<i class='fa fa-lock'></i> Security"
});
sectionSecurityLink.onclick = function(){
openPage("settings/security");
};
}
}

View File

@ -0,0 +1,47 @@
/**
* Settings security section script
*
* @author Pierre HUBERT
*/
ComunicWeb.pages.settings.sections.security = {
/**
* Open security settings section
*
* @param {object} args Additionnal arguments
* @param {HTMLElement} target The target for the page
*/
open: function(args, target){
//Create a box
var box = createElem2({
appendTo: target,
type: "div",
class: "box box-primary box-security-settings"
});
//Add box header
var boxHead = createElem2({
appendTo: box,
type: "div",
class: "box-header",
});
var boxTitle = createElem2({
appendTo: boxHead,
type: "h3",
class: "box-title",
innerHTML: "Security settings"
});
//Create box body
var boxBody = createElem2({
appendTo: box,
type: "div",
class: "box-body"
});
},
}

View File

@ -14,4 +14,13 @@ ComunicWeb.pages.settings.sectionsList = {
handler: "ComunicWeb.pages.settings.sections.general.open",
},
/**
* Security settings
*/
security: {
title: "Security",
handler: "ComunicWeb.pages.settings.sections.security.open",
},
}

View File

@ -167,6 +167,7 @@ class Dev {
//Settings page
//Sections sections
"css/pages/settings/sections/general.css",
"css/pages/settings/sections/security.css",
//Latest post page stylesheet
"css/pages/latestPosts/main.css",
@ -332,6 +333,7 @@ class Dev {
//Settings sections
"js/pages/settings/sections/general.js",
"js/pages/settings/sections/security.js",
//Login page
"js/pages/login.js",