diff --git a/frappe/public/js/frappe/form/column.js b/frappe/public/js/frappe/form/column.js index c2b214092e..f6953b7f5a 100644 --- a/frappe/public/js/frappe/form/column.js +++ b/frappe/public/js/frappe/form/column.js @@ -43,7 +43,7 @@ export default class Column { .addClass("col-sm-" + colspan); } - add_field(fieldobj) { } + add_field() { } refresh() { this.section.refresh(); diff --git a/frappe/public/js/frappe/form/form_editor.js b/frappe/public/js/frappe/form/form_editor.js index 5e3570b068..9f78ae94e9 100644 --- a/frappe/public/js/frappe/form/form_editor.js +++ b/frappe/public/js/frappe/form/form_editor.js @@ -10,7 +10,7 @@ frappe.ui.form.FormEditor = class FormEditor { setup_sortable() { // setup sortable in all column - for(let section of this.frm.layout.sections) { + for (let section of this.frm.layout.sections) { for (let column of section.columns) { column.make_sortable(); } @@ -22,7 +22,7 @@ frappe.ui.form.FormEditor = class FormEditor { } setup_switch_tabs_on_hover() { - for(let tab of this.frm.layout.tabs) { + for (let tab of this.frm.layout.tabs) { tab.setup_switch_on_hover(); } } @@ -46,7 +46,7 @@ frappe.ui.form.FormEditor = class FormEditor { } add_sections(container) { - for(let section of $(container).find('.form-section')) { + for (let section of $(container).find('.form-section')) { this.add_field_to_field_order(section); for (let column of $(section).find('.form-column')) { this.add_field_to_field_order(column); @@ -62,7 +62,7 @@ frappe.ui.form.FormEditor = class FormEditor { // rebuild the .fields_list and .fields_dict property of sections and columns // refresh is based on the these properties - for(let section of this.frm.layout.sections) { + for (let section of this.frm.layout.sections) { section.rebuild_fields_list_from_dom(); } } @@ -75,4 +75,4 @@ frappe.ui.form.FormEditor = class FormEditor { this.field_order.push(fieldname); } } -} +}; diff --git a/frappe/public/js/frappe/form/layout.js b/frappe/public/js/frappe/form/layout.js index be26749d4e..9ff6e61fb0 100644 --- a/frappe/public/js/frappe/form/layout.js +++ b/frappe/public/js/frappe/form/layout.js @@ -297,7 +297,7 @@ frappe.ui.form.Layout = class Layout { } make_column(df = {}) { - this.column_count ++; + this.column_count++; if (!df.fieldname) df.fieldname = `__column_${this.section_count}`; this.column = new Column(this.section, df); diff --git a/frappe/public/js/frappe/form/section.js b/frappe/public/js/frappe/form/section.js index 9f028d2ee4..663a82dcc1 100644 --- a/frappe/public/js/frappe/form/section.js +++ b/frappe/public/js/frappe/form/section.js @@ -155,12 +155,4 @@ export default class Section { this.wrapper.toggleClass("hide-control", !show); // this.on_section_toggle && this.on_section_toggle(show); } - - rebuild_fields_list_from_dom() { - this.fields_list = []; - this.fields_dict = {}; - for (let ele of $(this.wrapper).find('.frappe-control')) { - let f = this.layout.frm.fields_dict[ele.getAttribute('data-fieldname')]; - } - } } diff --git a/frappe/public/js/frappe/form/tab.js b/frappe/public/js/frappe/form/tab.js index af6148b966..1a6f3c4817 100644 --- a/frappe/public/js/frappe/form/tab.js +++ b/frappe/public/js/frappe/form/tab.js @@ -114,6 +114,6 @@ export default class Tab { clearTimeout(this.action); this.action = null; } - }) + }); } }