|
31 | 31 | if ({{ S_IMCGER_FANCYBOX_VERSION > 2 ? 1 : 0 }}) {
|
32 | 32 | link.attr('data-fancybox', attach_id);
|
33 | 33 | link.attr('data-caption', real_filename);
|
34 |
| - } |
35 |
| - else { |
| 34 | + } else if ({{ S_LIGHTBOX_ALL_IMAGES || LIGHTBOX_RESIZE_WIDTH || LIGHTBOX_RESIZE_HEIGHT ? 1 : 0 }}) { |
| 35 | + // If LightBox aktive add LightBox attribut to the link |
| 36 | + link.attr('data-lightbox', attach_id); |
| 37 | + link.attr('data-title', real_filename); |
| 38 | + } else { |
36 | 39 | // Do nothing wenn click on image
|
37 | 40 | link.attr('onclick', 'return false;');
|
38 | 41 | }
|
|
44 | 47 | * Update the relevant elements and hidden data for an attachment.
|
45 | 48 | *
|
46 | 49 | * @param {int} index The index from phpbb.plupload.ids of the attachment to edit.
|
47 |
| - * @param {Array} downloadUrl Optional array of download urls to update. |
| 50 | + * @param {array} downloadUrl Optional array of download urls to update. |
48 | 51 | */
|
49 | 52 | phpbb.plupload.updateRow = function(index, downloadUrl) {
|
50 | 53 | const allowedExt = [{{ IUL_ALLOWED_IMAGES }}];
|
|
58 | 61 | let url = downloadUrl[index].replace('&', '&'),
|
59 | 62 | link = $('<a></a>');
|
60 | 63 |
|
61 |
| - // If image add thumbnail to the link |
62 | 64 | if (isImg) {
|
| 65 | + // If image add thumbnail to the link |
63 | 66 | link.attr('href', url).html('<img src="' + url + '&t=1" title="' + attach.real_filename + '" alt="' + attach.real_filename + '">');
|
64 | 67 |
|
65 | 68 | // If FancyBox aktive add FancyBox attribut to the link
|
66 | 69 | if ({{ S_IMCGER_FANCYBOX_VERSION > 2 ? 1 : 0 }}) {
|
67 | 70 | link.attr('data-fancybox', attach.attach_id);
|
68 | 71 | link.attr('data-caption', attach.real_filename);
|
69 |
| - } |
70 |
| - else { |
| 72 | + } else if ({{ S_LIGHTBOX_ALL_IMAGES || LIGHTBOX_RESIZE_WIDTH || LIGHTBOX_RESIZE_HEIGHT ? 1 : 0 }}) { |
| 73 | + // If LightBox aktive add LightBox attribut to the link |
| 74 | + link.attr('data-lightbox', attach.attach_id); |
| 75 | + link.attr('data-title', attach.real_filename); |
| 76 | + } else { |
71 | 77 | // Do nothing wenn click on image
|
72 | 78 | link.attr('onclick', 'return false;');
|
73 | 79 | }
|
74 |
| - } |
75 |
| - else { |
| 80 | + } else { |
76 | 81 | link.attr('href', url).html(attach.real_filename);
|
77 | 82 | }
|
78 | 83 |
|
|
0 commit comments