-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
[REF] Cleanup billingBlock.js #22713
Conversation
(Standard links)
|
function civicrm_billingblock_creditcard_helper() { | ||
$(function() { | ||
$.each(CRM.config.creditCardTypes, function(key, val) { | ||
var html = '<a href="#" data-card_type=" + key + " title="' + val + '" class="crm-credit_card_type-icon-' + val.css_key + '"><span>' + val.label + '</span></a>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note data-card_type
was never set correctly due to bad js concatenation here, so it's obviously unused and not needed.
|
||
civicrm_billingblock_creditcard_helper(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was silly. The function just called another function.
7dc4409
to
8c2b268
Compare
This looks much better 👍 |
This has been merge ready for a few days merging now |
Overview
Code cleanup in
billingBlock.js
Before
Code messier - unnecessary functions, deprecated variables, malformed html
After
Code neater