Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

Prefix classes needed for JS functionality with 'js-'#743

Open
gauravjeet wants to merge 1 commit intodrupalcommerce:8.x-2.x from
gauravjeet:2877358
Open

Prefix classes needed for JS functionality with 'js-' #743
gauravjeet wants to merge 1 commit intodrupalcommerce:8.x-2.x from
gauravjeet:2877358

Conversation

@gauravjeet
Copy link

@gauravjeet gauravjeet commented Jun 2, 2017

Copy link
Contributor

@mglaman mglaman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add the js- class name along with the existing. Just because people will be theming against the existing CSS classes. @bojanz thoughts?

*/
function template_preprocess_commerce_cart_block(&$variables) {
$variables['attributes']['class'][] = 'cart--cart-block';
$variables['attributes']['class'][] = 'js-cart--cart-block';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we also keep the non js- variant? for theming

],
'#attributes' => [
'class' => ['checkout-pane-overview'],
'class' => ['js-checkout-pane-overview'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment

public static function processRedirectForm(array $element, FormStateInterface $form_state, array &$complete_form) {
$complete_form['#action'] = $element['#action'];
$complete_form['#attributes']['class'][] = 'payment-redirect-form';
$complete_form['#attributes']['class'][] = 'js-payment-redirect-form';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mglaman mglaman mglaman requested changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /