diff --git a/frappe/public/js/frappe/form/footer/base_timeline.js b/frappe/public/js/frappe/form/footer/base_timeline.js index fa429f52d4..3f369d27f3 100644 --- a/frappe/public/js/frappe/form/footer/base_timeline.js +++ b/frappe/public/js/frappe/form/footer/base_timeline.js @@ -9,6 +9,7 @@ class BaseTimeline { make() { this.timeline_wrapper = $(`
`); + this.wrapper = this.timeline_wrapper; this.timeline_items_wrapper = $(`
`); this.timeline_actions_wrapper = $(`
@@ -75,7 +76,10 @@ class BaseTimeline { // timeline_badge, icon, icon_size, // hide_timestamp, is_card const timeline_item = $(`
`); - + timeline_item.attr({ + "data-doctype": item.doctype, + "data-name": item.name, + }); if (item.icon) { timeline_item.append(`
diff --git a/frappe/public/js/frappe/form/footer/form_timeline.js b/frappe/public/js/frappe/form/footer/form_timeline.js index edd2a58866..0ed3bf290f 100644 --- a/frappe/public/js/frappe/form/footer/form_timeline.js +++ b/frappe/public/js/frappe/form/footer/form_timeline.js @@ -171,6 +171,8 @@ class FormTimeline extends BaseTimeline { creation: communication.creation, is_card: true, content: this.get_communication_timeline_content(communication), + doctype: "Communication", + name: communication.name }); }); return communication_timeline_contents; @@ -217,6 +219,8 @@ class FormTimeline extends BaseTimeline { icon: 'small-message', creation: comment.creation, is_card: true, + doctype: "Comment", + name: comment.name, content: this.get_comment_timeline_content(comment), }; } diff --git a/frappe/public/js/frappe/form/templates/timeline_message_box.html b/frappe/public/js/frappe/form/templates/timeline_message_box.html index 2fb70a613c..313d409e83 100644 --- a/frappe/public/js/frappe/form/templates/timeline_message_box.html +++ b/frappe/public/js/frappe/form/templates/timeline_message_box.html @@ -1,4 +1,4 @@ -
+
{% if (doc.comment_type && doc.comment_type == "Comment") { %}