relationship panel setup list layout method
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
[
|
||||
{"name":"status", "width": 30, "notSortable": true},
|
||||
{"name":"target", "notSortable": true},
|
||||
{"name":"executionTime", "width": 30, "notSortable": true}
|
||||
{"name":"status", "notSortable": true},
|
||||
{"name":"executionTime", "width": 25, "notSortable": true}
|
||||
]
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
[
|
||||
{"name":"status", "width": 30, "notSortable": true},
|
||||
{"name":"target", "notSortable": true},
|
||||
{"name":"executionTime", "width": 25, "notSortable": true}
|
||||
]
|
||||
@@ -1,15 +1,19 @@
|
||||
{
|
||||
"controller": "controllers/record",
|
||||
"relationshipPanels":{
|
||||
"log":{
|
||||
"readOnly": true
|
||||
}
|
||||
},
|
||||
"recordViews":{
|
||||
"list": "views/scheduled-job/record/list",
|
||||
"detail": "views/scheduled-job/record/detail"
|
||||
},
|
||||
"views": {
|
||||
"list": "views/scheduled-job/list"
|
||||
}
|
||||
"controller": "controllers/record",
|
||||
"relationshipPanels": {
|
||||
"log": {
|
||||
"readOnly": true,
|
||||
"view": "views/scheduled-job/record/panels/log"
|
||||
}
|
||||
},
|
||||
"recordViews":{
|
||||
"list": "views/scheduled-job/record/list",
|
||||
"detail": "views/scheduled-job/record/detail"
|
||||
},
|
||||
"views": {
|
||||
"list": "views/scheduled-job/list"
|
||||
},
|
||||
"jobWithTargetList": [
|
||||
"CheckEmailAccounts"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -111,6 +111,12 @@ Espo.define('views/record/panels/relationship', ['views/record/panels/bottom', '
|
||||
this.setupActions();
|
||||
|
||||
var layoutName = 'listSmall';
|
||||
this.setupListLayout();
|
||||
|
||||
if (this.listLayoutName) {
|
||||
layoutName = this.listLayoutName;
|
||||
}
|
||||
|
||||
var listLayout = null;
|
||||
var layout = this.defs.layout || null;
|
||||
if (layout) {
|
||||
@@ -120,7 +126,8 @@ Espo.define('views/record/panels/relationship', ['views/record/panels/bottom', '
|
||||
layoutName = 'listRelationshipCustom';
|
||||
listLayout = layout;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var sortBy = this.defs.sortBy || null;
|
||||
var asc = this.defs.asc || null;
|
||||
|
||||
@@ -176,6 +183,8 @@ Espo.define('views/record/panels/relationship', ['views/record/panels/bottom', '
|
||||
this.setupFilterActions();
|
||||
},
|
||||
|
||||
setupListLayout: function () {},
|
||||
|
||||
setupActions: function () {},
|
||||
|
||||
setupFilterActions: function () {
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
Espo.define('views/scheduled-job/record/panels/log', 'views/record/panels/relationship', function (Dep) {
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
setupListLayout: function () {
|
||||
var jobWithTargetList = this.getMetadata().get(['clientDefs', 'ScheduledJob', 'jobWithTargetList']) || [];
|
||||
if (~jobWithTargetList.indexOf(this.model.get('job'))) {
|
||||
this.listLayoutName = 'listSmallWithTarget'
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user