Sha256: 357116a2d8030736143f558f616deb9037b03f321b8eb7fa7e60ca1d33c4e14a

Contents?: true

Size: 432 Bytes

Versions: 11

Compression:

Stored size: 432 Bytes

Contents

$('#students-checked').html('<%= j render(partial: "selected_student", collection: @selection, as: :student) %>');
$('.chosen-count').html('<%= "(#{@selection.size})" %>');

var selection = JSON.parse(("<%=j @selection.pluck(:id).to_json %>"))

$.each(selection, function(index, student_id){
  $(".student-check#student-" + student_id).prop('checked', true)
});

if(selection.length > 0) { $('#students-checked-div').slideDown(); }

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
gaku_frontend-0.3.0.pre.0 app/views/gaku/student_selection/index.js.erb
gaku-0.2.4 frontend/app/views/gaku/student_selection/index.js.erb
gaku_frontend-0.2.4 app/views/gaku/student_selection/index.js.erb
gaku-0.2.3 frontend/app/views/gaku/student_selection/index.js.erb
gaku_frontend-0.2.3 app/views/gaku/student_selection/index.js.erb
gaku-0.2.2 frontend/app/views/gaku/student_selection/index.js.erb
gaku_frontend-0.2.2 app/views/gaku/student_selection/index.js.erb
gaku-0.2.1 frontend/app/views/gaku/student_selection/index.js.erb
gaku_frontend-0.2.1 app/views/gaku/student_selection/index.js.erb
gaku-0.2.0 frontend/app/views/gaku/student_selection/index.js.erb
gaku_frontend-0.2.0 app/views/gaku/student_selection/index.js.erb