CRM-20304 Add no-open class so modal stays open but doesn't open on page
authorMargaret Epps <mepps@wikimedia.org>
Fri, 29 Sep 2017 20:11:22 +0000 (16:11 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 9 Oct 2017 03:32:14 +0000 (23:32 -0400)
js/crm.ajax.js
templates/CRM/Custom/Page/Option.tpl

index 262227ea895c2541ad775bde62b26a4f4217b353..5f299a1c815eccc3e2b116e456e0d0baffc83774 100644 (file)
       settings = $el.data('popup-settings') || {},
       formData = false;
     settings.dialog = settings.dialog || {};
-    if (e.isDefaultPrevented() || !CRM.config.ajaxPopupsEnabled || !url || $el.is(exclude)) {
+    if (e.isDefaultPrevented() || !CRM.config.ajaxPopupsEnabled || !url || $el.is(exclude + ', .no-open')) {
       return;
     }
     // Sized based on css class
index 68463ef816c5bb49a4c9d4fc394bfc071ddc2b04..a1b0a7c49eea133a9fc2a3dd79c0186fb34ee97a 100644 (file)
       {/literal}
 
       <div class="action-link">
-          {crmButton q="reset=1&action=map&fid=$fid&gid=$gid" class="action-item" icon="sort-alpha-asc"}{ts}Alphabetize Options{/ts}{/crmButton}
+          {crmButton q="reset=1&action=map&fid=$fid&gid=$gid" class="action-item no-open" icon="sort-alpha-asc"}{ts}Alphabetize Options{/ts}{/crmButton}
           {crmButton q="reset=1&action=add&fid=$fid&gid=$gid" class="action-item" icon="plus-circle"}{ts}Add Option{/ts}{/crmButton}
           {crmButton p="civicrm/admin/custom/group/field" q="reset=1&action=browse&gid=$gid" class="action-item cancel" icon="times"}{ts}Done{/ts}{/crmButton}
       </div>