mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-04 17:19:47 -04:00
Fix course progress tab select
This commit is contained in:
parent
dfcbbb7c9c
commit
7d1d1500d9
1 changed files with 7 additions and 0 deletions
|
@ -41,6 +41,7 @@ module.exports = class TeacherClassView extends RootView
|
|||
'click .select-all': 'onClickSelectAll'
|
||||
'click .student-checkbox': 'onClickStudentCheckbox'
|
||||
'keyup #student-search': 'onKeyPressStudentSearch'
|
||||
'change .course-select, .bulk-course-select': 'onChangeCourseSelect'
|
||||
|
||||
getInitialState: ->
|
||||
{
|
||||
|
@ -149,6 +150,8 @@ module.exports = class TeacherClassView extends RootView
|
|||
@listenTo @students, 'sort', ->
|
||||
@state.set students: @students
|
||||
@render()
|
||||
@listenTo @, 'course-select:change', ({ selectedCourse }) ->
|
||||
@state.set selectedCourse: selectedCourse
|
||||
|
||||
setCourseMembers: =>
|
||||
for course in @courses.models
|
||||
|
@ -273,6 +276,10 @@ module.exports = class TeacherClassView extends RootView
|
|||
onKeyPressStudentSearch: (e) ->
|
||||
@state.set('searchTerm', $(e.target).val())
|
||||
|
||||
onChangeCourseSelect: (e) ->
|
||||
console.log '??'
|
||||
@trigger 'course-select:change', { selectedCourse: @courses.get($(e.currentTarget).val()) }
|
||||
|
||||
getSelectedStudentIDs: ->
|
||||
@$('.student-row .checkbox-flat input:checked').map (index, checkbox) ->
|
||||
$(checkbox).data('student-id')
|
||||
|
|
Loading…
Add table
Reference in a new issue