Skip to content

Commit

Permalink
Merge branch 'release/1.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
gregpriday committed May 26, 2016
2 parents 1c8800f + d2b8be7 commit cbf5f4c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
= 1.2.2 - May 26 2016 =
* Fixed warning message in customizer.
* Removed duplicate is mobile body class.
* Improved main menu touch device compatibility.

= 1.2.1 - May 24 2016 =
* Updated settings framework.
* Added about page.
Expand Down
4 changes: 0 additions & 4 deletions inc/extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ function siteorigin_north_body_classes( $classes ) {
$classes[] = 'sticky-menu';
}

if( wp_is_mobile() ) {
$classes[] = 'is_mobile';
}

return $classes;
}
endif;
Expand Down
2 changes: 1 addition & 1 deletion inc/settings
24 changes: 13 additions & 11 deletions js/north.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,31 +62,33 @@ jQuery( function ( $ ) {
$( '.entry-content' ).fitVids();
}

// Remove the no-touch body class for touch devices
var isTouchDevice = 'ontouchstart' in document.documentElement;
if( isTouchDevice ) {
// This this is a touch device. We detect this through ontouchstart, msMaxTouchPoints and MaxTouchPoints.
if( 'ontouchstart' in document.documentElement || window.navigator.msMaxTouchPoints || window.navigator.MaxTouchPoints ) {
$('body').removeClass('no-touch');
}
if ( !$( 'body' ).hasClass( 'no-touch' ) ) {
$('.main-navigation #primary-menu').find('.menu-item-has-children > a').each( function() {
if ( /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream ) {
$( 'body' ).css( 'cursor', 'pointer' );
}
$( '.main-navigation #primary-menu').find('.menu-item-has-children > a' ).each( function() {
$( this ).click( function(e){
var link = $(this);
e.stopPropagation();
link.parent().addClass('touch-drop');
link.parent().addClass( 'touch-drop' );

if( link.hasClass('hover') ) {
link.unbind('click');
if( link.hasClass( 'hover' ) ) {
link.unbind( 'click' );
} else {
link.addClass('hover');
link.addClass( 'hover' );
e.preventDefault();
}

$('.main-navigation #primary-menu > .menu-item-has-children:not(.touch-drop) > a').click( function() {
$( '.main-navigation #primary-menu > .menu-item-has-children:not(.touch-drop) > a' ).click( function() {
link.removeClass('hover').parent().removeClass('touch-drop');
} );

$(document).click( function() {
link.removeClass('hover').parent().removeClass('touch-drop');
$( document ).click( function() {
link.removeClass( 'hover' ).parent().removeClass( 'touch-drop' );
} );

} );
Expand Down
3 changes: 1 addition & 2 deletions woocommerce/cart/cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@

<label for="coupon_code"><?php _e( 'Coupon', 'siteorigin-north' ); ?>:</label>
<input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'siteorigin-north' ); ?>" />
<button type="submit" class="button" name="apply_coupon"><?php esc_attr_e( 'Apply Coupon', 'siteorigin-north' ); ?></button>

<input type="submit" class="button" name="apply_coupon" value="<?php esc_attr_e( 'Apply Coupon', 'siteorigin-north' ); ?>">
<?php do_action( 'woocommerce_cart_coupon' ); ?>
</div>
<?php } ?>
Expand Down

0 comments on commit cbf5f4c

Please sign in to comment.