diff --git a/assets/css/pages/settings/sections/privacy.css b/assets/css/pages/settings/sections/privacy.css new file mode 100644 index 00000000..5926d2ef --- /dev/null +++ b/assets/css/pages/settings/sections/privacy.css @@ -0,0 +1,5 @@ +/** + * Settings privacy settings section + * + * @author Pierre HUBERT + */ diff --git a/assets/js/common/functionsSchema.js b/assets/js/common/functionsSchema.js index 5dd7a331..79dbc9d9 100644 --- a/assets/js/common/functionsSchema.js +++ b/assets/js/common/functionsSchema.js @@ -1158,6 +1158,13 @@ var ComunicWeb = { accountImage: { //TODO : implement }, + + /** + * Privacy section + */ + privacy: { + //TODO : implement + }, }, }, diff --git a/assets/js/pages/settings/navigationPane.js b/assets/js/pages/settings/navigationPane.js index f7ef5280..f731a706 100644 --- a/assets/js/pages/settings/navigationPane.js +++ b/assets/js/pages/settings/navigationPane.js @@ -91,6 +91,20 @@ ComunicWeb.pages.settings.navigationPane = { sectionSecurityLink.onclick = function(){ openPage("settings/account_image"); }; + + //Privacy settings + var sectionSecurity = createElem2({ + appendTo: elemList, + type: "li", + }); + var sectionSecurityLink = createElem2({ + appendTo: sectionSecurity, + type: "a", + innerHTML: " Privacy" + }); + sectionSecurityLink.addEventListener("click", function(){ + openPage("settings/privacy"); + }); } } \ No newline at end of file diff --git a/assets/js/pages/settings/sections/privacy.js b/assets/js/pages/settings/sections/privacy.js new file mode 100644 index 00000000..e4692820 --- /dev/null +++ b/assets/js/pages/settings/sections/privacy.js @@ -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" + }); + }, + +} \ No newline at end of file diff --git a/assets/js/pages/settings/sectionsList.js b/assets/js/pages/settings/sectionsList.js index 5a23a256..a83b54d9 100644 --- a/assets/js/pages/settings/sectionsList.js +++ b/assets/js/pages/settings/sectionsList.js @@ -37,4 +37,12 @@ ComunicWeb.pages.settings.sectionsList = { title: "Account image", handler: "ComunicWeb.pages.settings.sections.accountImage.open" }, + + /** + * Privacy settings + */ + privacy: { + title: "Privacy", + handler: "ComunicWeb.pages.settings.sections.privacy.open", + }, } \ No newline at end of file diff --git a/system/config/dev.config.php b/system/config/dev.config.php index 204c2e94..c4658ee1 100644 --- a/system/config/dev.config.php +++ b/system/config/dev.config.php @@ -192,6 +192,7 @@ class Dev { "css/pages/settings/sections/security.css", "css/pages/settings/sections/password.css", "css/pages/settings/sections/accountImage.css", + "css/pages/settings/sections/privacy.css", //Latest post page stylesheet "css/pages/latestPosts/main.css", @@ -364,6 +365,7 @@ class Dev { "js/pages/settings/sections/security.js", "js/pages/settings/sections/password.js", "js/pages/settings/sections/accountImage.js", + "js/pages/settings/sections/privacy.js", //Login page "js/pages/login.js",