Merge branch 'hotfix'
This commit is contained in:
commit
93064a3292
2 changed files with 14 additions and 2 deletions
|
|
@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json
|
|||
from .exceptions import *
|
||||
from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template
|
||||
|
||||
__version__ = '10.1.11'
|
||||
__version__ = '10.1.12'
|
||||
__title__ = "Frappe Framework"
|
||||
|
||||
local = Local()
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ frappe.ui.form.Grid = Class.extend({
|
|||
},
|
||||
setup_check: function() {
|
||||
var me = this;
|
||||
|
||||
this.wrapper.on('click', '.grid-row-check', function(e) {
|
||||
var $check = $(this);
|
||||
if($check.parents('.grid-heading-row:first').length!==0) {
|
||||
|
|
@ -95,9 +96,13 @@ frappe.ui.form.Grid = Class.extend({
|
|||
var dirty = false;
|
||||
|
||||
let tasks = [];
|
||||
me.deleted_docs = [];
|
||||
|
||||
me.get_selected().forEach((docname) => {
|
||||
tasks.push(() => {
|
||||
if (!me.frm) {
|
||||
me.deleted_docs.push(docname);
|
||||
}
|
||||
me.grid_rows_by_docname[docname].remove();
|
||||
dirty = true;
|
||||
});
|
||||
|
|
@ -338,10 +343,17 @@ frappe.ui.form.Grid = Class.extend({
|
|||
get_data: function() {
|
||||
var data = this.frm ?
|
||||
this.frm.doc[this.df.fieldname] || []
|
||||
: this.df.get_data();
|
||||
: this.get_modal_data();
|
||||
data.sort(function(a, b) { return a.idx - b.idx});
|
||||
return data;
|
||||
},
|
||||
get_modal_data: function() {
|
||||
return this.df.get_data().filter(data => {
|
||||
if (!this.deleted_docs || !in_list(this.deleted_docs, data.name)) {
|
||||
return data;
|
||||
}
|
||||
});
|
||||
},
|
||||
set_column_disp: function(fieldname, show) {
|
||||
if($.isArray(fieldname)) {
|
||||
var me = this;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue