Commit | Line | Data |
---|---|---|
b7798527 | 1 | // http://civicrm.org/licensing |
6eafcb19 | 2 | // Adds ajaxy behavior to a simple CiviCRM page |
b7798527 CW |
3 | cj(function($) { |
4 | $('#crm-main-content-wrapper') | |
5 | // Widgetize the content area | |
6eafcb19 | 6 | .crmSnippet() |
b7798527 | 7 | // Open action links in a popup |
6eafcb19 CW |
8 | .on('click', 'a.button, a.action-item:not(".enable-action, .disable-action")', function() { |
9 | CRM.loadForm($(this).attr('href'), { | |
10 | openInline: 'a' | |
11 | }).on('crmFormSuccess', function(e, data) { | |
b7798527 CW |
12 | // Refresh page when form completes |
13 | $('#crm-main-content-wrapper').crmSnippet('refresh'); | |
14 | }); | |
15 | return false; | |
16 | }); | |
17 | }); |