Selaa lähdekoodia

run trim_tables in barracuda patch, fixed email accounts and timeline to receive html emails

version-14
Anand Doshi 10 vuotta sitten
vanhempi
commit
ef0762e5f9
4 muutettua tiedostoa jossa 14 lisäystä ja 15 poistoa
  1. +5
    -5
      frappe/email/doctype/email_account/email_account.py
  2. +3
    -3
      frappe/email/receive.py
  3. +2
    -0
      frappe/patches/v5_0/convert_to_barracuda_and_utf8mb4.py
  4. +4
    -7
      frappe/public/js/frappe/form/footer/timeline.js

+ 5
- 5
frappe/email/doctype/email_account/email_account.py Näytä tiedosto

@@ -150,10 +150,10 @@ class EmailAccount(Document):
if frappe.db.exists("Communication", in_reply_to): if frappe.db.exists("Communication", in_reply_to):
parent = frappe.get_doc("Communication", in_reply_to) parent = frappe.get_doc("Communication", in_reply_to)


if parent.reference_name:
# parent same as parent of last communication
parent = frappe.get_doc(parent.reference_doctype,
parent.reference_name)
if parent.reference_name:
# parent same as parent of last communication
parent = frappe.get_doc(parent.reference_doctype,
parent.reference_name)


if not parent and self.append_to: if not parent and self.append_to:
# no parent found, but must be tagged # no parent found, but must be tagged
@@ -213,7 +213,7 @@ def notify_unreplied():
"""Sends email notifications if there are unreplied Communications """Sends email notifications if there are unreplied Communications
and `notify_if_unreplied` is set as true.""" and `notify_if_unreplied` is set as true."""


for email_account in frappe.get_all("Email Account", "name", filters={"enable_incoming": 1, "notify_if_unreplied": 1}, debug=True):
for email_account in frappe.get_all("Email Account", "name", filters={"enable_incoming": 1, "notify_if_unreplied": 1}):
email_account = frappe.get_doc("Email Account", email_account.name) email_account = frappe.get_doc("Email Account", email_account.name)
if email_account.append_to: if email_account.append_to:




+ 3
- 3
frappe/email/receive.py Näytä tiedosto

@@ -199,10 +199,10 @@ class Email:


def set_content_and_type(self): def set_content_and_type(self):
self.content, self.content_type = '[Blank Email]', 'text/plain' self.content, self.content_type = '[Blank Email]', 'text/plain'
if self.text_content:
self.content, self.content_type = EmailReplyParser.parse_reply(self.text_content), 'text/plain'
else:
if self.html_content:
self.content, self.content_type = self.html_content, 'text/html' self.content, self.content_type = self.html_content, 'text/html'
else:
self.content, self.content_type = EmailReplyParser.parse_reply(self.text_content), 'text/plain'


def process_part(self, part): def process_part(self, part):
"""Parse email `part` and set it to `text_content`, `html_content` or `attachments`.""" """Parse email `part` and set it to `text_content`, `html_content` or `attachments`."""


+ 2
- 0
frappe/patches/v5_0/convert_to_barracuda_and_utf8mb4.py Näytä tiedosto

@@ -1,9 +1,11 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import frappe import frappe
from frappe.installer import check_if_ready_for_barracuda from frappe.installer import check_if_ready_for_barracuda
from frappe.model.meta import trim_tables


def execute(): def execute():
check_if_ready_for_barracuda() check_if_ready_for_barracuda()
trim_tables()


for table in frappe.db.get_tables(): for table in frappe.db.get_tables():
frappe.db.sql_ddl("""alter table `{0}` ENGINE=InnoDB ROW_FORMAT=COMPRESSED""".format(table)) frappe.db.sql_ddl("""alter table `{0}` ENGINE=InnoDB ROW_FORMAT=COMPRESSED""".format(table))


+ 4
- 7
frappe/public/js/frappe/form/footer/timeline.js Näytä tiedosto

@@ -28,12 +28,8 @@ frappe.ui.form.Comments = Class.extend({
}); });


this.email_check = this.wrapper.find(".timeline-head input[type='checkbox']") this.email_check = this.wrapper.find(".timeline-head input[type='checkbox']")
.on("click", function() {
if ($(this).prop("checked")) {
me.button.html(__("Compose"));
} else {
me.button.html(__("Comment"));
}
.on("change", function() {
me.button.html($(this).prop("checked") ? __("Compose") : __("Comment"));
}); });
}, },
refresh: function(scroll_to_end) { refresh: function(scroll_to_end) {
@@ -56,7 +52,8 @@ frappe.ui.form.Comments = Class.extend({
if(c.comment) me.render_comment(c); if(c.comment) me.render_comment(c);
}); });


this.wrapper.find(".is-email").prop("checked", this.last_type==="Email");
this.wrapper.find(".is-email").prop("checked", this.last_type==="Email").change();

this.frm.sidebar.refresh_comments(); this.frm.sidebar.refresh_comments();


}, },


Ladataan…
Peruuta
Tallenna