clonemeagain / attachment_preview

osTicket Plugin: Allows inline view of attachments
GNU General Public License v2.0
48 stars 16 forks source link

OSticket 1.14 Support #44

Closed azon2111 closed 4 years ago

azon2111 commented 4 years ago

Do you have an updated version that supports 1.14?

Thank you

clonemeagain commented 4 years ago

I've not had much time to test it since 1.10 really, been a while. Are you getting errors?

ichabot commented 4 years ago

hi @clonemeagain . The Plugin Seems to work fine for the latest OSTicket version (v1.14.1), but there is a bessage in the open tickets area (open tickets etc.) I Dont know what to make out of this message on the bottom of the page. Other than that message all works as expected. Maybe you can have a look at it:

`" ); $( "table.list.queue.tickets a.preview" ).wrap( "" ); $( "td.osta_priority.osta_priority_low" ).closest( "tr" ).addClass( "priority-low"); $( "td.osta_priority.osta_priority_normal" ).closest( "tr" ).addClass( "priority-normal"); $( "td.osta_priority.osta_priority_high" ).closest( "tr" ).addClass( "priority-high"); $( "td.osta_priority.osta_priority_emergency" ).closest( "tr" ).addClass( "priority-emerency"); jQuery( ".truncate a" ).each(function(i, value) { var $link = jQuery(value); var text = $link.text(); if(text.length > 55) { $link.text(text.substring(0, 55) + "..."); } }); function myFunction(x) { if (x.matches) { // If media query matches $( "tbody tr" ).wrapInner( "" ); $( ".overdueTicket" ).closest( "tr" ).addClass( "overdue" ); $( ".overdue td.osta_ticket" ).append( "

" ); $( ".paperclip" ).closest( "tr" ).addClass( "paperclip-icon" ); $( ".paperclip-icon td.osta_ticket" ).append( "

" ); $( "tr" ).each(function() { var $test = $(this), $href = $test.find( ".pull-right"), $target = $test.find( "td.osta_ticket" ); $href.appendTo($target); }); $( "tr" ).each(function() { var $test = $(this), $href = $test.find( ".pull-right"), $target = $test.find( "td.osta_number" ); $href.appendTo($target); }); } else { $( "tbody tr > .wrapper" ).contents().unwrap(); $( ".overdueTicket" ).closest( "tr" ).removeClass( "overdue" ); $( "td.osta_ticket .overdue-ticket" ).remove(); $( "td.osta_ticket .pull-right" ).remove(); $( ".paperclip" ).closest( "tr" ).removeClass( "paperclip-icon" ); } } var x = window.matchMedia( "(max-width: 760px)" ) myFunction(x) // Call listener function at run time x.addListener(myFunction) // Attach listener function on state changes`

gamefrancisco18 commented 4 years ago

I need support.

I want to open a new window, when i click in a .png link, i don't want to download (and this is what it does)

code54nl commented 4 years ago

I found the same issue, but for us it's only with osTicketAwesome theme. Not in a standard of-the-shelf osTicket. So I reported this problem at osTicketAwesome: https://osticketawesome.com/forums/topic/html-code-shows-at-the-bottom-of-ticket-page-where-paging-is-located/#post-5572

But, if this problem can be solved in this plugin, that would be great too.

code54nl commented 4 years ago

I think it's fixed with attached file. It works for us now.

Basically the plugin tries to see if you are viewing a Ticket or not, but examining the URL. I added an extra check to search for the text id=. Without an id, I would say that you are never viewing a ticket. It prevents the plugin from interfering with the default Ticket-list page.

class.AttachmentPreviewPlugin.php.zip

ichabot commented 4 years ago

I think it's fixed with attached file. It works for us now.

Basically the plugin tries to see if you are viewing a Ticket or not, but examining the URL. I added an extra check to search for the text id=. Without an id, I would say that you are never viewing a ticket. It prevents the plugin from interfering with the default Ticket-list page.

class.AttachmentPreviewPlugin.php.zip

Thank you!!