I have some very basic custom Dashlets that we've had since the intelligence pane was first introduced years ago.
Since upgrading from v11 -> v14.x we lost the scroll bars on the side/bottom of these dashlets.
Any suggestions on how to rewrite/correct these?
The dashlets are all similar, with a controller that calls an API (in Sugar or an external resource), takes the results and puts them in a very basic table:
controller:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
({
tagName: 'ul',
className: 'dashlet-childContracts',
plugins: ['Dashlet'],
resources:{},
initDashlet: function(view) {
var self = this,
index = 0,
contract_number = this.model.get('contract_number'),
url = app.api.buildURL('getChildContracts/'+contract_number);
self.resources = new Object();
app.api.call('GET', url, null, {
success:function(data){
self.total = data.length;
_.each(data, function(value, key){
self.resources[index] = {
'contract_url':'index.php#wcont_WContracts/'+value['id'],
'name':value['name'],
'contract_number':value['contract_number'],
'contract_status':value['contract_status'],
'contract_type': value['contract_type'],
metadata:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
$viewdefs['base']['view']['dashlet-childContracts'] = array(
'dashlets' => array(
array(
'label' => 'LBL_CHILD_CONTRACTS_DASHLET',
'description' => 'LBL_CHILD_CONTRACTS_DASHLET_DESC',
'config' => array(),
'preview' => array(),
'filter' => array(
'module' => array(
'wcont_WContracts',
),
'view' => 'record',
),
),
),
);
hbs:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{{!--
*/ formats output `
--}}
class="flex-list-view-content"
class="table table-striped dataTable"
Contract Num
Effective Date
Expiration Date
Limited Coverage
Contract Status
Contract Type
{{#each resources}}
href="{{contract_url}}" target="_blank"{{str contract_number module}}
{{effective_date}}
{{expiration_date}}
{{contract_status}}
{{contract_type}}