Custom components stopped working after v13.0 upgrade

Dear club members,

After upgrading SugarCRM from v12.0.0 to v13.0.0, our custom components have stopped working.

For instance, we use custom-route.js to have a pop-up window on the Contact module, it's showing normally on our dev environment (it has v12.0.0) but is not working on SugarCRM v13 (prod one).  

I don't see anything on the browser console related to it.

The code is:

-> sugarcrm/custom/javascript/custom-routes.js

(function(app) {
app.events.on('router:init', function() {
app.router.route('custom/contact/import', 'open', function() {
app.events.trigger('custom/contact/import:open');
});
app.router.route('custom/contact/import/prospected', 'open', function() {
app.events.trigger('custom/contact/import/prospected:open');
});
});
})(SUGAR.App);

-> sugarcrm/custom/Extension/modules/Contacts/Ext/clients/base/menus/header/addContactMenuOptions.php

<?php
// Replace Sugar Import Link with Interchange Import App Link
$viewdefs['Contacts']['base']['menu']['header'][4] = array(
'route'=>'#custom/contact/import',
'label' =>'LNK_IMPORT_CONTACTS_INTERCHANGE',
'acl_module'=>'Contacts',
'icon' => 'fa-arrow-circle-o-up',
);

-> sugarcrm/custom/clients/base/views/contact-import/

- contact-import.hbs

The Div to display

- contact-import.js

({
_classes: {
hideApp: 'contact-import--hidden',
optionSelected: 'contact-import__search-option--selected'
},

_constants: {

},

_selectors: {
connectionLoader: '.js-contact-import-connection-loading',
contactImportButton: '.js-contact-import-create-contact-btn',
indicator: '.js-contact-import-indicator',
searchOption: '.contact-import__search-option',
searchInput: '#contact-import-search-input',
searchResult: '.js-contact-import-search-result',
searchResults: '.js-contact-import-search-results',
searchLoader: '.js-contact-import-search-loading',
selected: '.contact-import__search-option--selected'
},

_templates: {},

className: 'contact-import contact-import--hidden',

events: {
'click .js-contact-import-close': 'hideImportApp',
'click .js-contact-import-create-contact-btn': 'handleConnectionClick',
'click .js-contact-import-switch': 'handleSwitchClick',
'keyup #contact-import-search-input': 'handleSearchKeyup'
},

initialize: function(options) {
app.view.View.prototype.initialize.call(this, options);
app.events.on('custom/contact/import:open', this.showImportApp, this);
...
this.initTemplates();
},


initTemplates: function() {
this._templates.result = app.template.getView('contact-import.results');
},

showImportApp: function() {
this.$el.removeClass(this._classes.hideApp);
this.$el.find(this._selectors.searchInput).focus();
...
},

})

- contact-import.php

<?php
$viewdefs['base']['view']['contact-import'] = array(
'template' => 'contact-import',
);
?>

Is there something different between v12 and v13 about Implementing custom components?

Parents Reply Children
No Data