Просмотр исходного кода

fix: clear_cache only on success; use me instead of this

version-14
Sagar Vora 4 лет назад
committed by Suraj Shetty
Родитель
Сommit
e94d15c5c1
1 измененных файлов: 5 добавлений и 7 удалений
  1. +5
    -7
      frappe/public/js/frappe/views/communication.js

+ 5
- 7
frappe/public/js/frappe/views/communication.js Просмотреть файл

@@ -17,16 +17,15 @@ frappe.views.CommunicationComposer = Class.extend({
no_submit_on_enter: true, no_submit_on_enter: true,
fields: this.get_fields(), fields: this.get_fields(),
primary_action_label: __("Send"), primary_action_label: __("Send"),
size: 'large',
primary_action() { primary_action() {
me.send_action(); me.send_action();
me.clear_cache();
}, },
secondary_action_label: __("Discard"), secondary_action_label: __("Discard"),
secondary_action() { secondary_action() {
me.dialog.hide(); me.dialog.hide();
me.clear_cache(); me.clear_cache();
}, },
size: 'large',
minimizable: true minimizable: true
}); });


@@ -665,11 +664,10 @@ frappe.views.CommunicationComposer = Class.extend({
[ frappe.utils.escape_html(r.message["emails_not_sent_to"]) ]) ); [ frappe.utils.escape_html(r.message["emails_not_sent_to"]) ]) );
} }


if ((frappe.last_edited_communication[me.doc] || {})[me.key]) {
delete frappe.last_edited_communication[me.doc][me.key];
}
if (this.frm) {
this.frm.reload_doc();
me.clear_cache();

if (me.frm) {
me.frm.reload_doc();
} }


// try the success callback if it exists // try the success callback if it exists


Загрузка…
Отмена
Сохранить