diff --git a/frappe/public/css/form.css b/frappe/public/css/form.css index 62c27756af..0d21271862 100644 --- a/frappe/public/css/form.css +++ b/frappe/public/css/form.css @@ -287,6 +287,8 @@ h6.uppercase, border-radius: 3px; margin-left: -7px; position: relative; + max-width: calc(100% - 50px); + padding-right: 0px; overflow: visible; } .timeline-item.user-content .avatar-medium { @@ -294,6 +296,11 @@ h6.uppercase, height: 45px; width: 45px; } +.timeline-item.user-content .action-btns { + position: absolute; + right: 0; + padding: 5px 15px 2px 5px; +} .timeline-item.user-content .comment-header { background-color: #fafbfc; padding: 10px 15px 10px 13px; @@ -301,12 +308,19 @@ h6.uppercase, color: #8D99A6; border-bottom: 1px solid #EBEFF2; } +.timeline-item.user-content .comment-header.links-active { + padding-right: 60px; +} +.timeline-item.user-content .comment-header .commented-on-small { + display: none; +} .timeline-item.user-content .comment-header .octicon-heart { color: #ff5858; cursor: pointer; } .timeline-item.user-content .reply { padding: 15px; + overflow: auto; } .timeline-item.user-content .reply > div > p:first-child { margin-top: 0px; @@ -317,11 +331,13 @@ h6.uppercase, .timeline-item.user-content .reply hr { margin: 10px 0px; } -.timeline-item.user-content .close-btn-container { - padding: 4px 10px 2px 5px; +.timeline-item.user-content .close-btn-container .close { + color: inherit; + opacity: 1; + padding: 0 0 0 10px; } .timeline-item.user-content .edit-btn-container { - padding: 4px 5px; + padding: 0; } .timeline-item.user-content .edit-btn-container .edit { color: inherit; diff --git a/frappe/public/css/mobile.css b/frappe/public/css/mobile.css index 9e0bbe3597..ebcc52084f 100644 --- a/frappe/public/css/mobile.css +++ b/frappe/public/css/mobile.css @@ -192,6 +192,9 @@ body { } } @media (max-width: 767px) { + .toggle-sidebar { + margin-right: 0; + } body[data-route^="Form"] .page-title .title-text { font-size: 16px; width: calc(100% - 30px); @@ -331,4 +334,64 @@ body { body[data-route^="Form"] .page-head .sub-heading { right: 90px; } + .timeline::before { + content: none; + } + .timeline .timeline-new-email { + margin: 20px 0; + padding-left: 15px; + } + .timeline .timeline-new-email::before { + content: none; + } + .timeline .timeline-item.user-content { + margin: 20px 15px; + } + .timeline .timeline-item.user-content .media-body { + margin-left: 0; + max-width: 100%; + overflow: hidden; + } + .timeline .timeline-item.user-content .media-body:before { + content: none; + } + .timeline .timeline-item.user-content .action-btns { + padding: 5px 10px 2px 5px; + } + .timeline .timeline-item.user-content .comment-header { + padding: 7px 10px; + } + .timeline .timeline-item.user-content .comment-header .links-active { + padding-right: 10px; + } + .timeline .timeline-item.user-content .avatar-medium { + margin-right: 10px; + } + .timeline .timeline-item.user-content .reply { + padding: 10px; + } + .timeline .timeline-item.user-content .commented-on-small { + display: inline-block; + } + .timeline .timeline-item.user-content .commented-on-small { + display: inline-block; + } + .timeline .timeline-item.notification-content { + padding-left: 15px; + margin: 20px 0; + } + .timeline .timeline-item.notification-content::before { + content: none; + } + .timeline .timeline-item.notification-content .small { + padding-left: 0; + } + .timeline .timeline-item .delivery-status-indicator { + float: left; + margin: 0 5px 0 0; + } + .timeline .asset-details { + line-height: 24px; + /*Height of avtar image -36px to align text center vertically*/ + } } diff --git a/frappe/public/js/frappe/form/footer/timeline.js b/frappe/public/js/frappe/form/footer/timeline.js index d80ebf85dd..d2c3b69d0f 100644 --- a/frappe/public/js/frappe/form/footer/timeline.js +++ b/frappe/public/js/frappe/form/footer/timeline.js @@ -248,14 +248,14 @@ frappe.ui.form.Timeline = Class.extend({ c["edit"] = ""; if(c.communication_type=="Comment" && (c.comment_type || "Comment") === "Comment") { if(frappe.model.can_delete("Communication")) { - c["delete"] = ''; + c["delete"] = ''; } if(frappe.user.name == c.sender || (frappe.user.name == 'Administrator')) { - c["edit"] = ''; + c["edit"] = ''; } } - + c.comment_on_small = comment_when(c.creation, true); c.comment_on = comment_when(c.creation); if(!c.fullname) { c.fullname = c.sender_full_name || frappe.user.full_name(c.sender); @@ -358,7 +358,8 @@ frappe.ui.form.Timeline = Class.extend({ "Unshared": "octicon octicon-circle-slash", "Like": "octicon octicon-heart", "Edit": "octicon octicon-pencil", - "Relinked": "octicon octicon-check" + "Relinked": "octicon octicon-check", + "Reply": "octicon octicon-mail-reply" }[c.comment_type || c.communication_medium] c.color = { @@ -376,7 +377,8 @@ frappe.ui.form.Timeline = Class.extend({ "Label": "#2c3e50", "Attachment": "#7f8c8d", "Attachment Removed": "#eee", - "Relinked": "#16a085" + "Relinked": "#16a085", + "Reply": "#8d99a6" }[c.comment_type || c.communication_medium]; c.icon_fg = { diff --git a/frappe/public/js/frappe/form/footer/timeline_item.html b/frappe/public/js/frappe/form/footer/timeline_item.html index c35ffa26d6..215dd06fc2 100755 --- a/frappe/public/js/frappe/form/footer/timeline_item.html +++ b/frappe/public/js/frappe/form/footer/timeline_item.html @@ -1,6 +1,6 @@
{% if (data.user_content) { %} - + {% } %} -
+
-
- - {%= data.delete %} - -
-
- - {%= data.edit %} - +
+ {% if(data.delete) { %} + + {% } %} + {% if(data.edit) { %} +
+ + {%= data.edit %} + +
+ {% } %}
{% if(data.communication_type==="Communication" || data.communication_type==="Feedback" || (data.communication_type==="Comment" && data.comment_type==="Comment")) { %} -
- - {%= data.fullname %} - - {% if (data.timeline_doctype===data.frm.doc.doctype - && data.timeline_name===data.frm.doc.name) { %} - – - - {{ __(data.reference_doctype) }} - {{ data.reference_name }} - + -
+
{% if data.show_subject %}

@@ -143,7 +163,7 @@ {% if(data.link_doctype && data.link_name) { %} {% } %} - + – {%= data.comment_on %}

{% } else { %} @@ -172,7 +192,7 @@ {% } %} {% } %} - + – {%= data.comment_on %}
{% } %} diff --git a/frappe/public/less/form.less b/frappe/public/less/form.less index d54ce51f89..69767fddf4 100644 --- a/frappe/public/less/form.less +++ b/frappe/public/less/form.less @@ -376,7 +376,8 @@ h6.uppercase, .h6.uppercase { border-radius: 3px; margin-left: -7px; position: relative; - + max-width: calc(~"100% - 50px"); + padding-right: 0px; // to display the triangle beside the box overflow: visible; } @@ -387,12 +388,24 @@ h6.uppercase, .h6.uppercase { width: 45px; } + .action-btns { + position: absolute; + right: 0; + padding: 5px 15px 2px 5px; + } + .comment-header { background-color: @light-bg; padding: 10px 15px 10px 13px; margin: 0px; color: @text-muted; border-bottom: 1px solid @light-border-color; + &.links-active { + padding-right: 60px; + } + .commented-on-small { + display: none; + } .octicon-heart { color: @heart-color; @@ -402,6 +415,7 @@ h6.uppercase, .h6.uppercase { .reply { padding: 15px; + overflow: auto; & > div > p:first-child { margin-top: 0px; @@ -417,11 +431,15 @@ h6.uppercase, .h6.uppercase { } .close-btn-container { - padding: 4px 10px 2px 5px; + .close { + color: inherit; + opacity: 1; + padding: 0 0 0 10px; + } } .edit-btn-container { - padding: 4px 5px; + padding: 0; .edit { color: inherit; diff --git a/frappe/public/less/mobile.less b/frappe/public/less/mobile.less index 06a3a26a15..40d673c169 100644 --- a/frappe/public/less/mobile.less +++ b/frappe/public/less/mobile.less @@ -223,6 +223,9 @@ body { } @media(max-width: 767px) { + .toggle-sidebar { + margin-right: 0; + } body[data-route^="Form"]{ .page-title { .title-text { @@ -406,4 +409,67 @@ body { right: 90px; } } + .timeline { + &::before { + content: none; + } + .timeline-new-email { + margin: 20px 0; + padding-left: 15px; + &::before { + content: none; + } + } + .timeline-item { + &.user-content { + margin: 20px 15px; + .media-body { + margin-left: 0; + max-width: 100%; + overflow: hidden; + &:before { + content: none; + } + } + .action-btns { + padding: 5px 10px 2px 5px; + } + .comment-header{ + padding: 7px 10px; + .links-active { + padding-right: 10px; + } + } + .avatar-medium { + margin-right: 10px; + } + .reply { + padding: 10px; + } + .commented-on-small{ + display: inline-block; + } + .commented-on-small{ + display: inline-block; + } + } + &.notification-content { + padding-left: 15px; + margin: 20px 0; + &::before { + content: none; + } + .small { + padding-left: 0; + } + } + .delivery-status-indicator { + float: left; + margin: 0 5px 0 0; + } + } + .asset-details { + line-height: 24px; /*Height of avtar image -36px to align text center vertically*/ + } + } }