From ef9544e477984efd73405c6847bd938a0a4ccfc8 Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Sat, 18 Jun 2016 14:01:39 +0000 Subject: git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5558 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/css/frontend.css | 11 ++-- views/mods/mod_productview/productview.js | 47 +++++++++++++++-- views/mods/mod_productview/productview.phtml | 77 ++++++++++++++++++++++++++-- 3 files changed, 122 insertions(+), 13 deletions(-) diff --git a/views/css/frontend.css b/views/css/frontend.css index 5de86cd..68c4685 100644 --- a/views/css/frontend.css +++ b/views/css/frontend.css @@ -317,13 +317,17 @@ input.wpsg_error { border-color:red !important; } /* Modul "Produktansichten" */ .wpsg_productview { position:relative; } -.wpsg_productview_head { margin-bottom:25px; line-height:25px; margin-top:25px; } +.wpsg_productview_head { margin-bottom:25px; line-height:25px; margin-top:25px; position:relative; } .wpsg_productview_head h2.wpsg_productview_title { margin-top:0px; font-size:20px; font-weight:bold; color:#0E2F42; } +.wpsg_productview_head .wpsg_mod_productview_modeswitch { position:absolute; right:15px; top:0px; font-size:20px; } +.wpsg_productview_head .wpsg_mod_productview_modeswitch > a { margin-left:5px; text-decoration:none; color:#9E9E9E; } +.wpsg_productview_head .wpsg_mod_productview_modeswitch > a.active, +.wpsg_productview_head .wpsg_mod_productview_modeswitch > a:hover { color:#29556E; text-decoration:none; } .wpsg_mod_productview-info { font-size:14px; color:#9B9B9B; } .wpsg_mod_productview-info strong { color:#29556E; font-weight:bold; } .wpsg_mod_productview-order { font-size:14px; color:#9B9B9B; } .wpsg_mod_productview-order .glyphicon { margin-left:10px; margin-right:5px; } -.wpsg_mod_productview-order strong { color:#29556E; font-weight:bold; } +.wpsg_mod_productview-order strong { color:#29556E; font-weight:bold; float:right; } .wpsg_mod_productview_image { position:relative; } .wpsg_mod_productview_image img { max-width:100%; height:auto; border:1px solid #E4F3F8; } .wpsg_productview_pager { width:100%; border-top:1px solid #E4F3F8; border-bottom:1px solid #E4F3F8; margin-bottom:25px; margin-top:10px; padding-top:25px; padding-bottom:25px; text-align:center; } @@ -338,13 +342,14 @@ input.wpsg_error { border-color:red !important; } .wpsg_productview_product .wpsg_mod_productview_bottom .wpsg_mod_productview_button:hover { text-decoration:none; background-color:#29556E; color:#FFFFFF; } .wpsg_productview_product .wpsg_mod_productview_bottom .wpsg_mod_productview_button .fa { margin-left:10px; } .wpsg_productview_product .wpsg_mod_productview_go { display:none; position:absolute; left:0px; top:0px; width:100%; height:100%; background-color:rgba(228, 243, 248, 0.75); text-align:center; } -.wpsg_productview_product .wpsg_mod_productview_go > .wpsg_star_wrap { font-size:22px; color:#0F303F; width:80%; position:absolute; left:50%; margin-left:-40%; top:10%; font-size:18px; font-weight:normal; } .wpsg_productview_product .wpsg_mod_productview_go .wpsg_mod_productview_price_wrap { color:#0F303F; width:100%; position:absolute; left:50%; margin-left:-50%; top:30%; font-size:20px; line-height:125%; font-weight:bold; } .wpsg_productview_product .wpsg_mod_productview_go .wpsg_mod_productview_price_wrap .wpsg_mod_productview_oldprice { text-decoration:line-through; } .wpsg_productview_product .wpsg_mod_productview_go .wpsg_mod_productview_price_wrap .wpsg_mod_productview_current { color:red; } .wpsg_productview_product .wpsg_mod_productview_go .wpsg_mod_productview_tax_wrap { color:#565656; width:100%; position:absolute; left:50%; margin-left:-50%; top:60%; font-size:14px; line-height:125%; } .wpsg_productview_product:hover { text-decoration:none; } .wpsg_productview_product:hover .wpsg_mod_productview_go { display:block; } +.wpsg_productview_product_grid .wpsg_star_wrap { position:absolute; width:80%; left:50%; top:10%; margin-left:-40%; } +.wpsg_productview_product_grid .wpsg_mod_productview_name h2 { margin-top:0px; } .wpsg_mod_productview_loading { width:100%; height:100%; background-color:rgba(249, 252, 253, 0.75); position:absolute; left:0px; top:0px; } .wpsg_mod_productview_filter #wpsg_mod_productview_filter_price-range { position:relative; margin-right:16px; } .wpsg_mod_productview_filter #wpsg_mod_productview_filter_price-range .ui-slider-handle { cursor:pointer; width:16px; height:16px; background-color:#787878; position:absolute; } diff --git a/views/mods/mod_productview/productview.js b/views/mods/mod_productview/productview.js index 7a30c02..1f045c5 100644 --- a/views/mods/mod_productview/productview.js +++ b/views/mods/mod_productview/productview.js @@ -7,7 +7,19 @@ atts.page = page; if (typeof order !== "undefined") atts.order = order; - if (typeof mode !== "undefined") atts.mode = mode; + if (typeof mode !== "undefined") atts.mode = mode; + else + { + + if (jQuery('#wpsg_productview_' + index + ' .wpsg_mod_productview_modeswitch > a').length > 0) + { + + if (jQuery('#wpsg_productview_' + index + ' .wpsg_mod_productview_modeswitch > a.fa-th').hasClass('active')) atts.mode = 'grid'; + else atts.mode = 'list'; + + } + + } if (jQuery('#wpsg_mod_productview_filter').length > 0) { @@ -40,8 +52,8 @@ function wpsg_correctProductview(index) { - var max_height = 0; jQuery('#wpsg_productview_' + index + ' .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_mod_productview_description').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_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); // Sortierungslayer jQuery('.wpsg_mod_productview-order').bind('click', function(event) { @@ -74,7 +86,32 @@ return false; } ).disableSelection(); - + + // Umschalten der List/Grid Ansichten + jQuery('.wpsg_mod_productview_modeswitch > a').bind('click', function() { + + if (jQuery(this).hasClass('fa-th') &&!jQuery(this).hasClass('active')) + { + + jQuery('.wpsg_productview_product_list').hide(250); + jQuery('.wpsg_productview_product_grid').show(250); + + } + else if (jQuery(this).hasClass('fa-list') && !jQuery(this).hasClass('active')) + { + + jQuery('.wpsg_productview_product_grid').hide(250); + jQuery('.wpsg_productview_product_list').show(250); + + } + + jQuery('.wpsg_mod_productview_modeswitch a').removeClass('active'); + jQuery(this).addClass('active'); + + return false; + + } ); + } function wpsg_filter_insert(values, set) @@ -144,6 +181,6 @@ jQuery('.wpsg_mod_productview-order-layer:visible').each(function() { jQuery(this).parent().click(); } ); } ); - + } ); \ No newline at end of file diff --git a/views/mods/mod_productview/productview.phtml b/views/mods/mod_productview/productview.phtml index c98b4b3..53c1799 100644 --- a/views/mods/mod_productview/productview.phtml +++ b/views/mods/mod_productview/productview.phtml @@ -44,7 +44,12 @@ view['wpsg_mod_productview']['count']); ?> - + +
+ + +
+
@@ -52,7 +57,67 @@ view['wpsg_mod_productview']['products'])) { ?> view['wpsg_mod_productview']['products'] as $oProduct) { $i ++; ?> -
+ +
+ +
+ + hasMod('wpsg_mod_produktbilder')) { ?> + callMod('wpsg_mod_produktbilder', 'getProductImage', array($oProduct->id, 520, 520, 'sz')); ?> + +
+ + + +
+ + + +
+ +
+

getProductName(); ?>

+
+ +
+ + +
+ +
+ getOldPrice(); ?> + getPrice()) { ?> +
getPrice(), $this->get_option('wpsg_currency')); ?>
+
get_option('wpsg_currency')); ?>
+ +
getPrice(), $this->get_option('wpsg_currency')); ?>
+ +
+ +
+ getFrontendTaxview() == WPSG_BRUTTO) { ?> + Versandkosten', 'wpsg'), $oProduct->getFrontendTaxValue(), $this->getUrl(wpsg_ShopController::URL_VERSANDKOSTEN)); ?> + getFrontendTaxview() == WPSG_NETTO) { ?> + Versandkosten', 'wpsg'), $oProduct->getFrontendTaxValue(), $this->getUrl(wpsg_ShopController::URL_VERSANDKOSTEN)); ?> + +
+ + getShortDescription(); if (wpsg_isSizedString($shortDescription)) { ?> +
+
+ +
+ + + + +
+ +
+ +
+ +
hasMod('wpsg_mod_produktbilder')) { ?> callMod('wpsg_mod_produktbilder', 'getProductImage', array($oProduct->id, 520, 520, 'sz')); ?> @@ -62,10 +127,12 @@
+
- - -
+ + +
+
-- cgit v1.2.3