Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select all button #7527

Merged
merged 3 commits into from
Oct 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion app/assets/javascripts/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,15 @@
$('.node-type-' + type).prop('checked', checked);

}

$('.node-type').change(function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be after the .node-type(in the same block). They are both related to checking/unchecking boxes functionality.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@keshavsethi kindly reply

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I will make changes.

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