Add Custom Icon

  • 24 September 2016
  • 3 replies
  • 87 views

How can I add a custom icon with hyperlink next to he canned response icon in ticket replies?

This topic has been closed for comments

3 replies


This app will add some custom HTML to Replies/Forwards/Notes ( those invoked from the toolbar - not those associated with existing notes ). You will have to customize the HTML to suit your needs.


 


<div id="new_icon"></div>
<script type="text/javascript">
jQuery('#new_icon').closest('.widget').removeClass('widget');

var cust_html = "<li class=\"redactor_separator\"></li><li style=\"color: #f00; font-size: 12px;\" id=\"custom_html\">ABC</li>";

function addCustNote() {
jQuery("ul").filter(".redactor_toolbar").each(function(index) {
if (!jQuery(this).find('li#custom_html').length) {
jQuery(this).append(cust_html);
}
});
}
jQuery(document).on('ticket_view_loaded', addCustNote);
</script>

 



Thanks so much!

 



Where into that code to put the html link?