1 // http://civicrm.org/licensing
2 // Adds ajaxy behavior to a simple CiviCRM page
4 $('#crm-main-content-wrapper')
5 // Widgetize the content area
7 // Open action links in a popup
8 .off('click.crmLivePage')
9 .on('click.crmLivePage', 'a.button, a.action-item', function() {
10 var url
= $(this).attr('href');
11 // only follow real links not javascript buttons
12 if (url
=== '#' || $(this).attr('onclick') || $(this).hasClass('no-popup')) {
16 openInline
: 'a:not("[href=#], .no-popup")'
17 }).on('crmFormSuccess', function(e
, data
) {
18 // Refresh page when form completes
19 $('#crm-main-content-wrapper').crmSnippet('refresh');