mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-24 09:58:51 +00:00
Created template
This commit is contained in:
parent
b99c1e4a7f
commit
5373eac5df
5
assets/css/pages/settings/sections/notifications.css
Normal file
5
assets/css/pages/settings/sections/notifications.css
Normal file
@ -0,0 +1,5 @@
|
||||
/**
|
||||
* Notifications settings
|
||||
*
|
||||
* @author Pierre Hubert
|
||||
*/
|
@ -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
|
||||
*/
|
||||
|
@ -0,0 +1,48 @@
|
||||
<!-- Notifications section -->
|
||||
|
||||
<!-- Web app section -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">tr("Web application")</h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<!-- form start -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label>
|
||||
<input type="checkbox"> tr("Allow sound for notifications")
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn btn-primary">tr("Update")</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Push notifications section -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">tr("Push notifications")</h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<!-- form start -->
|
||||
|
||||
<div class="box-body">
|
||||
<p>tr("Note: These parameters applies only for the mobile version of the application!")</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label>
|
||||
<input type="checkbox"> tr("Allow conversation notifications")
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn btn-primary">tr("Update")</button>
|
||||
</div>
|
||||
</div>
|
@ -287,6 +287,7 @@ class Dev {
|
||||
"css/pages/settings/sections/customEmojis.css",
|
||||
"css/pages/settings/sections/security.css",
|
||||
"css/pages/settings/sections/password.css",
|
||||
"css/pages/settings/sections/notifications.css",
|
||||
"css/pages/settings/sections/globalLogout.css",
|
||||
"css/pages/settings/sections/accountImage.css",
|
||||
"css/pages/settings/sections/privacy.css",
|
||||
@ -557,6 +558,7 @@ class Dev {
|
||||
"js/pages/settings/sections/language.js",
|
||||
"js/pages/settings/sections/emojis.js",
|
||||
"js/pages/settings/sections/security.js",
|
||||
"js/pages/settings/sections/notifications.js",
|
||||
"js/pages/settings/sections/password.js",
|
||||
"js/pages/settings/sections/globalLogout.js",
|
||||
"js/pages/settings/sections/accountImage.js",
|
||||
|
Loading…
Reference in New Issue
Block a user