Browse Source

[Fix] Activity page is not working (#3601)

* [Fix] Activity page is not working

* Update base_list.js
version-14
rohitwaghchaure 8 years ago
committed by Rushabh Mehta
parent
commit
e2d644803e
1 changed files with 28 additions and 26 deletions
  1. +28
    -26
      frappe/public/js/frappe/ui/base_list.js

+ 28
- 26
frappe/public/js/frappe/ui/base_list.js View File

@@ -184,33 +184,35 @@ frappe.ui.BaseList = Class.extend({
return;
}

this.page.add_field({
fieldtype:'Link',
options:this.doctype,
label:'ID',
fieldname:'name',
onchange: () => { me.refresh(true); }
});

this.meta.fields.forEach(function(df) {
if(df.in_standard_filter && !frappe.model.no_value_type.includes(df.fieldtype)) {
let options = df.options;
if(df.fieldtype == "Select" && df.options) {
options = df.options.split("\n")
if(options.length > 0 && options[0] != ""){
options.unshift("");
df.options = options.join("\n");
if(this.meta) {
this.page.add_field({
fieldtype:'Link',
options:this.doctype,
label:'ID',
fieldname:'name',
onchange: () => { me.refresh(true); }
});

this.meta.fields.forEach(function(df) {
if(df.in_standard_filter && !frappe.model.no_value_type.includes(df.fieldtype)) {
let options = df.options;
if(df.fieldtype == "Select" && df.options) {
options = df.options.split("\n")
if(options.length > 0 && options[0] != ""){
options.unshift("");
df.options = options.join("\n");
}
}
me.page.add_field({
fieldtype: df.fieldtype,
label: __(df.label),
options: df.options,
fieldname: df.fieldname,
onchange: () => {me.refresh(true);}
});
}
me.page.add_field({
fieldtype: df.fieldtype,
label: __(df.label),
options: df.options,
fieldname: df.fieldname,
onchange: () => {me.refresh(true);}
});
}
});
});
}

this.page.page_form.on('change', ':input', function() {
me.refresh(true);
@@ -507,4 +509,4 @@ frappe.ui.BaseList = Class.extend({
}
});
}
});
});

Loading…
Cancel
Save