|
@@ -50,6 +50,8 @@ frappe.ui.form.on("Customize Form", { |
|
|
$(grid_row.row).css({ "font-weight": "bold" }); |
|
|
$(grid_row.row).css({ "font-weight": "bold" }); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
grid_row.row.removeClass("highlight"); |
|
|
|
|
|
|
|
|
if (grid_row.doc.is_custom_field && !grid_row.row.hasClass('highlight')) { |
|
|
if (grid_row.doc.is_custom_field && !grid_row.row.hasClass('highlight')) { |
|
|
grid_row.row.addClass("highlight"); |
|
|
grid_row.row.addClass("highlight"); |
|
|
} |
|
|
} |
|
@@ -88,17 +90,11 @@ frappe.ui.form.on("Customize Form", { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
setup_sortable: function(frm) { |
|
|
setup_sortable: function(frm) { |
|
|
frm.page.body.find(".highlight").removeClass("highlight"); |
|
|
|
|
|
frm.doc.fields.forEach(function(f, i) { |
|
|
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; |
|
|
f._sortable = false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (f.fieldtype == "Table") { |
|
|
if (f.fieldtype == "Table") { |
|
|
frm.add_custom_button( |
|
|
frm.add_custom_button( |
|
|
f.options, |
|
|
f.options, |
|
|