- .on('click', 'a.button, a.action-item:not(".enable-action, .disable-action")', function() {
- CRM.loadForm($(this).attr('href'), {
- openInline: 'a'
- }).on('crmFormSuccess', function(e, data) {
- // Refresh page when form completes
- $('#crm-main-content-wrapper').crmSnippet('refresh');
- });
- return false;
- });
+ .off('.crmLivePage')
+ .on('click.crmLivePage', active, CRM.popup)
+ .on('crmPopupFormSuccess.crmLivePage', active, CRM.refreshParent);