X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=js%2Fcrm.livePage.js;h=35c8b39312dd7cc3a333c4d5dc255b364798e929;hb=d1c5a34c937988e99af7cdde6cd9ba63281c89b9;hp=ca315585097e85dd8c66f5bb1ab143c482983e83;hpb=1a62cf90111b5e8b48a8810048ccd4cef0355f5f;p=civicrm-core.git diff --git a/js/crm.livePage.js b/js/crm.livePage.js index ca31558509..35c8b39312 100644 --- a/js/crm.livePage.js +++ b/js/crm.livePage.js @@ -1,14 +1,12 @@ // http://civicrm.org/licensing // Adds ajaxy behavior to a simple CiviCRM page -cj(function($) { +CRM.$(function($) { + var active = 'a.button, a.action-item:not(.crm-enable-disable), a.crm-popup'; $('#crm-main-content-wrapper') // Widgetize the content area .crmSnippet() // Open action links in a popup .off('.crmLivePage') - .on('click.crmLivePage', 'a.button, a.action-item', CRM.popup) - .on('crmPopupFormSuccess.crmLivePage', 'a.button, a.action-item', function() { - // Refresh page when form completes - $('#crm-main-content-wrapper').crmSnippet('refresh'); - }); + .on('click.crmLivePage', active, CRM.popup) + .on('crmPopupFormSuccess.crmLivePage', active, CRM.refreshParent); });