diff --git a/frappe/core/doctype/communication/communication.js b/frappe/core/doctype/communication/communication.js index 3924fbd05b..83c3b36577 100644 --- a/frappe/core/doctype/communication/communication.js +++ b/frappe/core/doctype/communication/communication.js @@ -176,8 +176,7 @@ frappe.ui.form.on("Communication", { }, freeze: true, callback: function(r) { - frappe.msgprint(__("Email has been moved to Account {0}", [values.email_account])); - frm.reload_doc(); + window.history.back(); } }); } diff --git a/frappe/public/js/frappe/views/inbox/inbox_view.js b/frappe/public/js/frappe/views/inbox/inbox_view.js index 0b40faff96..ca4e8a15f8 100644 --- a/frappe/public/js/frappe/views/inbox/inbox_view.js +++ b/frappe/public/js/frappe/views/inbox/inbox_view.js @@ -40,6 +40,11 @@ frappe.views.InboxView = class InboxView extends frappe.views.ListView { setup_defaults() { super.setup_defaults(); + + // initialize with saved order by + this.sort_by = this.view_user_settings.sort_by || 'communication_date'; + this.sort_order = this.view_user_settings.sort_order || 'desc'; + this.email_account = frappe.get_route()[3]; this.page_title = this.email_account; this.filters = this.get_inbox_filters(); @@ -84,53 +89,6 @@ frappe.views.InboxView = class InboxView extends frappe.views.ListView { this.render_tags(); } - /* render() { - this.emails = this.data; - this.render_inbox_view(); - } - - render_inbox_view() { - let html = this.emails.map(this.render_email_row.bind(this)).join(""); - - this.$result.html(` - ${this.get_header_html()} - ${html} - `); - } - - get_header_html() { - return this.get_header_html_skeleton(` -