This file contains hidden or 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
({ | |
/* Hiding fields in create view of opportunities module | |
* Ajay Kumar | |
* Path : custom/modules/Opportunities/clients/base/views/create-actions/create-actions.js | |
*/ | |
extendsFrom: 'CreateActionsView', | |
initialize: function(options) { | |
this._super('initialize', [options]); | |
this.on('render', this.hideField, this); | |
}, |
This file contains hidden or 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
initialize: function(options) { | |
/* Removing 'Create' Button from relationship select field based on parent module and current module | |
* Ajay Kumar | |
* Path : custom/modules/Accounts/clients/base/views/selection-headerpane/selection-headerpane.js | |
*/ | |
var moduleMeta = app.metadata.getModule(options.module), | |
isBwcEnabled = (moduleMeta && moduleMeta.isBwcEnabled), | |
buttonsToRemove = [], | |
additionalEvents = {}; | |
if (isBwcEnabled) { |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 edit button and un link button action based on parent module field value. | |
* Ajay Kumar | |
* Path: sugar/custom/modules/Leads/clients/base/views/subpanel-list/subpanel-list.js | |
*/ | |
extendsFrom: 'SubpanelListView', | |
initialize: function(options) { | |
this._super('initialize', [options]); | |
this.on('render', this._disableActions, this); | |
}, |
This file contains hidden or 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
({ | |
extendsFrom: 'RelateField', | |
initialize: function(options) { | |
this._super('initialize', [options]); | |
}, | |
getFilterOptions: function(force) { | |
if (this._filterOptions && !force) { | |
return this._filterOptions; | |
} | |
//Defining our filter definitions |
This file contains hidden or 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 | |
$mod_strings['LBL_FILTER_ACCOUNT_TEMPLATE']='Accounts without Current Account'; |