Author Topic: opening pdf attachments bug?  (Read 5008 times)

Offline jan.gestre

  • Jr. Member
  • **
  • Posts: 51
opening pdf attachments bug?
« on: November 04, 2006, 08:42:17 AM »
i'm using version 360, i noticed that clicking the pdf attachment will just open another window/tab of the inbox, i need to right click the attachment and use the open in another tab shortcut of the browser just to be able to see the pdf attachment, anybody experienced this bug? i'm using firefox 2.0

Offline marin

  • Jr. Member
  • **
  • Posts: 17
Re: opening pdf attachments bug?
« Reply #1 on: November 04, 2006, 11:01:02 AM »
Hi there,
this happens not only with PDF, but with TXT, image files etc.
It has something to do with the "onclick" js action specified in show.inc (program/steps/mail/show.inc) where attachments list is generated and displayed.
What I did to solve the situation was to create a fixed url containing index.php in front of ?_task... etc and remove the onclick attribute of the tag. I did also add target="_blank", so the attachment is opened in new window (or tab).
Dont forget to comment the relevant strings in the sprintf() function creating the
too :)

Could someone please explain whats all this JS there about, with MIME types etc ? So far the browsers seem intelligent enough to handle all attachments pretty well without the JS?

PS I'm at home right now and feel quite lazy, if you can't make it with these directions (after trying ofcourse ) I could paste some text here too... :)

Offline telefunken

  • Newbie
  • *
  • Posts: 2
Re: opening pdf attachments bug?
« Reply #2 on: November 04, 2006, 01:15:21 PM »
Change app.js
line 635 replace
Code: [Select]
    this.attachment_win = window.open(this.env.comm_path+'&_action=get'+url+'&_frame=1', 'rcubemailattachment');
with
Code: [Select]
    this.attachment_win = window.open(this.env.comm_path+'&_action=get&'+qstring+'&_frame=1', 'rcubemailattachment');