mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-19 04:15:17 +00:00
Created template
This commit is contained in:
@ -92,6 +92,20 @@ ComunicWeb.pages.settings.navigationPane = {
|
||||
openPage("settings/emojies");
|
||||
};
|
||||
|
||||
// Custom emojies
|
||||
const sectionNotifications = createElem2({
|
||||
appendTo: elemList,
|
||||
type: "li",
|
||||
});
|
||||
var sectionNotificationsLink = createElem2({
|
||||
appendTo: sectionNotifications,
|
||||
type: "a",
|
||||
innerHTML: "<i class='fa fa-bell-o'></i> Notifications"
|
||||
});
|
||||
sectionNotificationsLink.onclick = function(){
|
||||
openPage("settings/notifications");
|
||||
};
|
||||
|
||||
//Account security
|
||||
var sectionSecurity = createElem2({
|
||||
appendTo: elemList,
|
||||
|
22
assets/js/pages/settings/sections/notifications.js
Normal file
22
assets/js/pages/settings/sections/notifications.js
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Notifications settings
|
||||
*
|
||||
* @author Pierre Hubert
|
||||
*/
|
||||
|
||||
class NotificationsSettings {
|
||||
static async Open(args, target) {
|
||||
// Load template
|
||||
const tpl = await Page.loadHTMLTemplate("pages/settings/notifications/NotificationsSection.html");
|
||||
const el = document.createElement("div")
|
||||
el.innerHTML = tpl;
|
||||
target.appendChild(el);
|
||||
|
||||
el.querySelectorAll("input[type='checkbox']").forEach(e => {
|
||||
$(e).iCheck({
|
||||
checkboxClass: 'icheckbox_flat-blue',
|
||||
radioClass: 'iradio_flat-blue'
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
@ -30,6 +30,14 @@ ComunicWeb.pages.settings.sectionsList = {
|
||||
handler: "EmojiesSection.Open"
|
||||
},
|
||||
|
||||
/**
|
||||
* Notifications
|
||||
*/
|
||||
notifications: {
|
||||
title: "Notifications",
|
||||
handler: "NotificationsSettings.Open"
|
||||
},
|
||||
|
||||
/**
|
||||
* Security settings
|
||||
*/
|
||||
|
Reference in New Issue
Block a user