{style} {literal} .ow_ticket_attachment_icon { display: inline-block; background-repeat: no-repeat; cursor: pointer; width: 14px; height: 17px; } .ticket_attachments_label { margin: 15px 0 5px; padding-left: 5px; font-weight: bold; } .ticket_add_post .jhtmlarea { margin: 0px auto; } .post_content img { max-width: 100%; } .post_content { overflow: hidden; } .ow_ticket_post_comment { background-position: right center; background-repeat: no-repeat; padding-right: 28px; } {/literal} {/style} {script} {literal} $(".ow_ticket_attachment").hover( function(){ $(this).find("a.ticket_delete_attachment").show(); }, function(){ $(this).find("a.ticket_delete_attachment").hide(); } ); $("a.ticket_delete_attachment").each(function(){ var container_handler = $(this).parent(); $(this).click(function(){ if ( confirm(OW.getLanguageText('iisticketing', 'confirm_delete_attachment')) ) { var attachment_id = $(this).attr("data-aid"); var attachmentDeleteCode = $(this).attr("code"); var params = {}; var url = "{/literal}{url_for_route for='iisticketing.delete_attachment'}{literal}"; params['attachmentId'] = attachment_id; if(attachmentDeleteCode!=null && attachmentDeleteCode!=undefined) { params['attachmentDeleteCode'] = attachmentDeleteCode; } $.ajaxSetup({dataType: 'json'}); $.post(url, params, function(data){ if ( data.result == true ) { OW.info(data.msg); container_handler.remove(); } else if (data.error != undefined) { OW.warning(data.error); } }); } else { return false; } }); }); {/literal} {/script} {$breadcrumb}