gitlab-org--gitlab-foss/app/assets/javascripts/group_avatar.js.coffee
2014-10-21 10:46:55 +02:00

9 lines
378 B
CoffeeScript

class @GroupAvatar
constructor: ->
$('.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(/^.*[\\\/]/, '')
form.find(".js-avatar-filename").text(filename)