Skip to content

Commit

Permalink
Expand image attachments by default
Browse files Browse the repository at this point in the history
If an attachment of type image is smaller than the maximum preview
threshold ($g_preview_attachments_inline_max_size), Mantis was only
displaying the attachment's name and a [+] button, forcing an extra
click for the user to view it.

We now display images by default, allowing the user to optionally hide
them instead by clicking the [-] button.

Fixes #21796
  • Loading branch information
dregad authored and vboctor committed Feb 20, 2017
1 parent 17366ae commit 41810b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/print_api.php
Expand Up @@ -1903,7 +1903,7 @@ function print_bug_attachment( array $p_attachment, $p_security_token ) {
if( $t_show_attachment_preview ) {
$t_collapse_id = 'attachment_preview_' . $p_attachment['id'];
global $g_collapse_cache_token;
$g_collapse_cache_token[$t_collapse_id] = false;
$g_collapse_cache_token[$t_collapse_id] = $p_attachment['type'] == 'image';
collapse_open( $t_collapse_id );
}

Expand Down

0 comments on commit 41810b2

Please sign in to comment.