From e42ffb27684e159473320c512052246f081d04f0 Mon Sep 17 00:00:00 2001 From: marktaiwan Date: Fri, 20 Mar 2015 12:48:32 +0800 Subject: [PATCH] fix file selector element reference fix thumbnail image not applying to main form with quick reply open --- js/file-selector.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js/file-selector.js b/js/file-selector.js index 6a7e6773..9869e347 100644 --- a/js/file-selector.js +++ b/js/file-selector.js @@ -59,9 +59,7 @@ function addThumb(file) { var fileName = (file.name.length < 24) ? file.name : file.name.substr(0, 22) + '…'; var fileType = file.type.split('/')[0]; var fileExt = file.type.split('/')[1]; - var $container = $('
'); - - $container + var $container = $('
') .addClass('tmb-container') .data('file-ref', file) .append( @@ -69,7 +67,7 @@ function addThumb(file) { $('
').addClass('file-tmb'), $('
').addClass('tmb-filename').html(fileName) ) - .appendTo($('.file-thumbs')); + .appendTo('.file-thumbs'); var $fileThumb = $container.find('.file-tmb'); if (fileType == 'image') {