PDA

View Full Version : Open attachment in new window


4ice
01-09-2008, 09:11 AM
I noticed that attachments are opened inside/over osTicket. Perhaps it's better to open them in a new window.

For this I changed the code on line 767 from ./include/class.ticket.php into:
$attachstr.= "<a class='Icon file' href='attachment.php?id=$id&ref=$hash' target='_blank'><b>$name</b></a>&nbsp;(<i>$size</i>)&nbsp;&nbsp;";

Maybe there are reasons why it's opened in the same window, but in my case this works better.

4ice
01-09-2008, 09:45 AM
I now also changed the ticket list so that the little paperclip is shown between the checkbox and the ticketnumber.

If someone is interested let me know and I will post the code.

Peter: is this something to add to the project?

peter
01-09-2008, 10:40 AM
Peter: is this something to add to the project?

You mean show hint if the ticket contains an attachment?

4ice
01-09-2008, 10:50 AM
See image:
http://www.4iceproductions.nl/auto/osticket.gif

It's only an extra column with the paperclip in it and a title which says "Contains an attachment". The reason I made it is because I like to know if messages have attachments.

But my first post is about the new window is maybe more important.

DackR
01-09-2008, 10:25 PM
4ice,
I am very interested in seeing that code. I would like to do a similar thing with this post as well:
http://www.osticket.com/forums/showthread.php?p=642#post642