list fixes
This commit is contained in:
@@ -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( '</' + tag + '>');
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
</td>
|
||||
<% }); %>
|
||||
</tr>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
{{#if checkboxes}}
|
||||
<th width="50">
|
||||
<th width="40">
|
||||
<input type="checkbox" class="select-all">
|
||||
{{#unless checkAllResultDisabled}}
|
||||
<div class="btn-group checkbox-dropdown">
|
||||
@@ -47,7 +47,7 @@
|
||||
</th>
|
||||
{{/if}}
|
||||
{{#each headerDefs}}
|
||||
<th {{#if width}} width="{{width}}%"{{/if}}{{#if align}} style="text-align: {{align}};"{{/if}}>
|
||||
<th {{#if width}} width="{{width}}"{{/if}}{{#if align}} style="text-align: {{align}};"{{/if}}>
|
||||
{{#if this.sortable}}
|
||||
<a href="javascript:" class="sort" data-name="{{this.name}}">
|
||||
{{#if this.hasCustomLabel}}
|
||||
|
||||
@@ -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%',
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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: []
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -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%'
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user