CRM-13863 - Whitelist instead of blacklist open-inline
authorColeman Watts <coleman@civicrm.org>
Fri, 14 Mar 2014 13:21:05 +0000 (09:21 -0400)
committerColeman Watts <coleman@civicrm.org>
Fri, 14 Mar 2014 13:21:05 +0000 (09:21 -0400)
js/Common.js
js/crm.livePage.js
js/crm.searchForm.js

index 1be50a619de212b7fb1ec33dfcf1123f99bf4343..2f79c8e10499ef16f56ca54b9462b91694ded2f1 100644 (file)
@@ -907,7 +907,7 @@ CRM.validate = CRM.validate || {
         validate: true,
         refreshAction: ['next_new', 'submit_savenext'],
         cancelButton: '.cancel.form-submit',
-        openInline: 'a.button:not("[href=#], .no-popup")',
+        openInline: 'a.open-inline, a.button:not("[href=#], .no-popup")',
         onCancel: function(event) {},
         onError: function(data) {
           var $el = $(this);
index dff3beff868df33ca65998617181205e7ebf906d..ea355ffb5c991440f2d74d925212fdc4492d7545 100644 (file)
@@ -12,9 +12,7 @@ cj(function($) {
       if (url === '#' || $(this).attr('onclick') || $(this).hasClass('no-popup')) {
         return;
       }
-      CRM.loadForm(url, {
-        openInline: 'a:not("[href=#], .no-popup")'
-      }).on('crmFormSuccess', function(e, data) {
+      CRM.loadForm(url).on('crmFormSuccess', function(e, data) {
         // Refresh page when form completes
         $('#crm-main-content-wrapper').crmSnippet('refresh');
       });
index 289ef57d7bb16591bbfd324d4a94abf5ad00c165..181a204549dd1a4ae7f7670c8630a50104d7302b 100644 (file)
@@ -12,9 +12,7 @@ cj(function($) {
         if (url === '#' || $(this).attr('onclick') || $(this).hasClass('no-popup')) {
           return;
         }
-        CRM.loadForm(url, {
-          openInline: 'a:not("[href=#], .no-popup")'
-        }).on('crmFormSuccess', function (e, data) {
+        CRM.loadForm(url).on('crmFormSuccess', function (e, data) {
           // Refresh page when form completes
           $('#crm-main-content-wrapper').crmSnippet('refresh');
         });