Merge branch 'develop'
This commit is contained in:
commit
e46bb520c2
6 changed files with 21 additions and 14 deletions
|
|
@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json
|
|||
from .exceptions import *
|
||||
from .utils.jinja import get_jenv, get_template, render_template
|
||||
|
||||
__version__ = '8.3.4'
|
||||
__version__ = '8.3.5'
|
||||
__title__ = "Frappe Framework"
|
||||
|
||||
local = Local()
|
||||
|
|
|
|||
|
|
@ -1351,11 +1351,7 @@ frappe.ui.form.ControlLink = frappe.ui.form.ControlData.extend({
|
|||
frappe._from_link_scrollY = $(document).scrollTop();
|
||||
|
||||
frappe.ui.form.make_quick_entry(doctype, (doc) => {
|
||||
if(me.frm) {
|
||||
me.parse_validate_and_set_in_model(doc.name);
|
||||
} else {
|
||||
me.set_value(doc.name);
|
||||
}
|
||||
return me.set_value(doc.name);
|
||||
});
|
||||
|
||||
return false;
|
||||
|
|
@ -1590,7 +1586,7 @@ frappe.ui.form.ControlLink = frappe.ui.form.ControlData.extend({
|
|||
validate: function(value) {
|
||||
// validate the value just entered
|
||||
if(this.df.options=="[Select]" || this.df.ignore_link_validation) {
|
||||
return;
|
||||
return value;
|
||||
}
|
||||
|
||||
return this.validate_link_and_fetch(this.df, this.get_options(),
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ frappe.ui.form.QuickEntryForm = Class.extend({
|
|||
frappe.model.clear_doc(me.dialog.doc.doctype, me.dialog.doc.name);
|
||||
me.dialog.doc = r.message;
|
||||
if(frappe._from_link) {
|
||||
frappe.ui.form.update_calling_link(me.dialog.doc.name);
|
||||
frappe.ui.form.update_calling_link(me.dialog.doc);
|
||||
} else {
|
||||
if(me.after_insert) {
|
||||
me.after_insert(me.dialig.doc);
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ frappe.ui.form.ScriptManager = Class.extend({
|
|||
handlers.old_style.forEach((_function) => {
|
||||
if(event_name==='setup') {
|
||||
// setup must be called immediately
|
||||
runner(_function, false);
|
||||
runner(_function, true);
|
||||
} else {
|
||||
tasks.push(() => runner(_function, true));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -289,7 +289,11 @@ frappe.ui.BaseList = Class.extend({
|
|||
frappe.route_options = null;
|
||||
},
|
||||
|
||||
run: function (more) {
|
||||
run: function(more) {
|
||||
setTimeout(() => this._run(more), 100);
|
||||
},
|
||||
|
||||
_run: function (more) {
|
||||
var me = this;
|
||||
if (!more) {
|
||||
this.start = 0;
|
||||
|
|
|
|||
|
|
@ -50,6 +50,11 @@ frappe.ui.FilterList = Class.extend({
|
|||
|
||||
clear_filters: function() {
|
||||
$.each(this.filters, function(i, f) { f.remove(true); });
|
||||
if(this.base_list.page.fields_dict) {
|
||||
$.each(this.base_list.page.fields_dict, (key, value) => {
|
||||
value.set_input('');
|
||||
});
|
||||
}
|
||||
this.filters = [];
|
||||
},
|
||||
|
||||
|
|
@ -224,7 +229,7 @@ frappe.ui.Filter = Class.extend({
|
|||
// set the field
|
||||
if(me.fieldname) {
|
||||
// pre-sets given (could be via tags!)
|
||||
this.set_values(me._doctype, me.fieldname, me.condition, me.value);
|
||||
return this.set_values(me._doctype, me.fieldname, me.condition, me.value);
|
||||
} else {
|
||||
me.set_field(me.doctype, 'name');
|
||||
}
|
||||
|
|
@ -255,7 +260,7 @@ frappe.ui.Filter = Class.extend({
|
|||
this.wrapper.find('.condition').val(condition).change();
|
||||
}
|
||||
if(value!=null) {
|
||||
this.field.set_value(value);
|
||||
return this.field.set_value(value);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -310,8 +315,9 @@ frappe.ui.Filter = Class.extend({
|
|||
f.refresh();
|
||||
|
||||
me.field = f;
|
||||
if(old_text && me.field.df.fieldtype===cur.fieldtype)
|
||||
me.field.set_input(old_text);
|
||||
if(old_text && me.field.df.fieldtype===cur.fieldtype) {
|
||||
me.field.set_value(old_text);
|
||||
}
|
||||
|
||||
// run on enter
|
||||
$(me.field.wrapper).find(':input').keydown(function(ev) {
|
||||
|
|
@ -329,6 +335,7 @@ frappe.ui.Filter = Class.extend({
|
|||
df.original_type = df.fieldtype;
|
||||
|
||||
df.description = ''; df.reqd = 0;
|
||||
df.ignore_link_validation = true;
|
||||
|
||||
// given
|
||||
if(fieldtype) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue