Created template

This commit is contained in:
2021-04-10 19:42:03 +02:00
parent b99c1e4a7f
commit 5373eac5df
6 changed files with 99 additions and 0 deletions

View File

@ -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,

View 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'
});
});
}
}

View File

@ -30,6 +30,14 @@ ComunicWeb.pages.settings.sectionsList = {
handler: "EmojiesSection.Open"
},
/**
* Notifications
*/
notifications: {
title: "Notifications",
handler: "NotificationsSettings.Open"
},
/**
* Security settings
*/