mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Filter button
This commit is contained in:
parent
397140d9b0
commit
ed30d3292a
3 changed files with 8 additions and 2 deletions
|
@ -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%
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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] = []
|
||||
|
|
Loading…
Reference in a new issue