Created privacy settings section

This commit is contained in:
Pierre 2018-05-09 12:18:28 +02:00
parent 99f86060a4
commit 53edcd8ffc
6 changed files with 87 additions and 0 deletions

View File

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

View File

@ -1158,6 +1158,13 @@ var ComunicWeb = {
accountImage: { accountImage: {
//TODO : implement //TODO : implement
}, },
/**
* Privacy section
*/
privacy: {
//TODO : implement
},
}, },
}, },

View File

@ -91,6 +91,20 @@ ComunicWeb.pages.settings.navigationPane = {
sectionSecurityLink.onclick = function(){ sectionSecurityLink.onclick = function(){
openPage("settings/account_image"); openPage("settings/account_image");
}; };
//Privacy settings
var sectionSecurity = createElem2({
appendTo: elemList,
type: "li",
});
var sectionSecurityLink = createElem2({
appendTo: sectionSecurity,
type: "a",
innerHTML: "<i class='fa fa-user-secret'></i> Privacy"
});
sectionSecurityLink.addEventListener("click", function(){
openPage("settings/privacy");
});
} }
} }

View File

@ -0,0 +1,51 @@
/**
* Privacy settings section
*
* @author Pierre HUBERT
*/
ComunicWeb.pages.settings.sections.privacy = {
/**
* Open 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-privacy-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: "Privacy"
});
//Create box body
var boxBody = createElem2({
appendTo: box,
type: "div",
class: "box-body"
});
//Create a form contener
var formContener = createElem2({
appendTo: boxBody,
type: "div"
});
},
}

View File

@ -37,4 +37,12 @@ ComunicWeb.pages.settings.sectionsList = {
title: "Account image", title: "Account image",
handler: "ComunicWeb.pages.settings.sections.accountImage.open" handler: "ComunicWeb.pages.settings.sections.accountImage.open"
}, },
/**
* Privacy settings
*/
privacy: {
title: "Privacy",
handler: "ComunicWeb.pages.settings.sections.privacy.open",
},
} }

View File

@ -192,6 +192,7 @@ class Dev {
"css/pages/settings/sections/security.css", "css/pages/settings/sections/security.css",
"css/pages/settings/sections/password.css", "css/pages/settings/sections/password.css",
"css/pages/settings/sections/accountImage.css", "css/pages/settings/sections/accountImage.css",
"css/pages/settings/sections/privacy.css",
//Latest post page stylesheet //Latest post page stylesheet
"css/pages/latestPosts/main.css", "css/pages/latestPosts/main.css",
@ -364,6 +365,7 @@ class Dev {
"js/pages/settings/sections/security.js", "js/pages/settings/sections/security.js",
"js/pages/settings/sections/password.js", "js/pages/settings/sections/password.js",
"js/pages/settings/sections/accountImage.js", "js/pages/settings/sections/accountImage.js",
"js/pages/settings/sections/privacy.js",
//Login page //Login page
"js/pages/login.js", "js/pages/login.js",