Hi all
I try to call function after click a button in list view on Email subpanel in Cases module but it not working, controller don't return anythings in console log.
Can someone help me to find out why it not working ?
custom/modules/Emails/clients/base/views/subpanel-for-cases-archived_emails/subpanel-for-cases-archived_emails.php
<?php
// created: 2016-05-02 14:56:36
$viewdefs['Emails']['base']['view']['subpanel-for-cases-archived_emails'] = array (
'panels' =>
array (
0 =>
array (
'name' => 'panel_header',
'label' => 'LBL_PANEL_1',
'fields' =>
array (
0 =>
array (
'label' => 'LBL_LIST_SUBJECT',
'enabled' => true,
'default' => true,
'name' => 'name',
'link' => 'true',
'width' => 'large',
),
1 =>
array (
'name' => 'description',
'label' => 'description',
'enabled' => true,
'width' => 'large',
'default' => true,
),
2 =>
array (
'label' => 'LBL_LIST_STATUS',
'enabled' => true,
'default' => true,
'name' => 'status',
'width' => 'xsmall',
),
3 =>
array (
'label' => 'LBL_DATE_CREATED',
'enabled' => true,
'default' => true,
'name' => 'date_entered',
'readonly' => true,
'width' => 'small',
),
4 =>
array (
'label' => 'LBL_DATE_MODIFIED',
'enabled' => true,
'default' => true,
'name' => 'date_modified',
'readonly' => true,
'width' => 'small',
),
5 =>
array (
'name' => 'assigned_user_name',
'target_record_key' => 'assigned_user_id',
'target_module' => 'Employees',
'label' => 'LBL_LIST_ASSIGNED_TO_NAME',
'enabled' => true,
'default' => true,
'width' => 'small',
),
),
),
),
'rowactions' =>
array (
'actions' =>
array (
array(
'type' => 'rowaction',
'css_class' => 'btn',
'event' => 'list:do_some_task:fire',
'label' => 'LBL_OPEN_EMAIL_DETAILS',
'icon' => 'fa-frown-o',
'tooltip' => 'do_some_task',
'acl_action' => 'create',
),
),
),
'type' => 'subpanel-list',
);
custom/modules/Emails/clients/base/views/subpanel-for-cases-archived_emails/subpanel-for-cases-archived_emails.js
({
extendsFrom:'SubpanelListView',
initialize: function(options){
this._super('initialize', [options]);
this.context.on('list:xxxxx:fire',this.xxxXX, this);
this.context.on('list:do_some_task:fire', this.do_some_task, this);
console.log("-------");
},
do_some_task: function(event) {
console.log("do_some_task");
},
xxxXX: function(event) {
console.log("xxxXX");
},
});
Sugar 7.7
Thanks,
M