CRM-14383 - Update additional script closures
[civicrm-core.git] / js / crm.livePage.js
1 // http://civicrm.org/licensing
2 // Adds ajaxy behavior to a simple CiviCRM page
3 CRM.$(function($) {
4 var active = 'a.button, a.action-item, a.crm-popup';
5 $('#crm-main-content-wrapper')
6 // Widgetize the content area
7 .crmSnippet()
8 // Open action links in a popup
9 .off('.crmLivePage')
10 .on('click.crmLivePage', active, CRM.popup)
11 .on('crmPopupFormSuccess.crmLivePage', active, function() {
12 // Refresh page when form completes
13 $('#crm-main-content-wrapper').crmSnippet('refresh');
14 });
15 });