Only show "mark all as read" if min. one notification is available.

This commit is contained in:
Martin Edenhofer 2015-06-21 19:46:44 +02:00
parent 52d1edea9f
commit 59a4050838

View file

@ -118,6 +118,12 @@ class App.OnlineNotificationWidget extends App.Controller
App.i18n.translateInline( 'Notifications' ) + " <span class='popover-notificationsCounter'>#{counter}</span>" App.i18n.translateInline( 'Notifications' ) + " <span class='popover-notificationsCounter'>#{counter}</span>"
) )
# show mark all as read if needed
if counter is 0
$('.js-notificationsContainer .js-markAllAsRead').addClass('hidden')
else
$('.js-notificationsContainer .js-markAllAsRead').removeClass('hidden')
# update content # update content
items = @prepareForObjectList(items) items = @prepareForObjectList(items)
$('.js-notificationsContainer .popover-content').html( $('.js-notificationsContainer .popover-content').html(