notifications page + ajaxify route + css styling
parent
5c70b2b307
commit
705571de8c
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"title": "Notifications"
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
define(function() {
|
||||||
|
var Notifications = {};
|
||||||
|
|
||||||
|
Notifications.init = function() {
|
||||||
|
var listEl = $('.notifications-list');
|
||||||
|
|
||||||
|
$('span.timeago').timeago();
|
||||||
|
|
||||||
|
// Allow the user to click anywhere in the LI
|
||||||
|
listEl.on('click', 'li', function(e) {
|
||||||
|
this.querySelector('a').click();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return Notifications;
|
||||||
|
});
|
@ -0,0 +1,14 @@
|
|||||||
|
<h2>[[notifications:title]]</h2>
|
||||||
|
|
||||||
|
<button type="button" class="btn btn-default">Mark All as Read</button>
|
||||||
|
|
||||||
|
<ul class="notifications-list">
|
||||||
|
<!-- BEGIN notifications -->
|
||||||
|
<li data-nid="{notifications.nid}">
|
||||||
|
<p class="timestamp">
|
||||||
|
<span class="timeago" title="{notifications.datetimeISO}"></span>
|
||||||
|
</p>
|
||||||
|
<a href="..{notifications.path}">{notifications.text}</a>
|
||||||
|
</li>
|
||||||
|
<!-- END notifications -->
|
||||||
|
</ul>
|
Loading…
Reference in New Issue