diff --git a/frappe/hooks.py b/frappe/hooks.py index 8b5e896c43..61fd389b20 100644 --- a/frappe/hooks.py +++ b/frappe/hooks.py @@ -12,7 +12,7 @@ source_link = "https://github.com/frappe/frappe" app_license = "MIT" develop_version = '12.x.x-develop' -staging_version = '11.0.3-beta.44' +staging_version = '11.0.3-beta.45' app_email = "info@frappe.io" diff --git a/frappe/public/js/frappe/defaults.js b/frappe/public/js/frappe/defaults.js index 75c8fecdae..a2df90e5b4 100644 --- a/frappe/public/js/frappe/defaults.js +++ b/frappe/public/js/frappe/defaults.js @@ -94,7 +94,7 @@ frappe.defaults = { let user_permission = this.get_user_permissions()[frappe.model.unscrub(key)] || []; let doc_found = user_permission.some(perm => { - perm.doc === value; + return perm.doc === value; }); return !doc_found; diff --git a/frappe/public/js/frappe/form/footer/timeline.js b/frappe/public/js/frappe/form/footer/timeline.js index da70f66016..90b8110673 100644 --- a/frappe/public/js/frappe/form/footer/timeline.js +++ b/frappe/public/js/frappe/form/footer/timeline.js @@ -2,6 +2,7 @@ // MIT License. See license.txt frappe.provide('frappe.timeline'); +frappe.separator_element = '
---
'; frappe.ui.form.Timeline = class Timeline { constructor(opts) { @@ -344,7 +345,7 @@ frappe.ui.form.Timeline = class Timeline { }); } else { if(c.communication_type=="Communication" && c.communication_medium=="Email") { - c.content = c.content.split('')[0]; + c.content = c.content.split(frappe.separator_element)[0]; c.content = frappe.utils.strip_original_content(c.content); c.original_content = c.content; diff --git a/frappe/public/js/frappe/views/communication.js b/frappe/public/js/frappe/views/communication.js index 46f25bc23b..95fef7cf5a 100755 --- a/frappe/public/js/frappe/views/communication.js +++ b/frappe/public/js/frappe/views/communication.js @@ -11,6 +11,7 @@ frappe.views.CommunicationComposer = Class.extend({ }, make: function() { var me = this; + this.dialog = new frappe.ui.Dialog({ title: (this.title || this.subject || __("New Email")), no_submit_on_enter: true, @@ -499,7 +500,7 @@ frappe.views.CommunicationComposer = Class.extend({ if (this.dialog) { try { let message = this.dialog.get_value('content'); - message = message.split('')[0]; + message = message.split(frappe.separator_element)[0]; localStorage.setItem(this.frm.doctype + this.frm.docname, message); } catch (e) { // silently fail @@ -656,9 +657,9 @@ frappe.views.CommunicationComposer = Class.extend({ let last_email_content = last_email.original_comment || last_email.content; - last_email_content = last_email_content - .replace(/<meta[\s\S]*meta>/g, '') // remove tags - .replace(/<style[\s\S]*<\/style>/g, ''); // // remove