Skip to content
Snippets Groups Projects
Commit 7e40fb07 authored by Jared Hancock's avatar Jared Hancock
Browse files

client: Don't overwrap inline images

parent 41ccaf26
No related branches found
No related tags found
No related merge requests found
...@@ -134,7 +134,7 @@ showImagesInline = function(urls, thread_id) { ...@@ -134,7 +134,7 @@ showImagesInline = function(urls, thread_id) {
var cid = $(el).data('cid').toLowerCase(), var cid = $(el).data('cid').toLowerCase(),
info = urls[cid], info = urls[cid],
e = $(el); e = $(el);
if (info) { if (info && !e.data('wrapped')) {
// Add a hover effect with the filename // Add a hover effect with the filename
var timeout, caption = $('<div class="image-hover">') var timeout, caption = $('<div class="image-hover">')
.css({'float':e.css('float')}); .css({'float':e.css('float')});
...@@ -154,6 +154,7 @@ showImagesInline = function(urls, thread_id) { ...@@ -154,6 +154,7 @@ showImagesInline = function(urls, thread_id) {
.append('<span class="filename">'+info.filename+'</span>') .append('<span class="filename">'+info.filename+'</span>')
.append('<a href="'+info.download_url+'" class="action-button"><i class="icon-download-alt"></i> Download</a>') .append('<a href="'+info.download_url+'" class="action-button"><i class="icon-download-alt"></i> Download</a>')
); );
e.data('wrapped', true);
} }
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment