Merge pull request #180 from matthojo/Notification-Dismissal

Notifications can now be dismissed via click / tap
This commit is contained in:
Hannah Wolfe 2013-06-19 14:23:58 -07:00
commit 5cb2f60cc5
3 changed files with 10 additions and 5 deletions

View File

@ -28,6 +28,11 @@
});
// Allow notifications to be dismissed
$(document).on('click', '.js-notification .close', function () {
$(this).parent().fadeOut(200, function () { $(this).remove(); });
});
$(document).ready(function () {
// ## Set interactions for all menus

View File

@ -861,7 +861,7 @@ nav {
};
display: inline-block;
color: rgba(255,255,255,0.6);
cursor: pointer;
&:hover { color: #fff; }
}

View File

@ -1,24 +1,24 @@
{{#if messages}}
{{#each messages.error}}
<section class="notification-error">
<section class="notification-error js-notification">
{{.}}
<a class="close" href="#"><span class="hidden">Close</span></a>
</section>
{{/each}}
{{#each messages.success}}
<section class="notification-success">
<section class="notification-success js-notification">
{{.}}
<a class="close" href="#"><span class="hidden">Close</span></a>
</section>
{{/each}}
{{#each messages.warn}}
<section class="notification-alert">
<section class="notification-alert js-notification">
{{.}}
<a class="close" href="#"><span class="hidden">Close</span></a>
</section>
{{/each}}
{{#each messages.info}}
<section class="notification">
<section class="notification js-notification">
{{.}}
<a class="close" href="#"><span class="hidden">Close</span></a>
</section>