From 73f68f75e2d884e0184eb305f47b3dcc3308d756 Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Mon, 4 Sep 2017 06:34:12 +0000 Subject: Snorflex Korrekturen git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6442 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/mods/mod_productview/productview.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'views/mods') diff --git a/views/mods/mod_productview/productview.js b/views/mods/mod_productview/productview.js index 97483cd..76cb7f4 100644 --- a/views/mods/mod_productview/productview.js +++ b/views/mods/mod_productview/productview.js @@ -52,6 +52,7 @@ 'success': function(data) { jQuery('#wpsg_productview_' + index).replaceWith(data); + wpsg_correctProductview(index); } @@ -64,9 +65,15 @@ function wpsg_correctProductview(index) { + var atts = jQuery.parseJSON(jQuery('#wpsg_productview_' + index + ' input[name="wpsg_atts"]').val()); + + if (atts.mode === 'list') jQuery('.wpsg_productview_product_grid').show(0); + var max_height = 0; jQuery('#wpsg_productview_' + index + ' .wpsg_productview_product_grid .wpsg_mod_productview_name').each(function() { if (jQuery(this).outerHeight() > max_height) max_height = jQuery(this).outerHeight(); } ).outerHeight(max_height); var max_height = 0; jQuery('#wpsg_productview_' + index + ' .wpsg_productview_product_grid .wpsg_mod_productview_description').each(function() { if (jQuery(this).outerHeight() > max_height) max_height = jQuery(this).outerHeight(); } ).outerHeight(max_height); + if (atts.mode === 'list') jQuery('.wpsg_productview_product_grid').hide(0); + // Sortierungslayer jQuery('.wpsg_mod_productview-order').bind('click', function(event) { @@ -119,7 +126,7 @@ jQuery('.wpsg_mod_productview_modeswitch a').removeClass('active'); jQuery(this).addClass('active'); - + return false; } ); -- cgit v1.2.3