const select_all = function () {
  var scope = this.dataset.scope || "body";
  // find all the enabled, unchecked checkboxes and select them
  // fire the change event on them, to allow other js code to pick up that they have changed
  $(scope).find('input[type="checkbox"]:enabled:not(:checked)').prop("checked", true).trigger("change");