1jQuery(document).ready(function($) { 2 'use strict'; 3 //AJAX SORTING PANEL 4 $('.re_filter_panel').on('click', '.re_filtersort_btn:not(.active)', function(e){ 5 e.preventDefault(); 6 var $this = $(this); 7 var containerid = $this.data('containerid'); 8 var activecontainer = $('#'+containerid); 9 var sorttype = $this.data('sorttype'); 10 var filterPanel = activecontainer.siblings('.re_filter_panel'); 11 var choosenTax = filterPanel.find('.re_tax_dropdown .rh_choosed_tax'); 12 var tax; 13 if(choosenTax.length > 0 && choosenTax.html() != ''){ 14 tax = choosenTax.attr('data-taxdata'); 15 if(tax){ 16 tax = JSON.parse(tax); 17 } 18 } 19 var filterargs = activecontainer.data('filterargs'); 20 var innerargs = activecontainer.data('innerargs'); 21 var template = activecontainer.data('template'); 22 var data = { 23 'action': 're_filterpost', 24 'sorttype': sorttype, 25 'filterargs' : filterargs, 26 'tax': tax, 27 'template' : template, 28 'containerid' : containerid, 29 'innerargs' : innerargs, 30 'security' : rhscriptvars.filternonce 31 }; 32 $this.closest('ul').addClass('activeul'); 33 $this.addClass('re_loadingbefore'); 34 activecontainer.addClass('sortingloading'); 35 36 $.ajax({
37 type: "POST", 38 url: rhscriptvars.ajax_url, 39 data: data 40 }).done(function(response){ 41 if (response !== 'fail') { 42 if(activecontainer.parent().hasClass('rh-gsap-wrap') || activecontainer.parent().parent().hasClass('rh-gsap-wrap')){ 43 var elapend = $(response); 44 activecontainer.html(elapend); 45 var current = activecontainer.closest('.rh-gsap-wrap'); 46 var $batchobj = elapend.filter('.col_item'); 47 var anargs = RHGetBasicTween(current); 48 RHBatchScrollTrigger(current, anargs, $batchobj); 49 }else{ 50 activecontainer.html($(response).hide().fadeIn(1000)); 51 } 52 53 activecontainer.find('.radial-progress').each(function(){ 54 $(this).find('.circle .mask.full, .circle .fill:not(.fix)').animate({ borderSpacing: $(this).attr('data-rating')*18 }, { 55 step: function(now,fx) { 56 $(this).css('-webkit-transform','rotate('+now+'deg)'); 57 $(this).css('-moz-transform','rotate('+now+'deg)'); 58 $(this).css('transform','rotate('+now+'deg)'); 59 }, 60 duration:'slow' 61 },'linear'); 62 63 $(this).find('.circle .fill.fix').animate({ borderSpacing: $(this).attr('data-rating')*36 }, { 64 step: function(now,fx) { 65 $(this).css('-webkit-transform','rotate('+now+'deg)'); 66 $(this).css('-moz-transform','rotate('+now+'deg)'); 67 $(this).css('transform','rotate('+now+'deg)'); 68 }, 69 duration:'slow' 70 },'linear'); 71 }); 72 73 activecontainer.find('.wpsm-tooltip').each(function(){ 74 $(this).tipsy({gravity: "s", fade: true, html: true }); 75 }); 76 77 activecontainer.find('.wpsm-bar').each(function(){ 78 $(this).find('.wpsm-bar-bar').animate({ width: $(this).attr('data-percent') }, 1500 ); 79 }); 80 81 activecontainer.find('.countdown_dashboard').each(function(){ 82 $(this).show(); 83 var id = $(this).attr("id"); 84 var day = $(this).attr("data-day"); 85 var month = $(this).attr("data-month"); 86 var year = $(this).attr("data-year"); 87 var hour = $(this).attr("data-hour"); 88 var min = $(this).attr("data-min"); 89 $(this).countDown({ 90 targetDate: { 91 "day": day, 92 "month": month, 93 "year": year, 94 "hour": hour, 95 "min": min, 96 "sec": 0 97 }, 98 omitWeeks: true, 99 onComplete: function() { $("#"+ id).hide() } 100 }); 101 }); 102 } 103 $this.closest('.re_filter_panel').find('span').removeClass('active'); 104 $this.removeClass('re_loadingbefore').addClass('active'); 105 activecontainer.removeClass('sortingloading'); 106 $this.closest('ul').removeClass('activeul'); 107 if($this.closest('ul').hasClass('re_tax_dropdown')){ 108 var taxDropdown = $this.closest('.re_tax_dropdown'); 109 taxDropdown.find('.rh_choosed_tax').html($this.html()).show().attr('data-taxdata', $this.attr('data-sorttype')); 110 111 taxDropdown.find('.rh_tax_placeholder').hide(); 112 filterPanel.find('.re_filter_ul li:first-child span').addClass('active'); 113 } 114 }); 115 }); 116 117 //Collapse filters in sort panel 118 $('.re_filter_panel').on('click', '.re_filter_ul .re_filtersort_btn.active', function(e) { 119 e.preventDefault(); 120 $(this).closest('.re_filter_panel').find('ul.re_filter_ul span').toggleClass('showfiltermobile'); 121 });
122 123 //Collapse filters in tax dropdown 124 $('.re_tax_dropdown').on('click', '.label', function(e) { 125 e.stopPropagation(); 126 e.preventDefault(); 127 $(this).closest('.re_tax_dropdown').toggleClass('active'); 128 }); 129 $( document ).on('click', function() { 130 $( '.re_tax_dropdown' ).removeClass('active'); 131 }); 132});
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.