Merge pull request #119 from mmn/mimetype_for_attachment_identification_fix

$.inArray(...) was always evaluated as true
This commit is contained in:
Hannes Mannerheim 2015-02-24 22:23:21 +01:00
commit e6ee9e0752

View File

@ -945,7 +945,7 @@ function expand_queet(q,doScrolling) {
// attachments in the content link to /attachment/etc url and not direct to image/video, link is in title
if(typeof attachment_title != 'undefined') {
// images
if($.inArray(attachment_mimetype, ['image/gif', 'image/jpeg', 'image/png'])) {
if($.inArray(attachment_mimetype, ['image/gif', 'image/jpeg', 'image/png']) >= 0) {
if(q.children('.queet').find('.expanded-content').children('.media').children('a[href="' + attachment_title + '"]').length < 1) { // not if already showed
// local attachment with a thumbnail