Hi,
Someone created a list view action for a custom module, but the customer decided they want this action available in the contracts module.
I moved the recordlist.php to: /custom/Extension/modules/Contracts/Ext/clients/base/views/recordlist/recordlist.php
and the massupdate.js to: /custom/modules/Contracts/clients/base/views/massupdate.js
But the action still shows up in the previous custom module and not in the Contracts module. Why? What am I doing wrong?
Thanks,
Stijn
<?php
$viewdefs['Contracts']['base']['view']['recordlist']['selection' ]['actions'][] = array(
'name' => 'div',
'type' => 'divider',
'acl_action' => 'view',
);
$viewdefs['Contracts']['base']['view']['recordlist']['selection' ]['actions'][] = array(
'name' => 'create_only',
'type' => 'button',
'label' => 'LBL_CREATE_ONLY',
'primary' => true,
'events' => array(
'click' => 'list:createonly:fire',
),
'acl_action' => 'view',
);
?>
// massupdate.js
({
extendsFrom : 'MassupdateView',
initialize: function(options) {
this._super('initialize', [options]);
},
delegateListFireEvents: function() {
this._super('delegateListFireEvents');
this.layout.on("list:createonly:fire", this.CreateOnly, this);
},
CreateOnly: function() {
var itemsSelected = this.context.get('mass_collection');
console.log('run action: ', itemsSelected);
}
})