Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion frappe/public/js/frappe/form/sidebar/form_sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ frappe.ui.form.Sidebar = class {
}

setup_copy_event() {
let classes = [".form-name-copy", ".form-title-text"];

$(this.sidebar)
.find(".sidebar-meta-details .form-name-copy")
.find(".sidebar-meta-details " + classes.join(", "))
.tooltip()
.on("click", (e) => {
frappe.utils.copy_to_clipboard($(e.currentTarget).attr("data-copy"));
Expand Down
4 changes: 2 additions & 2 deletions frappe/public/js/frappe/form/templates/form_sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
<div class="flex justify-between overflow-hidden">
<div class="ellipsis">
{% let title = frm.get_title(); %}
<div class="form-details flex justify-between">
<span class="bold ellipsis form-title-text mr-3 text-medium">{%= frappe.utils.escape_html(frappe.utils.html2text(title)) %}</span>
<div class="form-details flex justify-between form-title-text" data-copy="{{title}}">
<span class="bold ellipsis mr-3 text-medium">{%= frappe.utils.escape_html(frappe.utils.html2text(title)) %}</span>
</div>
{% if frm.meta.beta %}
<div class="pt-1">
Expand Down
1 change: 1 addition & 0 deletions frappe/public/scss/desk/form_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@
.form-title-text {
// to match the actions button height for center alignment
line-height: 28px;
cursor: copy;
}

.form-stats-likes {
Expand Down
Loading