Skip to content

Commit

Permalink
more prettyPhoto
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskoster committed Jan 31, 2013
1 parent a41d297 commit ac70b46
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 29 deletions.
2 changes: 2 additions & 0 deletions assets/css/mixins.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@woocommerce: #ad74a2;

.clearfix() {
&:after {
content:"";
Expand Down
2 changes: 1 addition & 1 deletion assets/css/prettyPhoto.css

Large diffs are not rendered by default.

26 changes: 6 additions & 20 deletions assets/css/prettyPhoto.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,13 @@

// Functions
.button() {
.vertical_gradient(#eee,#ccc);
.border_radius(100%);
border:1px solid #999;
background: #666;
height:16px;
width:16px;
color: #555;
text-shadow:0 1px 0 rgba(255,255,255,0.9);
font-family: verdana;
font-size: 16px;
-webkit-box-shadow:
inset 0 1px rgba(255,255,255,0.9),
inset 0 -1px rgba(0,0,0,0.075),
0 1px 2px rgba(0,0,0,0.1);
color: #fff;
&:hover {
color: #000;
.vertical_gradient(#fefefe,#ccc);
}
&:active {
.vertical_gradient(#ccc,#fefefe);
-webkit-box-shadow:
inset 0 1px 2px rgba(0,0,0,0.1);
background: #000;
}
}

Expand Down Expand Up @@ -125,7 +111,7 @@ div.pp_woocommerce {
bottom:0;
text-align: center;
text-indent: 0;
line-height: 1.15;
line-height: 1.45;
}
}
// Buttons
Expand Down Expand Up @@ -172,7 +158,7 @@ div.pp_woocommerce {
bottom:0;
text-align: center;
text-indent: 0;
line-height: .9;
line-height:1;
font-size:19px;
}
}
Expand All @@ -193,7 +179,7 @@ div.pp_woocommerce {
div.pp_pic_holder a:focus { outline:none; }

div.pp_overlay {
background: #000;
background: #fff;
display: none;
left: 0;
position: absolute;
Expand Down
2 changes: 1 addition & 1 deletion assets/js/frontend/single-product.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jQuery(document).ready(function($) {
// Star ratings for comments
$('#rating').hide().before('<p class="stars"><span><a class="star-1" href="#">1</a><a class="star-2" href="#">2</a><a class="star-3" href="#">3</a><a class="star-4" href="#">4</a><a class="star-5" href="#">5</a></span></p>');

$('p.stars a').click(function(){
$('p.stars a').live( 'click', function(){
var $star = $(this);
$('#rating').val( $star.text() );
$('p.stars a').removeClass('active');
Expand Down
2 changes: 1 addition & 1 deletion assets/js/frontend/single-product.min.js

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

6 changes: 4 additions & 2 deletions assets/js/prettyPhoto/jquery.prettyPhoto.init.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ $(document).ready(function() {
});
$("a.show_review_form").prettyPhoto({
social_tools: false,
theme: 'pp_woocommerce'
theme: 'pp_woocommerce',
opacity: 1
});
$("a[rel^='prettyPhoto']").prettyPhoto({
social_tools: false,
theme: 'pp_woocommerce'
theme: 'pp_woocommerce',
opacity: 1
});

// Open review form lightbox if accessed via anchor
Expand Down
2 changes: 1 addition & 1 deletion assets/js/prettyPhoto/jquery.prettyPhoto.init.min.js

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

2 changes: 1 addition & 1 deletion templates/single-product-reviews.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</div>
<?php endif;

echo '<p class="add_review"><a href="#review_form" class="inline show_review_form button">'.__( 'Add Review', 'woocommerce' ).'</a></p>';
echo '<p class="add_review"><a href="#review_form" class="inline show_review_form button" rel="prettyPhoto">'.__( 'Add Review', 'woocommerce' ).'</a></p>';

$title_reply = __( 'Add a review', 'woocommerce' );

Expand Down
2 changes: 1 addition & 1 deletion templates/single-product/product-image.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<?php if ( has_post_thumbnail() ) : ?>

<a itemprop="image" href="<?php echo wp_get_attachment_url( get_post_thumbnail_id() ); ?>" rel="thumbnails prettyPhoto[product-gallery]" title="<?php echo get_the_title( get_post_thumbnail_id() ); ?>"><?php echo get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ) ) ?></a>
<a itemprop="image" href="<?php echo wp_get_attachment_url( get_post_thumbnail_id() ); ?>" rel="prettyPhoto[product-gallery]" title="<?php echo get_the_title( get_post_thumbnail_id() ); ?>"><?php echo get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ) ) ?></a>

<?php else : ?>

Expand Down
2 changes: 1 addition & 1 deletion templates/single-product/product-thumbnails.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
if ( ! $attachment_url )
continue;

printf( '<a href="%s" title="%s" rel="thumbnails prettyPhoto[product-gallery]" class="%s">%s</a>', esc_attr( $attachment_url ), esc_attr( get_the_title( $id ) ), implode( ' ', $classes ), wp_get_attachment_image( $id, apply_filters( 'single_product_small_thumbnail_size', 'shop_thumbnail' ) ) );
printf( '<a href="%s" title="%s" rel="prettyPhoto[product-gallery]" class="%s">%s</a>', esc_attr( $attachment_url ), esc_attr( get_the_title( $id ) ), implode( ' ', $classes ), wp_get_attachment_image( $id, apply_filters( 'single_product_small_thumbnail_size', 'shop_thumbnail' ) ) );

$loop++;
}
Expand Down

0 comments on commit ac70b46

Please sign in to comment.