<commit_before>$(document).ready(function() {
  $("div.elements-list")
  .on("click", "button.button-delete", function() {
    $(this).yesnoDialogRemote({
      topic: $.i18n._('confirmation_elective_block_delete')
    });
    $(this).yesnoDialogRemote("show");
  })
  .on("checkbox-change-state", "button.button-checkbox", function() {
    $(this).toggleClass('button-small-checkbox-selected');
    $(this).next().prop('disabled', !$(this).next().is(":disabled"));
  })
  .on("checkbox-uncheck", "button.button-checkbox", function() {
    $(this).removeClass('button-small-checkbox-selected');
    $(this).next().prop('disabled', true);
  })
  .on("click", "button.button-checkbox", function() {
    $(this).trigger("checkbox-change-state");
  })
  .on("click", "a.button-perform-scheduling", function() {
    if(!$(this).hasClass("disabled")) {
      $(this).yesnoDialogRemote({
        topic: $.i18n._('confirmation_elective_blocks_scheduler'),
        confirmation_action: function() {
          var that = this;
          this.footer.find("button.btn-confirmation").click(function() {
            var ctxt = $("form.elective-blocks-form");
            var form = $("<form method='post'/>");
            form.append($("<input name='_method' >").val(that.element.data("method")))
            .append(ctxt.find("input[name='authenticity_token']"));
            form.prop("action", that.element.prop('href'));
            $("body").append(form);
            form.submit();
          });
        }
      });
      $(this).yesnoDialogRemote("show");
    }
    return false;
  });

  $("button.destroy-all").lazy_form_confirmable_action({
    topic: 'confirmation_elective_blocks_delete',
    success_action: function(obj, key, val) {
      $("#elective-block-"+key).remove();
    }
  });
});<commit_msg>Fix: select all elective blocks button does not work<commit_after>$(document).ready(function() {
  $("div.elements-list")
  .on("click", "button.button-delete", function() {
    $(this).yesnoDialogRemote({
      topic: $.i18n._('confirmation_elective_block_delete')
    });
    $(this).yesnoDialogRemote("show");
  })
  .on("checkbox-change-state", "button.button-checkbox", function() {
    $(this).toggleClass('button-small-checkbox-selected');
    $(this).next().prop('disabled', !$(this).next().is(":disabled"));
  })
  .on("checkbox-uncheck", "button.button-checkbox", function() {
    $(this).removeClass('button-small-checkbox-selected');
    $(this).next().prop('disabled', true);
  })
  .on("click", "button.button-checkbox", function() {
    $(this).trigger("checkbox-change-state");
  })
  .on("click", "a.button-perform-scheduling", function() {
    if(!$(this).hasClass("disabled")) {
      $(this).yesnoDialogRemote({
        topic: $.i18n._('confirmation_elective_blocks_scheduler'),
        confirmation_action: function() {
          var that = this;
          this.footer.find("button.btn-confirmation").click(function() {
            var ctxt = $("form.elective-blocks-form");
            var form = $("<form method='post'/>");
            form.append($("<input name='_method' >").val(that.element.data("method")))
            .append(ctxt.find("input[name='authenticity_token']"));
            form.prop("action", that.element.prop('href'));
            $("body").append(form);
            form.submit();
          });
        }
      });
      $(this).yesnoDialogRemote("show");
    }
    return false;
  });

  $("button.destroy-all").lazy_form_confirmable_action({
    topic: 'confirmation_elective_blocks_delete',
    success_action: function(obj, key, val) {
      $("#elective-block-"+key).remove();
    }
  });
  $("button.select-all").click(function() {
    $("button.button-checkbox", "div.theses-list").trigger("checkbox-change-state");
  });
});
{'fraction_non_alphanumeric': 0.21439915299100054, 'fraction_numerical': 0.0021175224986765486, 'mean_word_length': 3.394186046511628, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5827069', 'n_tokens_mistral': 1161, 'n_tokens_neox': 1157, 'n_words': 139}