From e0ffe3d367cb58720fe4427427e2e3e48c658b9e Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 9 Nov 2023 11:52:53 +0200 Subject: [PATCH] cs --- client/src/views/admin/layouts/rows.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/client/src/views/admin/layouts/rows.js b/client/src/views/admin/layouts/rows.js index 6c99d47d68..dbd016d12d 100644 --- a/client/src/views/admin/layouts/rows.js +++ b/client/src/views/admin/layouts/rows.js @@ -56,7 +56,7 @@ define('views/admin/layouts/rows', ['views/admin/layouts/base'], function (Dep) Dep.prototype.setup.call(this); this.events['click a[data-action="editItem"]'] = e => { - let name = $(e.target).closest('li').data('name'); + const name = $(e.target).closest('li').data('name'); this.editRow(name); }; @@ -71,11 +71,13 @@ define('views/admin/layouts/rows', ['views/admin/layouts/base'], function (Dep) }, onRemove: function () { - if (this.$style) this.$style.remove(); + if (this.$style) { + this.$style.remove(); + } }, editRow: function (name) { - var attributes = Espo.Utils.cloneDeep(this.itemsData[name] || {}); + const attributes = Espo.Utils.cloneDeep(this.itemsData[name] || {}); attributes.name = name; this.openEditDialog(attributes) @@ -98,18 +100,18 @@ define('views/admin/layouts/rows', ['views/admin/layouts/base'], function (Dep) onDrop: function (e) {}, fetch: function () { - var layout = []; + const layout = []; $("#layout ul.enabled > li").each((i, el) => { - var o = {}; + const o = {}; - var name = $(el).data('name'); + const name = $(el).data('name'); - var attributes = this.itemsData[name] || {}; + const attributes = this.itemsData[name] || {}; attributes.name = name; this.dataAttributeList.forEach(attribute => { - var value = attributes[attribute] || null; + const value = attributes[attribute] || null; if (value) { o[attribute] = value;