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