fix(minor): js linting
This commit is contained in:
parent
09e001b57d
commit
46ddf6acd6
5 changed files with 8 additions and 16 deletions
|
|
@ -43,7 +43,7 @@ export default class Column {
|
|||
.addClass("col-sm-" + colspan);
|
||||
}
|
||||
|
||||
add_field(fieldobj) { }
|
||||
add_field() { }
|
||||
|
||||
refresh() {
|
||||
this.section.refresh();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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')];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,6 +114,6 @@ export default class Tab {
|
|||
clearTimeout(this.action);
|
||||
this.action = null;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue