<commit_before>#= require jquery
#= require jquery_ujs
#= require popper
#= require bootstrap-sprockets
#= require dropzone
#= require cocoon
#= require redactor

#= require folio/console/tagsinput/tagsinput

#= require ./redactor-init
#= require ./redactor-imagemanager
#= require ./nodes
#= require ./files

$ ->
  # disable auto discover
  Dropzone.autoDiscover = false

  $(document).on 'change', '#filter-form', ->
    $(this).submit()

  $(document).on 'click', '.btn.position-up', ->
    $this_atom = $(this).closest('.nested-fields')
    $that_atom = $this_atom.prevAll(".nested-fields:first")

    pos = $this_atom.find('.position').val()
    $that_atom.find('.position').val(pos)
    $this_atom.find('.position').val(pos - 1)
    $this_atom.after($that_atom)

  $(document).on 'click', '.btn.position-down', ->
    $this_atom = $(this).closest('.nested-fields')
    $that_atom = $this_atom.nextAll(".nested-fields:first")

    pos = $that_atom.find('.position').val()
    $this_atom.find('.position').val(pos)
    $that_atom.find('.position').val(pos - 1)
    $that_atom.after($this_atom)

  $(document).on 'cocoon:after-insert', (e, insertedItem) ->
    pos = +$(insertedItem).prevAll(".nested-fields:first").find('.position').val()
    $(insertedItem).find('.position').val(pos + 1)
    $(insertedItem).find('.redactor').each ->
      $(this).redactor()
<commit_msg>F dropzone js error<commit_after>#= require jquery
#= require jquery_ujs
#= require popper
#= require bootstrap-sprockets
#= require dropzone


#= require cocoon
#= require redactor

#= require folio/console/tagsinput/tagsinput

#= require ./redactor-init
#= require ./redactor-imagemanager

$ ->
  # disable auto discover
  Dropzone.autoDiscover = false

#= require ./nodes
#= require ./files

$ ->
  $(document).on 'change', '#filter-form', ->
    $(this).submit()

  $(document).on 'click', '.btn.position-up', ->
    $this_atom = $(this).closest('.nested-fields')
    $that_atom = $this_atom.prevAll(".nested-fields:first")

    pos = $this_atom.find('.position').val()
    $that_atom.find('.position').val(pos)
    $this_atom.find('.position').val(pos - 1)
    $this_atom.after($that_atom)

  $(document).on 'click', '.btn.position-down', ->
    $this_atom = $(this).closest('.nested-fields')
    $that_atom = $this_atom.nextAll(".nested-fields:first")

    pos = $that_atom.find('.position').val()
    $this_atom.find('.position').val(pos)
    $that_atom.find('.position').val(pos - 1)
    $that_atom.after($this_atom)

  $(document).on 'cocoon:after-insert', (e, insertedItem) ->
    pos = +$(insertedItem).prevAll(".nested-fields:first").find('.position').val()
    $(insertedItem).find('.position').val(pos + 1)
    $(insertedItem).find('.redactor').each ->
      $(this).redactor()

{'fraction_non_alphanumeric': 0.20613718411552345, 'fraction_numerical': 0.0021660649819494585, 'mean_word_length': 4.001805054151625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 16, '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': '5004661', 'n_tokens_mistral': 957, 'n_tokens_neox': 930, 'n_words': 143}