Making Attachments Open in a New Window

Hello,

I have recently installed and begun configuring RT 4.0.7. However, try as I might, I have not yet figured out how to get attachments to open in a new window (or tab). I have followed another article (from around 2004) that has you modify the “ShowAttachment” and “Show Transactions” (actually now appears to be called “ShowTransactionAttachment” but it does not appear that this works.

Does anyone have any ideas?

Thanks!
Dan

Hello,

I have recently installed and begun configuring RT 4.0.7. However, try
as I might, I have not yet figured out how to get attachments to open in
a new window (or tab). I have followed another article (from around
2004) that has you modify the “ShowAttachment” and “Show Transactions”
(actually now appears to be called “ShowTransactionAttachment” but it
does not appear that this works.

Does anyone have any ideas?

This is pretty simple with a bit of javascript using jQuery. Try the
following in local/html/Callbacks/NewWindow/Elements/Header/Head:

<script type="text/javascript">
jQuery(function(){
  jQuery(".ticket-info-attachments a, .downloadattachment a")
    .attr("target","_new")
});
</script>

then clear your mason cache and restart your webserver.

Thomas