This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
/** | |
* Purpose:Limiting the subpanel records based on parent module | |
* Here we are limiting contacts module records based on parent module(Opporunities,Accounts and other module) * | |
* Path : sugar/custom/modules/contacts/clients/base/views/subpanel-list/subpanel-list.js | |
* Written by: Ajay Kumar | |
* Dated: 31 May 2016 | |
*/ | |
extendsFrom:'RecordlistView', | |
fallbackFieldTemplate: 'list', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.google.com/settings/u/0/security/lesssecureapps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Script to take automatic db dump | |
#Written by Ajay Kumar | |
#Dated 07 July 2016 | |
DBUSERNAME="root" | |
DBPASS="*******" | |
BACKUPDIR="/home/restore/" | |
TODAY=`date +"%A"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
/* Disabling create and link existing button action in subpanel based on parent module. | |
* Ajay Kumar | |
* Path : sugar/custom/modules/Leads/clients/base/views/panel-top/panel-top.js | |
*/ | |
extendsFrom: 'PanelTopView', | |
initialize: function(options) { | |
this._super('initialize', [options]); | |
var industryValue = this.context.parent.get('model').get("industry"); | |
var parentModule = this.context.parent.get('module'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
/* Disabling create and link existing button action in subpanel based on parent module. | |
* Ajay Kumar | |
* Path : sugar/custom/modules/Leads/clients/base/views/panel-top/panel-top.js | |
*/ | |
extendsFrom: 'PanelTopView', | |
initialize: function(options) { | |
this._super('initialize', [options]); | |
var parentModule = this.context.parent.get('model').module; | |
var parentCollection = this.context.parent.get('collection'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Hiding tabs using dependency in Record view | |
* Ajay Kumar | |
* Path : custom/Extension/modules/Opportunities/Ext/Dependencies/hidetabs.php | |
*/ | |
$dependencies['Opportunities']['hide_tabs'] = array( | |
'hooks' => array( | |
"edit", | |
"view" | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Removing import menu option from Accounts module menu. | |
* Ajay Kumar | |
* Path : /custom/modules/Accounts/clients/base/menus/header/header.php. | |
*/ | |
$moduleName = 'Accounts'; | |
$viewdefs[$moduleName]['base']['menu']['header'] = array( | |
array( | |
'label' =>'LNK_NEW_ACCOUNT', | |
'acl_action'=>'create', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
/* Making field required dynamically based on condition | |
* Ajay Kumar | |
* Path : custom/modules/Opportunities/clients/base/views/record/record.js | |
*/ | |
extendsFrom: 'RecordView', | |
initialize: function(options) { | |
this._super('initialize', [options]); | |
this.on('render', this.testFunc, this); | |
this.model.on('change:probability', this.testFunc, this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
/*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); | |
}, |
NewerOlder