BigW Consortium Gitlab

groups.js.coffee 484 Bytes
Newer Older
1 2 3 4 5 6
class GroupMembers
  constructor: ->
    $('li.users_group').bind 'ajax:success', ->
      $(this).fadeOut()

@GroupMembers = GroupMembers
Steven Thonus committed
7 8 9 10 11 12 13 14 15 16

$ ->
  # avatar
  $('.js-choose-group-avatar-button').bind "click", ->
    form = $(this).closest("form")
    form.find(".js-group-avatar-input").click()

  $('.js-group-avatar-input').bind "change", ->
    form = $(this).closest("form")
    filename = $(this).val().replace(/^.*[\\\/]/, '')
17
    form.find(".js-avatar-filename").text(filename)