Hide "Help Article" button for timeline Communication type "Comment". (#10541)

This commit is contained in:
Ashwini Save 2017-08-25 12:44:33 +05:30 committed by Makarand Bauskar
parent bf4a974124
commit e33a1e0515

View File

@ -24,7 +24,7 @@ frappe.ui.form.on("Issue", {
frm.timeline.wrapper.find('.comment-header .asset-details .btn-add-to-kb').remove();
$('<button class="btn btn-xs btn-link btn-add-to-kb text-muted hidden-xs pull-right">'+
__('Help Article') + '</button>')
.appendTo(frm.timeline.wrapper.find('.comment-header .asset-details'))
.appendTo(frm.timeline.wrapper.find('.comment-header .asset-details:not([data-communication-type="Comment"])'))
.on('click', function() {
var content = $(this).parents('.timeline-item:first').find('.timeline-item-content').html();
var doc = frappe.model.get_new_doc('Help Article');