Commit 510f3e215dab4996b8e83cac60c048d0ceb612dd
Exists in
master
and in
5 other branches
Merge branch 'dev' of https://github.com/amadeusproject/amadeuslms into dev
Showing
3 changed files
with
9 additions
and
3 deletions
Show diff stats
core/static/js/base/amadeus.js
... | ... | @@ -134,6 +134,10 @@ This functions get the next 5 notifications from the user given a "step"(an amou |
134 | 134 | function getNotifications(step){ |
135 | 135 | $.get('/getNotifications', |
136 | 136 | {'steps':step, 'amount': 5}, function(data){ |
137 | - console.log(data); | |
137 | + $("#notification-dropdown").append(data); | |
138 | + $('#notification-see-more').remove(); | |
139 | + var seemore = '<li><a onclick="getNotifications('+(step+5)+')"> <div id="notification-see-more" class="list-group-item"> <div class="row-content"><p class="list-group-item-text">See More</p> </div> </a></li>'; | |
140 | + $("#notification-dropdown").append(seemore); | |
141 | + $("#notification-count").text(step+5); | |
138 | 142 | }); |
139 | 143 | } | ... | ... |
core/templates/base.html
... | ... | @@ -58,14 +58,14 @@ |
58 | 58 | <div class="navbar-collapse collapse navbar-responsive-collapse"> |
59 | 59 | <ul class="nav navbar-nav navbar-right notifications"> |
60 | 60 | <li class="" data-toggle="tooltip" data-placement="bottom" title data-original-title="notifications"> |
61 | - <a class="dropdown-toggle" data-toggle="dropdown"> <span class="badge notification-count">{{notifications.count}}</span><i class="fa fa-bell" aria-hidden="true"></i></a> | |
61 | + <a class="dropdown-toggle" data-toggle="dropdown"> <span id="notification-count" class="badge notification-count">{{notifications.count}}</span><i class="fa fa-bell" aria-hidden="true"></i></a> | |
62 | 62 | <ul id="notification-dropdown" class="dropdown-menu"> |
63 | 63 | <li class="dropdown-header">Notifications</li> |
64 | 64 | {% include "notifications.html" %} |
65 | 65 | |
66 | 66 | <li> |
67 | 67 | <a onclick="getNotifications(5)"> |
68 | - <div class="list-group-item"> | |
68 | + <div id="notification-see-more" class="list-group-item"> | |
69 | 69 | <div class="row-content"> |
70 | 70 | <p class="list-group-item-text">See More</p> |
71 | 71 | </div> | ... | ... |
core/templates/notifications.html