Skip to content

Commit

Permalink
More customistion options for terms and conditions.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Apr 6, 2018
1 parent 46815d1 commit 3140a0f
Show file tree
Hide file tree
Showing 16 changed files with 6,923 additions and 6,157 deletions.
36 changes: 36 additions & 0 deletions assets/css/jquery-ui-rtl.css

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions assets/css/jquery-ui.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/twenty-seventeen-rtl.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/twenty-seventeen.css

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions assets/css/twenty-seventeen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,24 @@ button.pswp__button--zoom:hover {
background: rgba(0,0,0,.05);
}

.woocommerce-terms-and-conditions-link {
display: inline-block;

&:after {
content: "";
display: inline-block;
border-style: solid;
margin-bottom: 2px;
margin-left: .25em;
border-width: 6px 6px 0 6px;
border-color: #111 transparent transparent transparent;
}
&.woocommerce-terms-and-conditions-link--open:after {
border-width: 0 6px 6px 6px;
border-color: transparent transparent #111 transparent;
}
}

.woocommerce-checkout {
.woocommerce-input-wrapper {
.description {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/admin/wc-setup.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion assets/js/frontend/checkout.js
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,18 @@ jQuery( function( $ ) {

toggle_terms: function() {
if ( $( '.woocommerce-terms-and-conditions' ).length ) {
$( '.woocommerce-terms-and-conditions' ).slideToggle();
$( '.woocommerce-terms-and-conditions' ).slideToggle( function() {
var link_toggle = $( '.woocommerce-terms-and-conditions-link' );

if ( $( '.woocommerce-terms-and-conditions' ).is( ':visible' ) ) {
link_toggle.addClass( 'woocommerce-terms-and-conditions-link--open' );
link_toggle.removeClass( 'woocommerce-terms-and-conditions-link--closed' );
} else {
link_toggle.removeClass( 'woocommerce-terms-and-conditions-link--open' );
link_toggle.addClass( 'woocommerce-terms-and-conditions-link--closed' );
}
} );

return false;
}
}
Expand Down
Loading

0 comments on commit 3140a0f

Please sign in to comment.