diff options
Diffstat (limited to 'js')
| -rw-r--r-- | js/inline-expanding.js | 3 | ||||
| -rw-r--r-- | js/multi-image.js | 3 | ||||
| -rw-r--r-- | js/post-hover.js | 1 | ||||
| -rw-r--r-- | js/upload-selection.js | 10 |
4 files changed, 12 insertions, 5 deletions
diff --git a/js/inline-expanding.js b/js/inline-expanding.js index 5bbfa0a0..4cf5a82d 100644 --- a/js/inline-expanding.js +++ b/js/inline-expanding.js @@ -48,7 +48,8 @@ onready(function(){ delete this.style.filter; } } else { - this.parentNode.style.width = (parseInt(this.dataset.width)+40)+'px'; + if (~this.parentNode.className.indexOf('multifile')) + this.parentNode.style.width = (parseInt(this.dataset.width)+40)+'px'; this.childNodes[0].src = this.dataset.src; this.childNodes[0].style.width = this.dataset.width; this.childNodes[0].style.height = this.dataset.height; diff --git a/js/multi-image.js b/js/multi-image.js index 5866e2e4..32d1f256 100644 --- a/js/multi-image.js +++ b/js/multi-image.js @@ -14,12 +14,11 @@ function multi_image() { $(document).on('click', 'a.add_image', function(e) { e.preventDefault(); - $('#upload_url').remove(); var images_len = $('form:not([id="quick-reply"]) [type=file]').length; if (!(images_len >= max_images)) { - $('.add_image').after('<br/><input type="file" name="file'+(images_len+1)+'" id="upload_file'+(images_len+1)+'">'); + $('.add_image').after('<br class="file_separator"/><input type="file" name="file'+(images_len+1)+'" id="upload_file'+(images_len+1)+'">'); if (typeof setup_form !== 'undefined') setup_form($('form[name="post"]')); } }) diff --git a/js/post-hover.js b/js/post-hover.js index 4a86cba0..2808b8e7 100644 --- a/js/post-hover.js +++ b/js/post-hover.js @@ -66,6 +66,7 @@ onready(function(){ var $newPost = $post.clone(); $newPost.find('>.reply, >br').remove(); $newPost.find('span.mentioned').remove(); + $newPost.find('a.post_anchor').remove(); $newPost .attr('id', 'post-hover-' + id) diff --git a/js/upload-selection.js b/js/upload-selection.js index 80dd0eaf..e2032748 100644 --- a/js/upload-selection.js +++ b/js/upload-selection.js @@ -20,11 +20,16 @@ $(function(){ var disable_all = function() { $("#upload").hide(); - $("#upload_file").hide(); + $("[id^=upload_file]").hide(); + $(".file_separator").hide(); $("#upload_url").hide(); $("#upload_embed").hide(); $(".add_image").hide(); + $('[id^=upload_file]').each(function(i, v) { + $(v).val(''); + }); + if (enabled_oekaki) { if (window.oekaki.initialized) { window.oekaki.deinit(); @@ -35,7 +40,8 @@ $(function(){ enable_file = function() { disable_all(); $("#upload").show(); - $("#upload_file").show(); + $(".file_separator").show(); + $("[id^=upload_file]").show(); $(".add_image").show(); }; |
