mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-23 12:39:22 +00:00
45 lines
808 B
JavaScript
45 lines
808 B
JavaScript
|
/**
|
||
|
* Notifications menu bar dropdown
|
||
|
*
|
||
|
* @author Pierre HUBERT
|
||
|
*/
|
||
|
|
||
|
ComunicWeb.components.notifications.dropdown = {
|
||
|
|
||
|
/**
|
||
|
* Display notifications dropdown
|
||
|
*
|
||
|
* @param {HTMLElement} target The target of the notification dropdown
|
||
|
*/
|
||
|
display: function(target){
|
||
|
|
||
|
//Create the button
|
||
|
var dropdown = createElem2({
|
||
|
appendTo: target,
|
||
|
type: "li",
|
||
|
class: "dropdown notifications-menu"
|
||
|
});
|
||
|
|
||
|
//Add dropdown toggle
|
||
|
var dropdownToggle = createElem2({
|
||
|
appendTo: dropdown,
|
||
|
type: "a",
|
||
|
class: "dropdown-toggle",
|
||
|
href: "#",
|
||
|
innerHTML: '<i class="fa fa-bell-o"></i>'
|
||
|
});
|
||
|
|
||
|
//Add notification number
|
||
|
var notificationsNumber = createElem2({
|
||
|
appendTo: dropdownToggle,
|
||
|
type: "span",
|
||
|
class: "label label-danger",
|
||
|
innerHTML: "0"
|
||
|
});
|
||
|
|
||
|
//Add dropdown menu
|
||
|
|
||
|
|
||
|
},
|
||
|
|
||
|
}
|