diff --git a/frontend/client/res/layout-types/list-row.tpl b/frontend/client/res/layout-types/list-row.tpl index bd4dc62a2b..f9d288939f 100644 --- a/frontend/client/res/layout-types/list-row.tpl +++ b/frontend/client/res/layout-types/list-row.tpl @@ -14,7 +14,7 @@ <% var tag = 'tag' in defs ? defs.tag : false; if (tag) { - print( '<' + tag); + print( '<' + tag); if ('id' in defs) { print(' id="'+defs.id+'"'); } @@ -22,12 +22,12 @@ print(' class="'+defs.class+'"'); }; print('>'); - } + } %>{{{<%= defs.name %>}}}<% if (tag) { print( ''); } %> - + <% }); %> diff --git a/frontend/client/res/templates/record/list.tpl b/frontend/client/res/templates/record/list.tpl index 7faefb7ec7..62c16fd9c1 100644 --- a/frontend/client/res/templates/record/list.tpl +++ b/frontend/client/res/templates/record/list.tpl @@ -32,7 +32,7 @@ {{#if checkboxes}} - + {{#unless checkAllResultDisabled}}
@@ -47,7 +47,7 @@ {{/if}} {{#each headerDefs}} - + {{#if this.sortable}} {{#if this.hasCustomLabel}} diff --git a/frontend/client/src/views/admin/auth-token/record/list.js b/frontend/client/src/views/admin/auth-token/record/list.js index 539f7bab05..7c992d48cb 100644 --- a/frontend/client/src/views/admin/auth-token/record/list.js +++ b/frontend/client/src/views/admin/auth-token/record/list.js @@ -17,27 +17,17 @@ * * You should have received a copy of the GNU General Public License * along with EspoCRM. If not, see http://www.gnu.org/licenses/. - ************************************************************************/ + ************************************************************************/ Espo.define('Views.Admin.AuthToken.Record.List', 'Views.Record.List', function (Dep) { return Dep.extend({ - + rowActionsView: 'Admin.AuthToken.Record.RowActions.Remove', - - setup: function () { - Dep.prototype.setup.call(this); - - var actions = []; - - this.actions.forEach(function (item) { - if (item.name == 'delete') { - actions.push(item); - } - }, this); - - this.actions = actions; - }, + + massActionList: ['remove'], + + rowActionsColumnWidth: '5%', }); }); diff --git a/frontend/client/src/views/extension/record/list.js b/frontend/client/src/views/extension/record/list.js index d7649f71fd..4249966eaf 100644 --- a/frontend/client/src/views/extension/record/list.js +++ b/frontend/client/src/views/extension/record/list.js @@ -17,27 +17,21 @@ * * You should have received a copy of the GNU General Public License * along with EspoCRM. If not, see http://www.gnu.org/licenses/. - ************************************************************************/ + ************************************************************************/ Espo.define('Views.Extension.Record.List', 'Views.Record.List', function (Dep) { return Dep.extend({ - + rowActionsView: 'Extension.Record.RowActions', - + checkboxes: false, - - removeAction: false, - - mergeAction: false, - - massUpdateAction: false, - - exportAction: false, - + allowQuickEdit: false, - + + massActionList: [] + }); - + }); diff --git a/frontend/client/src/views/extension/record/row-actions.js b/frontend/client/src/views/extension/record/row-actions.js index dc66b2132b..b03a5bad06 100644 --- a/frontend/client/src/views/extension/record/row-actions.js +++ b/frontend/client/src/views/extension/record/row-actions.js @@ -17,15 +17,15 @@ * * You should have received a copy of the GNU General Public License * along with EspoCRM. If not, see http://www.gnu.org/licenses/. - ************************************************************************/ + ************************************************************************/ Espo.define('Views.Extension.Record.RowActions', 'Views.Record.RowActions.Default', function (Dep) { return Dep.extend({ - + getActions: function () { if (this.options.acl.edit) { - + if (this.model.get('isInstalled')) { return [ { @@ -33,7 +33,7 @@ Espo.define('Views.Extension.Record.RowActions', 'Views.Record.RowActions.Defaul label: 'Uninstall', data: { id: this.model.id - } + } }, ]; @@ -44,21 +44,21 @@ Espo.define('Views.Extension.Record.RowActions', 'Views.Record.RowActions.Defaul label: 'Install', data: { id: this.model.id - } + } }, { action: 'quickRemove', label: 'Remove', data: { id: this.model.id - } + } } ]; } } }, - + }); - + }); diff --git a/frontend/client/src/views/record/list.js b/frontend/client/src/views/record/list.js index b1883d5035..ebeec54a94 100644 --- a/frontend/client/src/views/record/list.js +++ b/frontend/client/src/views/record/list.js @@ -54,6 +54,8 @@ Espo.define('Views.Record.List', 'View', function (Dep) { showCount: true, + rowActionsColumnWidth: 25, + events: { 'click a.link': function (e) { if (!this.scope || this.selectable) { @@ -520,11 +522,17 @@ Espo.define('Views.Record.List', 'View', function (Dep) { var defs = []; for (var i in this.listLayout) { + var width = false; + if ('width' in this.listLayout[i]) { + width = this.listLayout[i].width += '%'; + } else if ('widthPx' in this.listLayout[i]) { + width = this.listLayout[i].width; + } var item = { name: this.listLayout[i].name, sortable: !(this.listLayout[i].notSortable || false), - width: ('width' in this.listLayout[i]) ? this.listLayout[i].width : false, + width: width, align: ('align' in this.listLayout[i]) ? this.listLayout[i].align : false, }; if ('customLabel' in this.listLayout[i]) { @@ -541,7 +549,7 @@ Espo.define('Views.Record.List', 'View', function (Dep) { }; if (this.rowActionsView) { defs.push({ - width: '5%', + width: this.rowActionsColumnWidth, }); } return defs; @@ -632,7 +640,6 @@ Espo.define('Views.Record.List', 'View', function (Dep) { options: { defs: { params: { - width: '5%' } }, }, diff --git a/frontend/less/espo/custom.less b/frontend/less/espo/custom.less index 8d8c9a6468..450eec4fac 100644 --- a/frontend/less/espo/custom.less +++ b/frontend/less/espo/custom.less @@ -88,6 +88,7 @@ div.list-expanded > ul > li > div.expanded-row > .cell:first-child { .list .checkbox-dropdown { margin-right: -10px; + margin-top: 2px; } .list .checkbox-dropdown > a { @@ -307,7 +308,13 @@ table.table > tbody td > .list-row-buttons button { .list > table th input[type="checkbox"] { margin: 0; position: relative; - top: 3px; + top: 2px; +} + +.list > table th input[type="checkbox"] { + margin: 0; + position: relative; + top: 5px !important; } .list > table th span.caret {