Replaced `this` with `@` in the coffee file and added an arrow that clearly marks the Notifications button as a drop down

This commit is contained in:
Patricio Cano 2015-09-14 20:50:13 -05:00
parent 01cc20378b
commit fa6df2228e
2 changed files with 4 additions and 3 deletions

View File

@ -27,8 +27,8 @@ class @Project
$('.update-notification').on 'click', (e) ->
e.preventDefault()
level = $(this).data('notification-level')
level = $(@).data 'notification-level'
$('#notification_level').val(level)
$('#notification-form').submit()
$(this).parents('ul').find('li.active').removeClass('active')
$(this).parent().addClass('active')
$(@).parents('ul').find('li.active').removeClass 'active'
$(@).parent().addClass 'active'

View File

@ -7,6 +7,7 @@
%a.dropdown-toggle.btn.btn-new{href: '#', "data-toggle" => "dropdown"}
= icon('bell')
Notifications
= icon('angle-down')
%ul.dropdown-menu.dropdown-menu-right.project-home-dropdown
- Notification.notification_levels.each do |level|
= notification_list_item(level, @membership)