/ Published in: JavaScript
This is just a collection of items that will need to be sorted out later into separate snippets.
Expand |
Embed | Plain Text
/** * argos-sample project. * User: jhershauer * Date: 4/9/11 * Time: 11:02 PM */ Ext.namespace('Mobile.Sample'); Mobile.Sample.ApplicationModule = Ext.extend(Sage.Platform.Mobile.ApplicationModule, { //localization strings regionText: 'region', faxText: 'fax num', loadViews: function() { Mobile.Sample.ApplicationModule.superclass.loadViews.apply(this, arguments); }, loadCustomizations: function() { Mobile.Sample.ApplicationModule.superclass.loadCustomizations.apply(this, arguments); this.registerAccountCustomizations(); }, registerAccountCustomizations: function() { //Add Region to the SData query for the Account Detail view var detailView = Mobile.SalesLogix.Account.Detail; Ext.override(detailView, { querySelect: detailView.prototype.querySelect.concat([ 'Region' ]) }); //Add Region to the Account Detail view, right above the Type property this.registerCustomization('detail', 'account_detail', { at: function(row) { return row.name == 'Type'; }, type: 'insert', where: 'before', value: { name: 'Region', label: this.regionText } }); //Change label for fax on Account Detail view this.registerCustomization('detail', 'account_detail', { at: function(row) { return row.name == 'Fax'; }, type: 'modify', value: { label: this.faxText } }); //Hide the Lead Source this.registerCustomization('detail', 'account_detail', { at: function(row) { return row.name == 'LeadSource.Description'; }, type: 'remove' }); //Clear out the toolbar on the right-hand side of the Account Detail view. Ext.override(Mobile.SalesLogix.Account.Detail, { init: function() { Mobile.SalesLogix.Account.Detail.superclass.init.apply(this, arguments); this.tools.tbar = []; } }); } });
You need to login to post a comment.
