diff options
author | Steven Thonus <steven@ln2.nl> | 2014-01-28 01:34:05 +0400 |
---|---|---|
committer | Steven Thonus <steven@ln2.nl> | 2014-01-28 11:38:00 +0400 |
commit | 251df827a5308d483a95242970569075ab655703 (patch) | |
tree | 00872b5ebaf24ca6c4e964172f59a8380c55d096 /app/assets | |
parent | 5221dbfee74e48f379bc06b2848a64243a76270c (diff) |
added group avatars
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/images/no_group_avatar.png | bin | 0 -> 704 bytes | |||
-rw-r--r-- | app/assets/javascripts/groups.js.coffee | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/app/assets/images/no_group_avatar.png b/app/assets/images/no_group_avatar.png Binary files differnew file mode 100644 index 00000000000..dac3ab1bb89 --- /dev/null +++ b/app/assets/images/no_group_avatar.png diff --git a/app/assets/javascripts/groups.js.coffee b/app/assets/javascripts/groups.js.coffee index c0ffccd8f70..7850eb14e74 100644 --- a/app/assets/javascripts/groups.js.coffee +++ b/app/assets/javascripts/groups.js.coffee @@ -4,3 +4,14 @@ class GroupMembers $(this).fadeOut() @GroupMembers = GroupMembers + +$ -> + # 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(/^.*[\\\/]/, '') + form.find(".js-avatar-filename").text(filename)
\ No newline at end of file |