Skip to content

Commit

Permalink
Merge pull request #66 from owncloud/issue-65-hide-icon-on-no-notific…
Browse files Browse the repository at this point in the history
…ations

Hide the bell-icon when there are no notifications so we don't clutte…
  • Loading branch information
nickvergessen committed Feb 24, 2016
2 parents 1bdafa8 + 734edd5 commit 573758f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
// Go!

// Setup elements
this.$notifications = $('<div class="notifications"></div>');
this.$notifications = $('<div class="notifications hidden"></div>');
this.$button = $('<div class="notifications-button menutoggle"><img class="svg" alt="' + t('notifications', 'Notifications') + '" src="' + OC.imagePath('notifications', 'notifications') + '"></div>');
this.$container = $('<div class="notification-container"></div>');
var $wrapper = $('<div class="notification-wrapper"></div>');
Expand Down Expand Up @@ -297,6 +297,8 @@
.animate({opacity: 1}, 600)
.animate({opacity: 0.7}, 600);
this.$container.find('.emptycontent').addClass('hidden');

this.$notifications.removeClass('hidden');
},

/**
Expand All @@ -307,6 +309,8 @@
$('div.notifications-button').removeClass('hasNotifications');
$('div.notifications .emptycontent').removeClass('hidden');
this.$button.find('img').attr('src', OC.imagePath('notifications', 'notifications'));

this.$notifications.addClass('hidden');
},

/**
Expand Down

0 comments on commit 573758f

Please sign in to comment.