summaryrefslogtreecommitdiff
path: root/js/multi-image.js
diff options
context:
space:
mode:
authorSimon McFarlane <simon@piston.pw>2015-05-26 23:31:47 -0700
committerSimon McFarlane <simon@piston.pw>2015-05-29 01:34:53 -0700
commit4b40f69a4e6d190f6d342875bd084c2a6c9d8b0f (patch)
treefcc5dc9efa24afcb0bda3740b59f0c4e81c42f62 /js/multi-image.js
parent2ac451ecb7aaae1ed1402425b8df6a5cb9831f2b (diff)
parentd20149b57929c27da87a7d9603d85717da15c5bc (diff)
Merge remote-tracking branch 'upstream/master' into vichan-merge
Diffstat (limited to 'js/multi-image.js')
-rw-r--r--js/multi-image.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/multi-image.js b/js/multi-image.js
index 32d1f256..db4c6bd2 100644
--- a/js/multi-image.js
+++ b/js/multi-image.js
@@ -18,7 +18,12 @@ function multi_image() {
var images_len = $('form:not([id="quick-reply"]) [type=file]').length;
if (!(images_len >= max_images)) {
- $('.add_image').after('<br class="file_separator"/><input type="file" name="file'+(images_len+1)+'" id="upload_file'+(images_len+1)+'">');
+ var new_file = '<br class="file_separator"/><input type="file" name="file'+(images_len+1)+'" id="upload_file'+(images_len+1)+'">';
+
+ $('[type=file]:last').after(new_file);
+ if ($("#quick-reply").length) {
+ $('form:not(#quick-reply) [type=file]:last').after(new_file);
+ }
if (typeof setup_form !== 'undefined') setup_form($('form[name="post"]'));
}
})