Skip to content

Commit

Permalink
select all button (publiclab#7527)
Browse files Browse the repository at this point in the history
* select all

* select all updated

* select all
  • Loading branch information
keshavsethi authored and alvesitalo committed Oct 14, 2020
1 parent 3bb3dae commit fba3a33
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/assets/javascripts/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,15 @@ function listselect(){
$('.node-type-' + type).prop('checked', checked);

}

$('.node-type').change(function () {
var check = ($('.node-type').filter(":checked").length == $('.node-type').length);
$('.node-type-all').prop("checked", check);
});


$('.node-type-all').click(function () {
$('.node-type').prop('checked', this.checked);
});
// if all checked?
var checked_array = $(".node-type").map(function(i, el) { return $(el).prop('checked'); });

Expand Down

0 comments on commit fba3a33

Please sign in to comment.