View Issue Details

IDProjectCategoryView StatusLast Update
0021796mantisbtuipublic2017-02-27 03:39
ReportermichaelgAssigned Todregad 
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Product Version2.0.0-beta.3 
Target Version2.2.0Fixed in Version2.2.0 
Summary0021796: inline attachments should be directly visible
Description

Can we make it configurable to have inline pictures expanded directly?
This configurable option should be separated from inline textfiles.

TagsNo tags attached.

Relationships

related to 0021727 closedvboctor Show attachments inline with notes 

Activities

michaelg

michaelg

2017-02-03 13:48

reporter   ~0055479

quick fix is to change in common.js

at line 36
$(document).ready( function() {
//$('.collapse-open').show(); //original line
//$('.collapse-closed').hide();//original line
$('.collapse-open').hide(); // modified line
$('.collapse-closed').show(); // modified line

vboctor

vboctor

2017-02-04 18:12

manager   ~0055492

We have the config option $g_preview_attachments_inline_max_size. We can auto-open attachments that are up to such size. Anything that is larger should be downloaded when the attachment is expanded.

michaelg

michaelg

2017-02-08 03:31

reporter   ~0055575

thanks for answering...

But even if you set $g_preview_attachments_inline_max_size the picture is still collapsed.
That means you spend the bandwidth but still need one more click to see the image.

The request is to have it directly expanded.

didaquis

didaquis

2017-02-08 04:06

reporter   ~0055576

The request is to have it directly expanded

I agree. In my opinion, it would be very useful to display the images directly if the images correspond with values ​​specified in "$g_preview_attachments_inline_max_size".

dregad

dregad

2017-02-08 06:44

developer   ~0055579

display the images directly if the images correspond with values ​​specified in "$g_preview_attachments_inline_max_size".

That would require to expand the section by default in specific cases, which IIRC (it's been a while since I looked at this part of the code) is not feasible with the current API and related javascript.

stohn

stohn

2017-02-08 07:28

reporter   ~0055580

Hi,

I had exact same problem (my testers never noticed the "+" icon to expand the attached images and I'm tired to always explain the same things again and again).

I came up with the following solution for me:

  • patch in "core/print_api.php", function "print_bug_attachment":

$g_collapse_cache_token[$t_collapse_id] = false;

change to

$g_collapse_cache_token[$t_collapse_id] = true;

  • set in config_inc.php:
    $g_preview_attachments_inline_max_size = 2 1024 1024;
    $g_preview_max_width = 250;.
    $g_preview_max_height = 250;

  • install "Lightbox Plugin"

==> Would be nice to have the a global variable to decide if image should be shown collapsed or not.

BTW: Thanks a lot for this great and easy to use software.

Regards,

Maik

dregad

dregad

2017-02-08 11:31

developer   ~0055584

PR https://github.com/mantisbt/mantisbt/pull/1024

Related Changesets

MantisBT: master 41810b2c

2017-02-08 10:54:06

dregad


Committer: vboctor Details Diff
Expand image attachments by default

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 0021796
mod - core/print_api.php Diff File

Issue History

Date Modified Username Field Change
2016-10-12 07:34 michaelg New Issue
2016-10-12 07:34 michaelg Issue generated from: 0021727
2016-10-12 07:34 michaelg Relationship added related to 0021727
2017-02-03 13:48 michaelg Note Added: 0055479
2017-02-04 18:12 vboctor Note Added: 0055492
2017-02-08 03:31 michaelg Note Added: 0055575
2017-02-08 04:06 didaquis Note Added: 0055576
2017-02-08 06:44 dregad Note Added: 0055579
2017-02-08 07:28 stohn Note Added: 0055580
2017-02-08 11:30 dregad Assigned To => dregad
2017-02-08 11:30 dregad Status new => assigned
2017-02-08 11:31 dregad Target Version => 2.2.0
2017-02-08 11:31 dregad Note Added: 0055584
2017-02-20 13:20 vboctor Changeset attached => MantisBT master 41810b2c
2017-02-20 13:20 vboctor Assigned To dregad => vboctor
2017-02-20 13:20 vboctor Status assigned => resolved
2017-02-20 13:20 vboctor Resolution open => fixed
2017-02-20 13:20 vboctor Fixed in Version => 2.2.0
2017-02-20 13:23 vboctor Assigned To vboctor => dregad
2017-02-26 21:17 vboctor Status resolved => closed