Parcourir la source

fix: Remove row highlight code from setup_sortable method

version-14
Shariq Ansari il y a 3 ans
Parent
révision
36a69f9e0d
1 fichiers modifiés avec 4 ajouts et 8 suppressions
  1. +4
    -8
      frappe/custom/doctype/customize_form/customize_form.js

+ 4
- 8
frappe/custom/doctype/customize_form/customize_form.js Voir le fichier

@@ -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,


Chargement…
Annuler
Enregistrer