fix: turn off desk refresh for each update in bulk operations: updating multiple documents
This commit is contained in:
parent
7ef5b20ca4
commit
9e697a2e82
1 changed files with 12 additions and 1 deletions
|
|
@ -124,7 +124,14 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
|
|||
|
||||
const actions = this.actions_menu_items.concat(this.workflow_action_menu_items);
|
||||
actions.map(item => {
|
||||
const $item = this.page.add_actions_menu_item(item.label, item.action, item.standard);
|
||||
let action = () => {
|
||||
frappe.run_serially([
|
||||
this.toggle_auto_refresh(false),
|
||||
item.action,
|
||||
this.toggle_auto_refresh(true)
|
||||
])
|
||||
}
|
||||
const $item = this.page.add_actions_menu_item(item.label, action, item.standard);
|
||||
if (item.class) {
|
||||
$item.addClass(item.class);
|
||||
}
|
||||
|
|
@ -135,6 +142,10 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
|
|||
});
|
||||
}
|
||||
|
||||
toggle_auto_refresh(state) {
|
||||
this.list_view_settings.disable_auto_refresh = !state;
|
||||
}
|
||||
|
||||
show_restricted_list_indicator_if_applicable() {
|
||||
const match_rules_list = frappe.perm.get_match_rules(this.doctype);
|
||||
if(match_rules_list.length) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue