Add review form no longer opens in lightbox. closes #3804

This commit is contained in:
James Koster 2013-10-28 09:56:03 +00:00
parent 1fbb6249ff
commit 5aeaed888e
5 changed files with 4 additions and 20 deletions

View File

@ -1,9 +1,6 @@
(function($) {
$(document).ready(function() {
// Hide review form - it will be in a lightbox
$('#review_form_wrapper').hide();
// Lightbox
$("a.zoom").prettyPhoto({
social_tools: false,
@ -12,13 +9,6 @@ $(document).ready(function() {
opacity: 0.8,
deeplinking: false
});
$("a.show_review_form").prettyPhoto({
social_tools: false,
theme: 'pp_woocommerce',
horizontal_padding: 20,
opacity: 0.8,
deeplinking: false
});
$("a[rel^='prettyPhoto']").prettyPhoto({
social_tools: false,
theme: 'pp_woocommerce',
@ -27,10 +17,5 @@ $(document).ready(function() {
deeplinking: false
});
// Open review form lightbox if accessed via anchor
if( window.location.hash == '#review_form' ) {
$('a.show_review_form').trigger('click');
}
});
})(jQuery);

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",horizontal_padding:20,opacity:.8,deeplinking:!1});e("a.show_review_form").prettyPhoto({social_tools:!1,theme:"pp_woocommerce",horizontal_padding:20,opacity:.8,deeplinking:!1});e("a[rel^='prettyPhoto']").prettyPhoto({social_tools:!1,theme:"pp_woocommerce",horizontal_padding:20,opacity:.8,deeplinking:!1});window.location.hash=="#review_form"&&e("a.show_review_form").trigger("click")})})(jQuery);
(function(e){e(document).ready(function(){e("a.zoom").prettyPhoto({social_tools:!1,theme:"pp_woocommerce",horizontal_padding:20,opacity:.8,deeplinking:!1});e("a[rel^='prettyPhoto']").prettyPhoto({social_tools:!1,theme:"pp_woocommerce",horizontal_padding:20,opacity:.8,deeplinking:!1})})})(jQuery);

View File

@ -177,7 +177,7 @@ class WC_Settings_General extends WC_Settings_Page {
'desc' => __( 'Enable Lightbox', 'woocommerce' ),
'id' => 'woocommerce_enable_lightbox',
'default' => 'yes',
'desc_tip' => __( 'Include WooCommerce\'s lightbox. Product gallery images and the add review form will open in a lightbox.', 'woocommerce' ),
'desc_tip' => __( 'Include WooCommerce\'s lightbox. Product gallery images will open in a lightbox.', 'woocommerce' ),
'type' => 'checkbox',
'checkboxgroup' => 'start'
),

View File

@ -213,6 +213,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* Tweak - Shortcode tag filters + updated menu names to make white labelling easier.
* Tweak - Removed placeholder polyfill. Use this plugin to replace functionality if required: http://wordpress.org/plugins/html5-placeholder-polyfill/
* Tweak - Replaced all instances of → and ← in frontent using wc icon font plus .wc-forward and .wc-backward utility classes.
* Tweak - Add review form no longer opens in lightbox.
* Fix - Changed MyException to Exception in Checkout class as MyException class does not exist in WooCommerce
* Fix - Default cart widget styling on non-wc pages.
* Fix - Rounding for mijireh tax ex. price.

View File

@ -60,15 +60,13 @@ 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>';
$title_reply = __( 'Add a review', 'woocommerce' );
else :
$title_reply = __( 'Be the first to review', 'woocommerce' ).' &ldquo;' . get_the_title() . '&rdquo;';
echo '<p class="noreviews">' . sprintf( __( 'There are no reviews yet, would you like to %s submit yours%s?', 'woocommerce' ), '<a href="#review_form" class="inline show_review_form" title="' . __( 'Add Your Review', 'woocommerce' ) . '">', '</a>' ) . '</p>';
echo '<p class="noreviews">' . __( 'There are no reviews yet.', 'woocommerce' ) . '</p>';
endif;