debian-mirror-gitlab/app/assets/javascripts/group_avatar.js

20 lines
685 B
JavaScript
Raw Normal View History

2017-08-17 22:00:37 +05:30
/* 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-09-13 17:45:13 +05:30
2017-08-17 22:00:37 +05:30
window.GroupAvatar = (function() {
function GroupAvatar() {
$('.js-choose-group-avatar-button').on("click", function() {
var form;
form = $(this).closest("form");
return form.find(".js-group-avatar-input").click();
});
$('.js-group-avatar-input').on("change", function() {
var filename, form;
form = $(this).closest("form");
filename = $(this).val().replace(/^.*[\\\/]/, '');
return form.find(".js-avatar-filename").text(filename);
});
}
2016-09-13 17:45:13 +05:30
2017-08-17 22:00:37 +05:30
return GroupAvatar;
})();