<commit_before>$('#move_friends_link').live( 'click', function(){
  $.post('/groups/move_friends',
    { 'moves' : $('#group_list').data() },
    function(){ $('#group_title').html("Groups edited successfully!");});

  $(".person").css('background-color','white');
  $('#group_list').removeData();
  $(".person").attr('from_group_id', function(){return $(this).parent().attr('id')})

});

$(function() {
  $("li .person").draggable({
    revert: true
  });
  
  $(".group ul").droppable({
    drop: function(event, ui) {
      if (ui.draggable[0].getAttribute('request_id') != null){
      $.ajax({
        type: "DELETE",
        url: "/requests/" + ui.draggable[0].getAttribute('request_id') ,
        data: {"accept" : {"group_id" : $(this)[0].id }}
      });
      alert("Sent the ajax, check it out!")
      }
      var move = {};
      move[ 'friend_id' ] = ui.draggable[0].id
      move[ 'to' ] = $(this)[0].id;
      move[ 'from' ] = ui.draggable[0].getAttribute('from_group_id');
      if (move['to'] == move['from']){
        $('#group_list').data( ui.draggable[0].id, []);
        ui.draggable.css('background-color','white');
      } else {
        $('#group_list').data( ui.draggable[0].id, move);
        ui.draggable.css('background-color','orange');
      }
      $(this).closest("ul").append(ui.draggable);
    }
  });
});

$(".group h3").live( 'click', function() {

  var $this = $(this);
  var id    = $this.closest("li").children("ul").attr("id");
  var link  = "/groups/"+ id;

  $this.keypress(function(e) {
    if (e.which == 13) {
      e.preventDefault();
      $this.blur();
<commit_msg>the acceptance now works need to do the ignores and unfriend bucket<commit_after>$('#move_friends_link').live( 'click', function(){
  $.post('/groups/move_friends',
    { 'moves' : $('#group_list').data() },
    function(){ $('#group_title').html("Groups edited successfully!");});

  $(".person").css('background-color','white');
  $('#group_list').removeData();
  $(".person").attr('from_group_id', function(){return $(this).parent().attr('id')})

});

$(function() {
  $("li .person").draggable({
    revert: true
  });
  
  $(".group ul").droppable({
    drop: function(event, ui) {
      if (ui.draggable[0].getAttribute('request_id') != null){
      $.ajax({
        type: "DELETE",
        url: "/requests/" + ui.draggable[0].getAttribute('request_id') ,
        data: {"accept" : true  , "group_id" : $(this)[0].id }
      });
      alert("Sent the ajax, check it out!")
      }
      var move = {};
      move[ 'friend_id' ] = ui.draggable[0].id
      move[ 'to' ] = $(this)[0].id;
      move[ 'from' ] = ui.draggable[0].getAttribute('from_group_id');
      if (move['to'] == move['from']){
        $('#group_list').data( ui.draggable[0].id, []);
        ui.draggable.css('background-color','white');
      } else {
        $('#group_list').data( ui.draggable[0].id, move);
        ui.draggable.css('background-color','orange');
      }
      $(this).closest("ul").append(ui.draggable);
    }
  });
});

$(".group h3").live( 'click', function() {

  var $this = $(this);
  var id    = $this.closest("li").children("ul").attr("id");
  var link  = "/groups/"+ id;

  $this.keypress(function(e) {
    if (e.which == 13) {
      e.preventDefault();
      $this.blur();

{'fraction_non_alphanumeric': 0.24604622871046228, 'fraction_numerical': 0.006690997566909975, 'mean_word_length': 3.1475409836065573, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2209265', 'n_tokens_mistral': 1141, 'n_tokens_neox': 1133, 'n_words': 186}