mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Prepared notifications list refresh.
This commit is contained in:
parent
f97826752a
commit
d0e7682b01
@ -53,8 +53,38 @@ ComunicWeb.components.notifications.dropdown = {
|
|||||||
innerHTML: "Notifications"
|
innerHTML: "Notifications"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Add notifications list
|
||||||
|
var notificationsList = createElem2({
|
||||||
|
appendTo: dropdownMenu,
|
||||||
|
type: "ul",
|
||||||
|
class: "menu"
|
||||||
|
});
|
||||||
|
|
||||||
|
//Enable slimscroll
|
||||||
|
$(notificationsList).slimScroll({
|
||||||
|
height: '100%'
|
||||||
|
});
|
||||||
|
|
||||||
//Initialize service
|
//Initialize service
|
||||||
ComunicWeb.components.notifications.service.init(notificationsNumber, true);
|
ComunicWeb.components.notifications.service.init(notificationsNumber, true);
|
||||||
|
|
||||||
|
//Refresh the notifications list if the user click the dropdown button
|
||||||
|
dropdownToggle.onclick = function(){
|
||||||
|
|
||||||
|
ComunicWeb.components.notifications.dropdown.refresh_list(notificationsList);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Refresh the list of notifications
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} list The notifications list to refresh
|
||||||
|
*/
|
||||||
|
refresh: function(list){
|
||||||
|
|
||||||
|
//Perform a request on the database
|
||||||
|
|
||||||
|
},
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user