Filter button

This commit is contained in:
Michael Schmatz 2014-07-03 10:14:32 -07:00
parent 397140d9b0
commit ed30d3292a
3 changed files with 8 additions and 2 deletions

View file

@ -25,9 +25,13 @@
width: 16%
display: inline-block
vertical-align: top
margin-bottom: 10px
.get-started-button
vertical-align: text-bottom
margin-left: 10px
#filter-button, #create-alert-button
float: right
#tagline, .hiring-call-to-action
width: 100%

View file

@ -83,7 +83,8 @@ block content
br
input(type="checkbox" name="seniorityFilter" value="Management")
| Management
button.btn#filter-button Filter
button.btn#create-alert-button Create Alert
if candidates.length
#candidate-table
table

View file

@ -22,6 +22,7 @@ module.exports = class EmployersView extends View
events:
'click tbody tr': 'onCandidateClicked'
'change #filters input': 'onFilterChanged'
'click #filter-button': 'applyFilters'
constructor: (options) ->
super options
@ -44,7 +45,7 @@ module.exports = class EmployersView extends View
name = input.attr 'name'
if checked
that.filters[name] = _.union that.filters[name], [input.val()]
@applyFilters()
resetFilters: ->
for filterName, filterValues of @filters
@filters[filterName] = []