Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-20304 Bug fixes to Alphabetize options #11045

Merged
merged 6 commits into from
Oct 10, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
CRM-20304 Tweak open-inline classes
open-inline implies that it will not pop up, so this explicitly excludes them.
This allows us to fix the problem where clicking the sort button would add to the history of the popup and take you "back" when clicking done instead of simply closing the dialog.
  • Loading branch information
colemanw committed Oct 9, 2017
commit 71bdf27c5e8d90d8de6e0a6b234f9da0128599a2
2 changes: 1 addition & 1 deletion js/crm.ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@
settings = $el.data('popup-settings') || {},
formData = false;
settings.dialog = settings.dialog || {};
if (e.isDefaultPrevented() || !CRM.config.ajaxPopupsEnabled || !url || $el.is(exclude + ', .no-open')) {
if (e.isDefaultPrevented() || !CRM.config.ajaxPopupsEnabled || !url || $el.is(exclude + ', .open-inline, .open-inline-noreturn')) {
return;
}
// Sized based on css class
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/Custom/Page/Option.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
{/literal}

<div class="action-link">
{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=map&fid=$fid&gid=$gid" class="action-item open-inline-noreturn" 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>
Expand Down