Opened 2 years ago

Closed 21 months ago

#1487625 closed Feature Requests (fixed)

Attachment preview window

Reported by: lingfude Owned by:
Priority: 5 Milestone: 0.7-beta
Component: Core functionality Version: 0.5-beta
Severity: minor Keywords:
Cc:

Description

Add a config option to enable or disable the preview window when we click in an attachment so we can select between open or save the attachment.

Attachments (6)

main.inc.php (26.0 KB) - added by lingfude 2 years ago.
func.inc (57.1 KB) - added by lingfude 2 years ago.
app.js (168.0 KB) - added by lingfude 2 years ago.
app.js.patch (1.2 KB) - added by lingfude 2 years ago.
func.php.patch (299 bytes) - added by lingfude 2 years ago.
main.inc.patch (338 bytes) - added by lingfude 2 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 2 years ago by alec

  • Milestone changed from 0.5-stable to later

comment:2 Changed 2 years ago by thomasb

  • Severity changed from normal to minor

The preview only opens for file types that can be displayed in a browser (images, pdf, txt, html). You can always download it directly with right-click -> save file as

comment:3 Changed 2 years ago by lingfude

I know that but some webmail users dont.
As the preview window has some problems with PDF files was important that there be this kind of configuration to whom have this kind of problem.

comment:4 Changed 2 years ago by lingfude

This is so hard or complicated to do?
A variable in the configuration file and one condition in the file app.js on " open attachment in frame if it's of a supported mimetype" I think that is enough.

comment:5 Changed 2 years ago by alec

Provide a patch.

comment:6 Changed 2 years ago by lingfude

I do not know to program in PHP or Java but I've tried doing this condition.
The problem is that I do not know how to load the value of a variable from main.inc.php to app.js.
If you can help me with this maybe I can make the patch.

comment:7 Changed 2 years ago by lingfude

I changed the 3 files attached to enable or disable the attachment preview window and it works.

main.inc.php (shearch for "enable or disable attachment preview window")
func.php (search for "set attachment preview window variable")
app.js (search for "if attachment preview window is enable")

If these changes are correct you can implement if you want.

Changed 2 years ago by lingfude

Changed 2 years ago by lingfude

Changed 2 years ago by lingfude

Changed 2 years ago by lingfude

Changed 2 years ago by lingfude

Changed 2 years ago by lingfude

comment:8 Changed 2 years ago by lingfude

Patch to enable or disable attachment preview window.
It's the first time I made a patch hope it's ok.

comment:9 Changed 21 months ago by thomasb

  • Milestone changed from later to 0.7-beta
  • Resolution set to fixed
  • Status changed from new to closed

List of supported mimetypes is configurable since [f7b58afb].

You can set the config option to array() in order to not open the preview window at all.

Note: See TracTickets for help on using tickets.