refactor: Rename card to is_card
This commit is contained in:
parent
8239f8d875
commit
950fc99831
3 changed files with 7 additions and 7 deletions
|
|
@ -392,7 +392,7 @@ class UserProfile {
|
|||
return {
|
||||
icon: icon,
|
||||
creation: data.creation,
|
||||
card: true,
|
||||
is_card: true,
|
||||
content: frappe.energy_points.format_history_log(data),
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class BaseTimeline {
|
|||
get_timeline_item(item) {
|
||||
// item can have content*, creation*,
|
||||
// timeline_badge, icon, icon_size,
|
||||
// hide_timestamp, card
|
||||
// hide_timestamp, is_card
|
||||
const timeline_item = $(`<div class="timeline-item">`);
|
||||
|
||||
if (item.icon) {
|
||||
|
|
@ -74,9 +74,9 @@ class BaseTimeline {
|
|||
timeline_item.append(`<div class="timeline-dot">`);
|
||||
}
|
||||
|
||||
timeline_item.append(`<div class="timeline-content ${item.card ? 'frappe-card' : ''}">`);
|
||||
timeline_item.append(`<div class="timeline-content ${item.is_card ? 'frappe-card' : ''}">`);
|
||||
timeline_item.find('.timeline-content').append(item.content);
|
||||
if (!item.hide_timestamp && !item.card) {
|
||||
if (!item.hide_timestamp && !item.is_card) {
|
||||
timeline_item.find('.timeline-content').append(`<span> - ${comment_when(item.creation)}</span>`);
|
||||
}
|
||||
return timeline_item;
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ class FormTimeline extends BaseTimeline {
|
|||
icon: 'mail',
|
||||
icon_size: 'sm',
|
||||
creation: communication.creation,
|
||||
card: true,
|
||||
is_card: true,
|
||||
content: this.get_communication_timeline_content(communication),
|
||||
});
|
||||
});
|
||||
|
|
@ -151,7 +151,7 @@ class FormTimeline extends BaseTimeline {
|
|||
comment_timeline_contents.push({
|
||||
icon: 'small-message',
|
||||
creation: comment.creation,
|
||||
card: true,
|
||||
is_card: true,
|
||||
content: this.get_comment_timeline_content(comment),
|
||||
});
|
||||
});
|
||||
|
|
@ -248,7 +248,7 @@ class FormTimeline extends BaseTimeline {
|
|||
custom_timeline_contents.push({
|
||||
icon: custom_item.icon,
|
||||
icon_size: 'sm',
|
||||
card: custom_item.show_card,
|
||||
is_card: custom_item.show_card,
|
||||
creation: custom_item.creation,
|
||||
content: custom_item.content || frappe.render_template(custom_item.template, custom_item.template_data),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue