From 7726145a63cc83ea5d26003d603dc03821d0ba49 Mon Sep 17 00:00:00 2001 From: Pierre Date: Wed, 18 Apr 2018 18:11:45 +0200 Subject: [PATCH] Created security section --- .../css/pages/settings/sections/security.css | 5 ++ assets/js/common/functionsSchema.js | 6 +++ assets/js/pages/settings/navigationPane.js | 14 ++++++ assets/js/pages/settings/sections/security.js | 47 +++++++++++++++++++ assets/js/pages/settings/sectionsList.js | 9 ++++ system/config/dev.config.php | 2 + 6 files changed, 83 insertions(+) create mode 100644 assets/css/pages/settings/sections/security.css create mode 100644 assets/js/pages/settings/sections/security.js diff --git a/assets/css/pages/settings/sections/security.css b/assets/css/pages/settings/sections/security.css new file mode 100644 index 00000000..8ec419da --- /dev/null +++ b/assets/css/pages/settings/sections/security.css @@ -0,0 +1,5 @@ +/** + * Security settings section + * + * @author Pierre HUBERT + */ \ No newline at end of file diff --git a/assets/js/common/functionsSchema.js b/assets/js/common/functionsSchema.js index ef1a3590..a2d16469 100644 --- a/assets/js/common/functionsSchema.js +++ b/assets/js/common/functionsSchema.js @@ -1109,6 +1109,12 @@ var ComunicWeb = { //TODO : implement }, + /** + * Security section + */ + security: { + //TODO : implement + }, }, }, diff --git a/assets/js/pages/settings/navigationPane.js b/assets/js/pages/settings/navigationPane.js index 21bc5e0e..165f8f71 100644 --- a/assets/js/pages/settings/navigationPane.js +++ b/assets/js/pages/settings/navigationPane.js @@ -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: " Security" + }); + sectionSecurityLink.onclick = function(){ + openPage("settings/security"); + }; } } \ No newline at end of file diff --git a/assets/js/pages/settings/sections/security.js b/assets/js/pages/settings/sections/security.js new file mode 100644 index 00000000..3c7f315d --- /dev/null +++ b/assets/js/pages/settings/sections/security.js @@ -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" + }); + + + }, + +} \ No newline at end of file diff --git a/assets/js/pages/settings/sectionsList.js b/assets/js/pages/settings/sectionsList.js index 8ab9d958..e1324dbb 100644 --- a/assets/js/pages/settings/sectionsList.js +++ b/assets/js/pages/settings/sectionsList.js @@ -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", + }, + + } \ No newline at end of file diff --git a/system/config/dev.config.php b/system/config/dev.config.php index 6f90e61d..3e7408ad 100644 --- a/system/config/dev.config.php +++ b/system/config/dev.config.php @@ -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",