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

fix: use debounced frappe.call on domain selection

Also removed  tag from domain and service labels in email account doctype

(cherry picked from commit 141693a75b)
version-14
phot0n 2 лет назад
committed by Mergify
Родитель
Сommit
372b10837d
2 измененных файлов: 7 добавлений и 6 удалений
  1. +3
    -2
      frappe/email/doctype/email_account/email_account.js
  2. +4
    -4
      frappe/email/doctype/email_account/email_account.json

+ 3
- 2
frappe/email/doctype/email_account/email_account.js Просмотреть файл

@@ -210,10 +210,11 @@ frappe.ui.form.on("Email Account", {
oauth_access(frm); oauth_access(frm);
}, },


domain: function (frm) {
domain: frappe.utils.debounce((frm) => {
if (frm.doc.domain) { if (frm.doc.domain) {
frappe.call({ frappe.call({
method: "get_domain_values", method: "get_domain_values",
doc: frm.doc,
args: { args: {
domain: frm.doc.domain, domain: frm.doc.domain,
}, },
@@ -226,7 +227,7 @@ frappe.ui.form.on("Email Account", {
}, },
}); });
} }
},
}),


email_sync_option: function (frm) { email_sync_option: function (frm) {
// confirm if the ALL sync option is selected // confirm if the ALL sync option is selected


+ 4
- 4
frappe/email/doctype/email_account/email_account.json Просмотреть файл

@@ -145,7 +145,7 @@
"hide_seconds": 1, "hide_seconds": 1,
"in_list_view": 1, "in_list_view": 1,
"in_standard_filter": 1, "in_standard_filter": 1,
"label": "Domain (optional)",
"label": "Domain",
"options": "Email Domain" "options": "Email Domain"
}, },
{ {
@@ -154,7 +154,7 @@
"fieldtype": "Select", "fieldtype": "Select",
"hide_days": 1, "hide_days": 1,
"hide_seconds": 1, "hide_seconds": 1,
"label": "Service (optional)",
"label": "Service",
"options": "\nGMail\nSendgrid\nSparkPost\nYahoo Mail\nOutlook.com\nYandex.Mail" "options": "\nGMail\nSendgrid\nSparkPost\nYahoo Mail\nOutlook.com\nYandex.Mail"
}, },
{ {
@@ -615,7 +615,7 @@
"icon": "fa fa-inbox", "icon": "fa fa-inbox",
"index_web_pages_for_search": 1, "index_web_pages_for_search": 1,
"links": [], "links": [],
"modified": "2022-08-16 13:05:45.445572",
"modified": "2022-08-23 00:31:05.305462",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Email", "module": "Email",
"name": "Email Account", "name": "Email Account",
@@ -639,4 +639,4 @@
"sort_order": "DESC", "sort_order": "DESC",
"states": [], "states": [],
"track_changes": 1 "track_changes": 1
}
}

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