1/** 2 * 2007-2018 ETS-Soft 3 * 4 * NOTICE OF LICENSE 5 * 6 * This file is not open source! Each license that you purchased is only available for 1 wesite only. 7 * If you want to use this file on more websites (or projects), you need to purchase additional licenses. 8 * You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party. 9 * 10 * DISCLAIMER 11 * 12 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer 13 * versions in the future. If you wish to customize PrestaShop for your 14 * needs please contact us for extra customization service at an affordable price 15 * 16 * @author ETS-Soft <[email protected]> 17 * @copyright 2007-2018 ETS-Soft 18 * @license Valid for 1 website (or project) for each purchase of license 19 * International Registered Trademark & Property of ETS-Soft 20 */ 21$(document).ready(function(){ 22 if($('img.lazyload').length>0) 23 { 24 $('img.lazyload').lazyload({ 25 load : function () { 26 $(this).parent().removeClass('ybc_item_img_ladyload'); 27 }, 28 threshold: 100, 29 }); 30 } 31 $(document).on('click','.owl-next',function(){ 32 if($('img.lazyload').length>0) 33 { 34 $('img.lazyload').lazyload(); 35 } 36 }); 37 $(window).scroll(function(){ 38 autoLoadBlog(); 39 }); 40 $(document).on('click','.ybc-navigation-blog',function(){ 41 $(this).toggleClass('active'); 42 $('.ybc-navigation-blog-content').toggleClass('show'); 43 }); 44 runowl(); 45 autoLoadBlog(); 46 displayListBlogCategory(); 47 $(document).on('click','.category-blog-parent',function(){ 48 $(this).next().toggleClass('show'); 49 $(this).toggleClass('active'); 50 }); 51 $('#ybc-blog-capcha-refesh').click(function(){ 52 originalCapcha = $('#ybc-blog-capcha-img').attr('src'); 53 originalCode = $('#ybc-blog-capcha-img').attr('rel'); 54 newCode = Math.random(); 55 $('#ybc-blog-capcha-img').attr('src', originalCapcha.replace(originalCode,newCode)); 56 $('#ybc-blog-capcha-img').attr('rel', newCode); 57 }); 58 $('.blog_rating_star').click(function(){ 59 var rating = parseInt($(this).attr('rel')); 60 $('.blog_rating_star').removeClass('star_on'); 61 $('#blog_rating').val(rating); 62 for(i = 1; i<= rating; i++) 63 { 64 $('.blog_rating_star_'+i).addClass('star_on'); 65 } 66 }); 67 $(document).on('click','.ybc-block-comment-report',function() 68 { 69 if(!confirm(ybc_blog_report_warning)) 70 return false; 71 btnObj = $(this); 72 btnObj.addClass('active'); 73 $.ajax({ 74 url : ybc_blog_report_url, 75 data : { 76 id_comment : btnObj.attr('rel') 77 }, 78 dataType: 'json', 79 type : 'post', 80 success: function(json){ 81 if(json['success']) 82 btnObj.remove(); 83 else 84 { 85 alert(json['error']); 86 } 87 btnObj.removeClass('active'); 88 }, 89 error: function(){ 90 alert(ybc_blog_error); 91 btnObj.removeClass('active'); 92 } 93 }); 94 }); 95 $(document).on('click','.ybc-blog-like-span',function() 96 { 97 btnObj = $(this); 98 if(!btnObj.hasClass('active')) 99 { 100 $('.ybc-blog-like-span-'+btnObj.attr('data-id-post')).addClass('active'); 101 $.ajax({ 102 url : ybc_blog_like_url, 103 data : { 104 id_post : btnObj.attr('data-id-post') 105 }, 106 dataType: 'json', 107 type : 'post', 108 success: function(json){ 109 if(json['success']) 110 { 111 $('.ben_'+btnObj.attr('data-id-post')).text(json['likes']); 112 } 113 else 114 { 115 $('.ybc-blog-like-span-'+btnObj.attr('data-id-post')).removeClass('active'); 116 alert(json['error']); 117 } 118 }, 119 error: function(){ 120 $('.ybc-blog-like-span-'+btnObj.attr('data-id-post')).removeClass('active'); 121 alert(ybc_like_error); 122 } 123 }); 124 } 125 }); 126 127 128 //Nivo slider 129 if($('#ybc_slider').length > 0) 130 $(window).load(function() { 131 $('#ybc_slider').nivoSlider({ 132 manualAdvance : !sliderAutoPlay, 133 pauseTime: YBC_BLOG_SLIDER_SPEED, 134 afterLoad: function(){ 135 $('.ybc-blog-slider').removeClass('loading'); 136 } 137 }); 138 }); 139}); 140function autoLoadBlog() 141{ 142 143 var container = '.ybc-blog-wrapper-blog-list.loadmore'; 144 if ($(container).length > 0 && $(container+" .blog-paggination a.next").length > 0 && !$(container+" .blog-paggination a.next").hasClass('active') && $(window).scrollTop() + $(window).height() >= $(container).offset().top + $(container).height() ) { 145 $(container+" .blog-paggination a.next").addClass('active'); 146 $('.ets_blog_loading').addClass('active'); 147 $.ajax({ 148 url: $(container+" .blog-paggination a.next").attr('href'), 149 data: 'loadajax=1', 150 type: 'post', 151 dataType: 'json', 152 success: function(json){ 153 $('.ybc-blog-list').append(json.list_blog); 154 $('.blog-paggination').html(json.blog_paggination); 155 if($('img.lazyload').length>0) 156 { 157 $('img.lazyload').lazyload({ 158 load : function () { 159 $(this).parent().removeClass('ybc_item_img_ladyload'); 160 }, 161 threshold: 100, 162 }); 163 } 164 $('.ets_blog_loading').removeClass('active'); 165 }, 166 error: function(error) 167 { 168 169 } 170 }); 171 } 172} 173function runowl() 174{ 175 if ($('.page_home.ybc_block_slider ul').length > 0) 176 $('.page_home.ybc_block_slider ul').owlCarousel({ 177 items : 4, 178 navigation : true, 179 navigationText : ["",""], 180 pagination : false, 181 itemsDesktop : [1199,4], 182 itemsDesktopSmall : [992,3], 183 itemsTablet: [768,2], 184 itemsMobile : [480,1], 185 responsive : { 186 0 : { 187 items : 1 188 }, 189 480 : { 190 items : 2 191 }, 192 768 : { 193 items : 3 194 }, 195 992 : { 196 items : 3 197 }, 198 1199 : { 199 items : 4 200 } 201 }, 202 nav : true, 203 loop: $(".page_home.ybc_block_slider ul li").length > 1, 204 rewindNav : false, 205 dots : false, 206 navText: ['', ''], 207 callbacks: true 208 }); 209 210 if ($('.page_home_gallery.ybc_block_slider ul').length > 0) 211 $('.page_home_gallery.ybc_block_slider ul').owlCarousel({ 212 items : 6, 213 navigation : true, 214 navigationText : ["",""], 215 pagination : false, 216 itemsDesktop : [1199,6], 217 itemsDesktopSmall : [992,5], 218 itemsTablet: [768,4], 219 itemsMobile : [480,3], 220 responsive : { 221 0 : { 222 items : 3 223 }, 224 480 : { 225 items : 4 226 }, 227 768 : { 228 items : 5 229 }, 230 992 : { 231 items : 6 232 } 233 }, 234 nav : true, 235 loop: $(".page_home_gallery.ybc_block_slider ul li").length > 1, 236 rewindNav : false, 237 dots : false, 238 navText: ['', ''], 239 callbacks: true, 240 }); 241 242 // page blog 243 244 245 if ($('.page_blog.ybc_block_slider ul').length > 0) 246 $('.page_blog.ybc_block_slider ul').owlCarousel({ 247 items : 1, 248 nav : true, 249 navigation : true, 250 navigationText : ["",""], 251 pagination : false, 252 loop: $(".page_blog.ybc_block_slider ul li").length > 1, 253 rewindNav : false, 254 dots : false, 255 navText: ['', ''], 256 callbacks: true, 257 }); 258 259 if ($('.page_blog_gallery.ybc_block_slider ul').length > 0) 260 $('.page_blog_gallery.ybc_block_slider ul').owlCarousel({ 261 items : 3, 262 navigation : true, 263 navigationText : ["",""], 264 pagination : false, 265 nav : true, 266 loop: $(".page_blog_gallery.ybc_block_slider ul li").length > 1, 267 rewindNav : false, 268 dots : false, 269 navText: ['', ''], 270 callbacks: true, 271 }); 272 if ($('.ybc-blog-related-products-wrapper .ybc_related_products_type_carousel').length > 0) 273 { 274 $('.ybc-blog-related-products-wrapper .ybc_related_products_type_carousel').owlCarousel({ 275 items : number_product_related_per_row, 276 navigation : true, 277 navigationText : ["",""], 278 pagination : false, 279 itemsDesktop : [1199,number_product_related_per_row], 280 itemsDesktopSmall : [992,number_product_related_per_row], 281 itemsTablet: [768,2], 282 itemsMobile : [480,1], 283 responsive : { 284 // breakpoint from 0 up 285 0 : { 286 items : 1 287 }, 288 370 : { 289 items : 2 290 }, 291 992 : { 292 items : number_product_related_per_row 293 }, 294 }, 295 nav : true, 296 navRewind : false, 297 //Pagination 298 dots : false, 299 navText : [ , ], 300 }); 301 $('.ybc-blog-related-products-wrapper .ybc_related_products_type_carousel').on('changed.owl.carousel', function(event) { 302 if($('img.lazyload').length>0) 303 { 304 $('img.lazyload').lazyload(); 305 } 306 }); 307 } 308 if ($('.ybc_blog_related_posts_type_carousel ul').length > 0) 309 { 310 $('.ybc_blog_related_posts_type_carousel ul').owlCarousel({ 311 items : number_post_related_per_row, 312 navigation : true, 313 navigationText : ["",""], 314 pagination : false, 315 itemsDesktopSmall : [992,number_post_related_per_row], 316 itemsTablet: [768,2], 317 itemsMobile : [480,1], 318 responsive : { 319 // breakpoint from 0 up 320 0 : { 321 items : 1 322 }, 323 370 : { 324 items : 2 325 }, 326 992 : { 327 items : number_post_related_per_row 328 }, 329 }, 330 nav : true, 331 navRewind : false, 332 //Pagination 333 dots : false, 334 navText : [ , ], 335 }); 336 $('.ybc_blog_related_posts_type_carousel ul').on('changed.owl.carousel', function(event) { 337 if($('img.lazyload').length>0) 338 { 339 $('img.lazyload').lazyload(); 340 } 341 }); 342 } 343} 344function displayListBlogCategory() 345{ 346 if($('.ybc_block_categories li.active').length>0) 347 { 348 $('.ybc_block_categories li.active').closest('.children').addClass('show'); 349 $('.ybc_block_categories li.active').closest('.children').parent().find('.category-blog-parent').addClass('active'); 350 } 351}
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.