Prepared notifications list refresh.

This commit is contained in:
Pierre 2018-02-19 09:46:51 +01:00
parent f97826752a
commit d0e7682b01

View File

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