CRM-16310 - Fix inline link handling with dynamic content
authorColeman Watts <coleman@civicrm.org>
Tue, 2 Jun 2015 20:58:57 +0000 (16:58 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 2 Jun 2015 20:58:57 +0000 (16:58 -0400)
js/crm.ajax.js

index 8d266e38bd41186d4539f0b1288d15fcd4347fe0..8edebab812d0fc2bcc7d828a37671780b64e88e5 100644 (file)
       }, settings.ajaxForm));
       if (settings.openInline) {
         settings.autoClose = $el.crmSnippet('isOriginalUrl');
-        $(settings.openInline, this).not(exclude + ', .crm-popup').click(function(event) {
+        $(this).on('click', settings.openInline, function(e) {
+          if ($(this).is(exclude + ', .crm-popup')) {
+            return;
+          }
           if ($(this).hasClass('open-inline-noreturn')) {
             // Force reset of original url
             $el.data('civiCrmSnippet')._originalUrl = $(this).attr('href');
           }
           $el.crmSnippet('option', 'url', $(this).attr('href')).crmSnippet('refresh');
-          return false;
+          e.preventDefault();
         });
       }
       // Show form buttons as part of the dialog