diff --git a/assets/js/common/functionsSchema.js b/assets/js/common/functionsSchema.js index dd657ddf..438b6a43 100644 --- a/assets/js/common/functionsSchema.js +++ b/assets/js/common/functionsSchema.js @@ -499,6 +499,8 @@ var ComunicWeb = { * Add search form element */ addSearchForm: function(navbarElem){}, + + //TODO : implement }, }, @@ -791,6 +793,23 @@ var ComunicWeb = { }, + + /** + * Notifications components + */ + notifications: { + + /** + * Notifications menu dropdown + */ + dropdown:{ + + //TODO : implement + + } + + } + }, /** diff --git a/assets/js/components/menuBar/authenticated.js b/assets/js/components/menuBar/authenticated.js index 2189a8be..38509794 100644 --- a/assets/js/components/menuBar/authenticated.js +++ b/assets/js/components/menuBar/authenticated.js @@ -35,6 +35,9 @@ ComunicWeb.components.menuBar.authenticated = { //Add friends list button this.addFriendListButton(navbarRightElemList); + //Add notifications dropdown + ComunicWeb.components.notifications.dropdown.display(navbarRightElemList); + //Add dropdown menu this.addDropdown(navbarRightElemList); diff --git a/assets/js/components/notifications/dropdown.js b/assets/js/components/notifications/dropdown.js new file mode 100644 index 00000000..1600bc6b --- /dev/null +++ b/assets/js/components/notifications/dropdown.js @@ -0,0 +1,45 @@ +/** + * 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: '' + }); + + //Add notification number + var notificationsNumber = createElem2({ + appendTo: dropdownToggle, + type: "span", + class: "label label-danger", + innerHTML: "0" + }); + + //Add dropdown menu + + + }, + +} \ No newline at end of file diff --git a/system/config/dev.config.php b/system/config/dev.config.php index bc1f2af8..682421ee 100644 --- a/system/config/dev.config.php +++ b/system/config/dev.config.php @@ -256,6 +256,9 @@ class Dev { "js/components/movies/interface.js", "js/components/movies/picker.js", + //Notifications + "js/components/notifications/dropdown.js", + //User scripts "js/user/loginTokens.js", "js/user/userLogin.js",