 
     # ckeditor
 
-    $('[data-richtext=ckeditor]').each ->
+    $('form [data-richtext=ckeditor]').each ->
       window.CKEDITOR_BASEPATH = '/assets/ckeditor/'
       options = $(this).data('options')
       if not window.CKEDITOR


    # datetime

    $('[data-datetimepicker]').each ->
      $(this).datetimepicker $(this).data('options')

    # enumeration

    $('[data-enumeration]').each ->
      $(this).filteringSelect $(this).data('options')

    # fileupload

    $('[data-fileupload]').each ->
      input = this
      $(this).find(".delete input[type='checkbox']").live 'click', ->
        $(input).children('.toggle').toggle('slow')

    # filtering-multiselect

    $('[data-filteringmultiselect]').each ->
      $(this).filteringMultiselect $(this).data('options')
      if $(this).parents("#modal").length # hide link if we already are inside a dialog (endless issues on nested dialogs with JS)
        $(this).parents('.control-group').find('.btn').remove()


    # colorpicker

    $('form [data-color]').each ->
      that = this
      $(this).ColorPicker
        color: $(that).val()
