Skip to content

Instantly share code, notes, and snippets.

<?php
/*
*custom/Extension/modules/Accounts/Ext/clients/base/filters/basic/FilerAccountTemplate.php
* Ajay Kumar
*/
$viewdefs['Accounts']['base']['filter']['basic']['filters'][] = array(
'id' => 'FilterAccountTemplate',
'name' => 'LBL_FILTER_ACCOUNT_TEMPLATE',
'filter_definition' => array(
'name' => array(
({
/*Registering Button action for Keyboard shortcut
* Ajay Kumar
* custom/modules/Accounts/clients/base/views/record/reord.js
*/
extendsFrom: 'RecordView',
initialize: function(options) {
this._super('initialize', [options]);
this.events = _.extend({}, this.events, {
'click a[name=test_button]': '_testAlert',
@AjayKumar01
AjayKumar01 / record.js
Last active May 29, 2016 05:05
Adding Shortcut name in record.js
/*custom/modules/Accounts/clients/base/layouts/record/record.js
* Ajay Kumar
*/
({
plugins: ['ShortcutSession'],
shortcuts: ['Sidebar:Toggle', 'Record:Edit', 'Record:Delete', 'Record:Save', 'Record:Cancel', 'Record:Previous', 'Record:Next', 'Record:Favorite', 'Record:Follow', 'Record:Copy', 'Record:Action:More', 'Record:Test']
})
array(
'type'=>'rowaction',
'event'=>'button:check_button:click',
'name'=>'check_button',
'label'=>'LBL_CHECK_BUTTON_LABEL',
'acl_action'=>'view',
),
<?php
/*Setting Label for button
* AjayKumar
* custom/Extension/modules/Accounts/Ext/Language/en_us.check_button.php
*/
$mod_strings['LBL_CHECK_BUTTON_LABEL']='Checking router record';
({
/*Disabling button ,condition based or dynamically on RecordView.
* AjayKumar
* custom/modules/Accounts/clients/base/views/record/reord.js
*/
extendsFrom:'RecordView',
initialize:function(options){
this._super('initialize',[options]);
this.on('render',this.makedisableButton,this);
},