more prettyPhoto

This commit is contained in:
James Koster 2013-01-31 14:15:50 +00:00
parent a41d297f76
commit ac70b46867
10 changed files with 19 additions and 29 deletions

View File

@ -1,3 +1,5 @@
@woocommerce: #ad74a2;
.clearfix() {
&:after {
content:"";

File diff suppressed because one or more lines are too long

View File

@ -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;
}
}
@ -125,7 +111,7 @@ div.pp_woocommerce {
bottom:0;
text-align: center;
text-indent: 0;
line-height: 1.15;
line-height: 1.45;
}
}
// Buttons
@ -172,7 +158,7 @@ div.pp_woocommerce {
bottom:0;
text-align: center;
text-indent: 0;
line-height: .9;
line-height:1;
font-size:19px;
}
}
@ -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;

View File

@ -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');

View File

@ -1 +1 @@
jQuery(document).ready(function(e){e(".woocommerce-tabs .panel").hide();e(".woocommerce-tabs ul.tabs li a").click(function(){var t=e(this),n=t.closest(".woocommerce-tabs");e("ul.tabs li",n).removeClass("active");e("div.panel",n).hide();e("div"+t.attr("href")).show();t.parent().addClass("active");return!1});e(".woocommerce-tabs").each(function(){var t=window.location.hash;t.toLowerCase().indexOf("comment-")>=0?e("ul.tabs li.reviews_tab a",e(this)).click():e("ul.tabs li:first a",e(this)).click()});e("#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>');e("p.stars a").click(function(){var t=e(this);e("#rating").val(t.text());e("p.stars a").removeClass("active");t.addClass("active");return!1});e("#review_form").on("click","#submit",function(){var t=e("#rating").val();if(e("#rating").size()>0&&!t&&woocommerce_params.review_rating_required=="yes"){alert(woocommerce_params.i18n_required_rating_text);return!1}});e("form.cart").submit(function(){e(this).find(":submit").attr("disabled","disabled")})});
jQuery(document).ready(function(e){e(".woocommerce-tabs .panel").hide();e(".woocommerce-tabs ul.tabs li a").click(function(){var t=e(this),n=t.closest(".woocommerce-tabs");e("ul.tabs li",n).removeClass("active");e("div.panel",n).hide();e("div"+t.attr("href")).show();t.parent().addClass("active");return!1});e(".woocommerce-tabs").each(function(){var t=window.location.hash;t.toLowerCase().indexOf("comment-")>=0?e("ul.tabs li.reviews_tab a",e(this)).click():e("ul.tabs li:first a",e(this)).click()});e("#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>');e("p.stars a").live("click",function(){var t=e(this);e("#rating").val(t.text());e("p.stars a").removeClass("active");t.addClass("active");return!1});e("#review_form").on("click","#submit",function(){var t=e("#rating").val();if(e("#rating").size()>0&&!t&&woocommerce_params.review_rating_required=="yes"){alert(woocommerce_params.i18n_required_rating_text);return!1}});e("form.cart").submit(function(){e(this).find(":submit").attr("disabled","disabled")})});

View File

@ -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

View File

@ -1 +1 @@
(function(e){e(document).ready(function(){e("#review_form_wrapper").hide();e("a.zoom").prettyPhoto({social_tools:!1,theme:"pp_woocommerce"});e("a.show_review_form").prettyPhoto({social_tools:!1,theme:"pp_woocommerce"});e("a[rel^='prettyPhoto']").prettyPhoto({social_tools:!1,theme:"pp_woocommerce"});window.location.hash=="#review_form"&&e("a.show_review_form").trigger("click")})})(jQuery);
(function(e){e(document).ready(function(){e("#review_form_wrapper").hide();e("a.zoom").prettyPhoto({social_tools:!1,theme:"pp_woocommerce"});e("a.show_review_form").prettyPhoto({social_tools:!1,theme:"pp_woocommerce",opacity:1});e("a[rel^='prettyPhoto']").prettyPhoto({social_tools:!1,theme:"pp_woocommerce",opacity:1});window.location.hash=="#review_form"&&e("a.show_review_form").trigger("click")})})(jQuery);

View File

@ -75,7 +75,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
</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' );

View File

@ -16,7 +16,7 @@ global $post, $woocommerce;
<?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 : ?>

View File

@ -35,7 +35,7 @@ global $post, $product, $woocommerce;
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++;
}