Merge branch 'staging-fixes' into staging-fixes
This commit is contained in:
commit
08ec5da838
2 changed files with 8 additions and 31 deletions
|
|
@ -12,6 +12,9 @@ def execute():
|
|||
|
||||
for report_name in reports:
|
||||
settings = frappe.db.get_value('Report', report_name, 'json')
|
||||
if not settings:
|
||||
continue
|
||||
|
||||
settings = frappe._dict(json.loads(settings))
|
||||
|
||||
# columns -> fields
|
||||
|
|
|
|||
|
|
@ -614,19 +614,14 @@ frappe.views.CommunicationComposer = Class.extend({
|
|||
},
|
||||
|
||||
setup_earlier_reply: function() {
|
||||
var fields = this.dialog.fields_dict,
|
||||
signature = frappe.boot.user.email_signature || "",
|
||||
last_email = this.last_email;
|
||||
|
||||
if(!last_email) {
|
||||
last_email = this.frm && this.frm.timeline.get_last_email(true);
|
||||
}
|
||||
let fields = this.dialog.fields_dict;
|
||||
let signature = frappe.boot.user.email_signature || "";
|
||||
|
||||
if(!frappe.utils.is_html(signature)) {
|
||||
signature = signature.replace(/\n/g, "<br>");
|
||||
}
|
||||
|
||||
if(this.txt) {
|
||||
if (this.txt) {
|
||||
this.message = this.txt + (this.message ? ("<br><br>" + this.message) : "");
|
||||
} else {
|
||||
// saved draft in localStorage
|
||||
|
|
@ -641,29 +636,8 @@ frappe.views.CommunicationComposer = Class.extend({
|
|||
+ this.real_name + ",</p><!-- salutation-ends --><br>" + (this.message || "");
|
||||
}
|
||||
|
||||
var reply = (this.message || "")
|
||||
+ (signature ? ("<br>" + signature) : "");
|
||||
var content = '';
|
||||
var reply = (this.message || "") + (signature ? ("<br>" + signature) : "");
|
||||
|
||||
if(last_email) {
|
||||
var last_email_content = last_email.original_comment || last_email.content;
|
||||
|
||||
last_email_content = last_email_content
|
||||
.replace(/<meta[\s\S]*meta>/g, '') // remove <meta> tags
|
||||
.replace(/<style[\s\S]*<\/style>/g, ''); // // remove <style> tags
|
||||
|
||||
var communication_date = last_email.communication_date || last_email.creation;
|
||||
content = '<div><br></div>'
|
||||
+ reply
|
||||
+ "<div data-comment='original-reply'></div>"
|
||||
+ '<blockquote>' +
|
||||
'<p>' + __("On {0}, {1} wrote:",
|
||||
[frappe.datetime.global_date_format(communication_date) , last_email.sender]) + '</p>' +
|
||||
last_email_content +
|
||||
'<blockquote>';
|
||||
} else {
|
||||
content = "<div><br></div>" + reply;
|
||||
}
|
||||
fields.content.set_value(content);
|
||||
fields.content.set_value(reply);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue