diff --git a/js/util.js b/js/util.js index 15bff959ee..b645e8b029 100644 --- a/js/util.js +++ b/js/util.js @@ -848,27 +848,29 @@ var SN = { // StatusNet NDA.change(function (event) { form.find('.attach-status').remove(); - var filename = $(this).val(); - if (!filename) { - // No file -- we've been tricked! - return false; - } - - var attachStatus = $('
' + file.name + '
'));
var img = $('')
.attr('title', tooltip)
.attr('alt', tooltip)
.attr('src', url)
.attr('style', 'height: 120px');
- form.find('.attach-status').append(img);
+ fileentry.append(img);
+ form.find('.attach-status').append(fileentry);
});
} else {
var img = $('').text(tooltip);