2017-01-10 18:02:20 -05:00
|
|
|
/* eslint-disable func-names, space-before-function-paren, wrap-iife, quotes, no-var, one-var, one-var-declaration-per-line, no-useless-escape, max-len */
|
2016-07-24 16:45:11 -04:00
|
|
|
(function() {
|
|
|
|
this.GroupAvatar = (function() {
|
|
|
|
function GroupAvatar() {
|
2017-01-21 23:09:08 -05:00
|
|
|
$('.js-choose-group-avatar-button').on("click", function() {
|
2016-07-24 16:45:11 -04:00
|
|
|
var form;
|
|
|
|
form = $(this).closest("form");
|
|
|
|
return form.find(".js-group-avatar-input").click();
|
|
|
|
});
|
2017-01-21 23:09:08 -05:00
|
|
|
$('.js-group-avatar-input').on("change", function() {
|
2016-07-24 16:45:11 -04:00
|
|
|
var filename, form;
|
|
|
|
form = $(this).closest("form");
|
|
|
|
filename = $(this).val().replace(/^.*[\\\/]/, '');
|
|
|
|
return form.find(".js-avatar-filename").text(filename);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
return GroupAvatar;
|
|
|
|
})();
|
|
|
|
}).call(this);
|