<commit_before>$ = jQuery

$ ->
  # Activate pickadate
  $('#track_start_date').pickadate({ format: "yyyy-mm-dd" })
  $('#track_end_date').pickadate({ format: "yyyy-mm-dd" })
  $('#track_start_time').pickatime({format: 'hh:i a'})
  $('#track_end_time').pickatime({format: 'hh:i a'})

  if $('#track').length && Curri.user.classrole_type == 'Teacher'
    # Delete Checkpoints
    $('.expectation-actions .trash-icon').on "ajax:success", (e, data)->
      Curri.Checkpoint.remove(data.id)

    # Checkpoints sort
    Curri.Checkpoint.sortable()

  if $('.tracks').length && Curri.user.classrole_type == 'Teacher'
    $('.tracks').sortable
      items: "> div.grid-unit"
      handle: '.unit-header'
      cursor: 'move'
      placeholder: "track-drop-highlight"
      start: (e, ui) ->
        ui.placeholder.height(ui.item.height())
        ui.placeholder.width(ui.item.width())
        $(ui.placeholder).addClass("grid-unit narrow")
      update: ->
        $.post($(this).data('url'), $(this).sortable('serialize'))

  editor = new wysihtml5.Editor("wysihtml5-textarea", { toolbar: "wysihtml5-toolbar", parserRules: wysihtml5ParserRules })<commit_msg>fix js bugs related to html5editor<commit_after>$ = jQuery

$ ->
  if Curri.user.classrole_type == 'Teacher'
    if $('#track').length
      # Delete Checkpoints
      $('.expectation-actions .trash-icon').on "ajax:success", (e, data)->
        Curri.Checkpoint.remove(data.id)

      # Checkpoints sort
      Curri.Checkpoint.sortable()

    if $('.tracks').length
      $('.tracks').sortable
        items: "> div.grid-unit"
        handle: '.unit-header'
        cursor: 'move'
        placeholder: "track-drop-highlight"
        start: (e, ui) ->
          ui.placeholder.height(ui.item.height())
          ui.placeholder.width(ui.item.width())
          $(ui.placeholder).addClass("grid-unit narrow")
        update: ->
          $.post($(this).data('url'), $(this).sortable('serialize'))

    if $('.new_track').length || $('.edit_track').length
      $('#track_start_date').pickadate({ format: "yyyy-mm-dd" })
      $('#track_end_date').pickadate({ format: "yyyy-mm-dd" })
      $('#track_start_time').pickatime({format: 'hh:i a'})
      $('#track_end_time').pickatime({format: 'hh:i a'})
      editor = new wysihtml5.Editor("wysihtml5-textarea", { toolbar: "wysihtml5-toolbar", parserRules: wysihtml5ParserRules })
{'fraction_non_alphanumeric': 0.1950294860994103, 'fraction_numerical': 0.0037910699241786015, 'mean_word_length': 3.2562724014336917, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '1207843', 'n_tokens_mistral': 805, 'n_tokens_neox': 780, 'n_words': 127}