From 3f4b2ea290491c356dee54f30150f44768d64b6e Mon Sep 17 00:00:00 2001 From: Pierre Date: Sun, 15 Apr 2018 15:02:32 +0200 Subject: [PATCH] Ready to get general information about the users --- assets/js/common/functionsSchema.js | 14 ++++++++++++++ assets/js/components/settings/interface.js | 11 +++++++++++ assets/js/pages/settings/main.js | 2 +- assets/js/pages/settings/navigationPane.js | 3 +++ assets/js/pages/settings/sections/general.js | 19 ++++++++++++++++++- system/config/dev.config.php | 4 ++++ 6 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 assets/js/components/settings/interface.js diff --git a/assets/js/common/functionsSchema.js b/assets/js/common/functionsSchema.js index 82a68771..ef1a3590 100644 --- a/assets/js/common/functionsSchema.js +++ b/assets/js/common/functionsSchema.js @@ -571,6 +571,20 @@ var ComunicWeb = { //TODO : implement }, + /** + * Settings component + */ + settings: { + + /** + * Settings interface + */ + interface: { + //TODO : implement + }, + + }, + /** * Friends list */ diff --git a/assets/js/components/settings/interface.js b/assets/js/components/settings/interface.js new file mode 100644 index 00000000..9d7f08d4 --- /dev/null +++ b/assets/js/components/settings/interface.js @@ -0,0 +1,11 @@ +/** + * Settings interface + * + * @author Pierre HUBERT + */ + +ComunicWeb.components.settings.interface = { + + + +} \ No newline at end of file diff --git a/assets/js/pages/settings/main.js b/assets/js/pages/settings/main.js index 19b850cb..5e1044b9 100644 --- a/assets/js/pages/settings/main.js +++ b/assets/js/pages/settings/main.js @@ -52,7 +52,7 @@ ComunicWeb.pages.settings.main = { var section = ComunicWeb.pages.settings.sectionsList[section]; //Update document title - document.title += section.title; + document.title += " - " + section.title; //Call handler eval(section.handler + "(args, rightArea);"); diff --git a/assets/js/pages/settings/navigationPane.js b/assets/js/pages/settings/navigationPane.js index bee3cd1c..21bc5e0e 100644 --- a/assets/js/pages/settings/navigationPane.js +++ b/assets/js/pages/settings/navigationPane.js @@ -60,6 +60,9 @@ ComunicWeb.pages.settings.navigationPane = { type: "a", innerHTML: " General" }); + sectionGeneralLink.onclick = function(){ + openPage("settings/general"); + }; } } \ No newline at end of file diff --git a/assets/js/pages/settings/sections/general.js b/assets/js/pages/settings/sections/general.js index 2e54dedf..2e4ceeef 100644 --- a/assets/js/pages/settings/sections/general.js +++ b/assets/js/pages/settings/sections/general.js @@ -13,7 +13,24 @@ ComunicWeb.pages.settings.sections.general = { * @param {HTMLElement} target The target for the page */ open: function(args, target){ - alert("hey"); + + //Create a box + var box = createElem2({ + appendTo: target, + type: "div", + class: "box box-primary" + }); + + //Create box body + var boxBody = createElem2({ + appendTo: box, + type: "div", + class: "box-body" + }); + + //Display loading message + var loadingMsg = ComunicWeb.common.messages.createCalloutElem("Loading", "Please wait while this page is loading...", "info"); + boxBody.appendChild(loadingMsg); } }; \ No newline at end of file diff --git a/system/config/dev.config.php b/system/config/dev.config.php index 1ca6948b..09bc184c 100644 --- a/system/config/dev.config.php +++ b/system/config/dev.config.php @@ -218,6 +218,9 @@ class Dev { //Search form "js/components/searchForm/searchForm.js", + + //Settings + "js/components/settings/interface.js", //Main menubar "js/components/menuBar/common.js", @@ -322,6 +325,7 @@ class Dev { "js/pages/settings/main.js", "js/pages/settings/navigationPane.js", "js/pages/settings/sectionsList.js", + //Settings sections "js/pages/settings/sections/general.js",