1/** 2* 2007-2014 PrestaShop 3* 4* NOTICE OF LICENSE 5* 6* This source file is subject to the Academic Free License (AFL 3.0) 7* that is bundled with this package in the file LICENSE.txt. 8* It is also available through the world-wide-web at this URL: 9* http://opensource.org/licenses/afl-3.0.php 10* If you did not receive a copy of the license and are unable to 11* obtain it through the world-wide-web, please send an email 12* to [email protected] so we can send you a copy immediately. 13* 14* DISCLAIMER 15* 16* Do not edit or add to this file if you wish to upgrade PrestaShop to newer 17* versions in the future. If you wish to customize PrestaShop for your 18* needs please refer to http://www.prestashop.com for more information. 19* 20* @author PrestaShop SA <[email protected]> 21* @copyright 2007-2014 PrestaShop SA 22* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) 23* International Registered Trademark & Property of PrestaShop SA 24*/ 25/************************************************* 26USE FOR ALL MODULES FILTER PRODUCTS ( 27 1.csblockbestsellersproducts, 28 2.csblocknewproducts, 29 3.csblockspecialproducts, 30 4.cscustomproducts, 31 5.csfeaturecategory, 32 6.cshomefeatured 33 ) 34************************************************/ 35function setMaxHeight(id_container) 36{ 37 imagesLoaded($(id_container + ' .cs_product_list .cs-product'), function() { 38 $(id_container + ' .cs_product_list .cs-product').removeAttr("style"); 39 var maxHeight = -1; 40 $(id_container + ' .cs_product_list .cs-product').each(function() { 41 if($(this).outerHeight() > maxHeight) 42 maxHeight = $(this).outerHeight(); 43 }); 44 $(id_container + ' .cs_product_list .cs-product').css("height", maxHeight); 45 }); 46} 47 48function initOwlCarousel(id_container, nb_aline, w_big_product, cf_pagination, cf_navigation) 49{ 50 if(w_big_product == 0 && nb_aline > 8) 51 nb_aline = 8; 52 else if(w_big_product > 0 && nb_aline > 6) 53 nb_aline = 6; 54 55 if(nb_aline > 3) 56 { 57 var nb_itemsDesktopSmall = Math.max(nb_aline - 1,4); //for ipad horizontal 58 var nb_itemsTablet = Math.max(nb_aline - 2,3); // for ipad vertical 59 } 60 else 61 { 62 var nb_itemsDesktopSmall = nb_aline; //for ipad horizontal 63 var nb_itemsTablet = nb_aline; // for ipad vertical 64 } 65 var pn = false; 66 if(cf_pagination == 1) 67 pn = true; 68 var ng = false; 69 if(cf_navigation == 1) 70 ng = true; 71 var owl = $(id_container + " .cs_product_list .cs_section_product_grid"); 72 if(owl.length){ 73 imagesLoaded(owl, function() { 74 owl.owlCarousel({ 75 loop: false, 76 mouseDrag: false, 77 touchDrag: false, 78 dots : pn, 79 nav : ng, 80 rtl: rtl_mode, 81 responsive: { 82 0: { 83 items: 2, 84 slideBy : 2 85 }, 86 750: { 87 items: nb_itemsTablet, 88 slideBy : nb_itemsTablet 89 }, 90 974: { 91 items: nb_itemsDesktopSmall, 92 slideBy : nb_itemsDesktopSmall 93 }, 94 1170: { 95 items: nb_aline, 96 slideBy : nb_aline 97 } 98 } 99 }); 100 }); 101 } 102} 103function initOwlCarouselSidebar(id_container,cf_pagination,cf_navigation) 104{ 105 var owl = $(id_container + " .cs_call_owl"); 106 var pn = false; 107 if(cf_pagination == 1) 108 pn = true; 109 var ng = false; 110 if(cf_navigation == 1) 111 ng = true; 112 if(owl.length){ 113 imagesLoaded(owl, function() { 114 owl.owlCarousel({ 115 items : 1, 116 loop: true, 117 rtl: rtl_mode, 118 dots : pn, 119 nav : ng 120 }); 121 }); 122 } 123}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.