Browse Source

fix: Remove row highlight code from setup_sortable method

version-14
Shariq Ansari 3 years ago
parent
commit
36a69f9e0d
1 changed files with 4 additions and 8 deletions
  1. +4
    -8
      frappe/custom/doctype/customize_form/customize_form.js

+ 4
- 8
frappe/custom/doctype/customize_form/customize_form.js View File

@@ -50,6 +50,8 @@ frappe.ui.form.on("Customize Form", {
$(grid_row.row).css({ "font-weight": "bold" });
}

grid_row.row.removeClass("highlight");

if (grid_row.doc.is_custom_field && !grid_row.row.hasClass('highlight')) {
grid_row.row.addClass("highlight");
}
@@ -88,17 +90,11 @@ frappe.ui.form.on("Customize Form", {
},

setup_sortable: function(frm) {
frm.page.body.find(".highlight").removeClass("highlight");
frm.doc.fields.forEach(function(f, i) {
var data_row = frm.page.body.find(
'[data-fieldname="fields"] [data-idx="' + f.idx + '"] .data-row'
);

if (f.is_custom_field) {
data_row.addClass("highlight");
} else {
if (!f.is_custom_field) {
f._sortable = false;
}

if (f.fieldtype == "Table") {
frm.add_custom_button(
f.options,


Loading…
Cancel
Save