1jQuery(window).on('load', function(){ 2 if(jQuery('#inputCategory').val()){ 3 $catid = jQuery('#inputCategory').val(); 4 $listingid = ''; 5 if ( jQuery( "input[name='lp_post']" ).length ) { 6 $listingid = jQuery( "input[name='lp_post']" ).val(); 7 } 8 jQuery('.lp-nested').hide(); 9 jQuery('#inputCategory').attr("disabled", !0); 10 jQuery('#tags-by-cat').html(' '); 11 jQuery('label.featuresBycat').remove(); 12 jQuery('form#lp-submit-form div.pre-load:first').addClass('loader'); 13 jQuery('#features-by-cat').html(' '); 14 jQuery(".chosen-select").prop('disabled', !0).trigger('chosen:updated'); 15 16 jQuery.ajax({ 17 type: 'POST', 18 dataType: 'json', 19 url: ajax_term_object.ajaxurl, 20 data: { 21 'action': 'ajax_term', 22 'term_id': $catid, 23 'listing_id': $listingid, 24 }, 25 success: function(data) { 26 jQuery('#inputCategory').removeAttr("disabled"); 27 if (data) { 28 if (data.hasfeatues == !0) { 29 30 jQuery('.featuresDataContainerOuterSubmit').show(); 31 jQuery('.labelforfeatures.lp-nested').show(); 32 jQuery('#tags-by-cat').show() 33 } 34 if (data.hasfields == !0) { 35 jQuery('#features-by-cat').show() 36 } 37 jQuery('form#lp-submit-form div.pre-load').removeClass('loader'); 38 jQuery(".chosen-select").prop('disabled', !1).trigger('chosen:updated'); 39 if (data.tags != null) { 40 jQuery('.lpfeatures_fields').prepend('<label for="inputTags" class="featuresBycat">' + data.featuretitle + '</label>'); 41 jQuery.each(data.tags, function(i, v) { 42 var lpchecked = ''; 43 if (data.lpselectedtags != null) { 44 jQuery.each(data.lpselectedtags, function(lk, ls) { 45 if (i.trim() == lk) { 46 lpchecked = 'checked' 47 } 48 }) 49 } 50 jQuery('#tags-by-cat').append('<div class="col-md-2 col-sm-4 col-xs-6"><div class="checkbox pad-bottom-10"><input id="check_' + v + '" type="checkbox" name="lp_form_fields_inn[lp_feature][]" value="' + i + '" ' + lpchecked + '><label for="check_' + v + '">' + v + '</label></div></div>') 51 }) 52 } 53 jQuery('#features-by-cat').append(data.fields) 54 } 55 } 56 }); 57 58 } 59}); 60 61jQuery(document).ready(function($) { 62 jQuery("#inputCategory").change(function() { 63 $this = jQuery(this); 64 jQuery('.lp-nested').hide(); 65 jQuery('#inputCategory').attr("disabled", !0); 66 jQuery('#tags-by-cat').html(' '); 67 jQuery('label.featuresBycat').remove(); 68 jQuery('form#lp-submit-form div.pre-load:first').addClass('loader'); 69 jQuery('#features-by-cat').html(' '); 70 jQuery(".chosen-select").prop('disabled', !0).trigger('chosen:updated'); 71 var $catTerms = []; 72 var $cTerms = jQuery('form#lp-submit-form #inputCategory').val(); 73 $catTerms.push($cTerms); 74 if (document.getElementById("pre-selected-cat") !== null) { 75 var $preSelected = jQuery('#pre-selected-cat').val(); 76 $catTerms.push($preSelected) 77 } 78 jQuery.ajax({ 79 type: 'POST', 80 dataType: 'json', 81 url: ajax_term_object.ajaxurl, 82 data: { 83 'action': 'ajax_term', 84 'term_id': jQuery('form#lp-submit-form #inputCategory').val(), 85 'listing_id': jQuery('input[name=lp_post]').val(), 86 }, 87 success: function(data) { 88 jQuery('#inputCategory').removeAttr("disabled"); 89 if (data) { 90 if (data.hasfeatues == !0) { 91 jQuery('.labelforfeatures.lp-nested').show(); 92 jQuery('#tags-by-cat').show() 93 } 94 if (data.hasfields == !0) { 95 jQuery('#features-by-cat').show() 96 } 97 $('form#lp-submit-form div.pre-load').removeClass('loader'); 98 jQuery(".chosen-select").prop('disabled', !1).trigger('chosen:updated'); 99 if (data.tags != null) { 100 jQuery('.lpfeatures_fields').prepend('<label for="inputTags" class="featuresBycat">' + data.featuretitle + '</label>'); 101 jQuery.each(data.tags, function(i, v) { 102 var lpchecked = ''; 103 if (data.lpselectedtags != null) { 104 jQuery.each(data.lpselectedtags, function(lk, ls) { 105 if (i.trim() == lk) { 106 lpchecked = 'checked' 107 } 108 }) 109 } 110 jQuery('#tags-by-cat').append('<div class="col-md-2 col-sm-4 col-xs-6"><div class="checkbox pad-bottom-10"><input id="check_' + v + '" type="checkbox" name="lp_form_fields_inn[lp_feature][]" value="' + i + '" ' + lpchecked + '><label for="check_' + v + '">' + v + '</label></div></div>') 111 }) 112 } 113 jQuery('#features-by-cat').append(data.fields) 114 } 115 } 116 }) 117 }); 118 jQuery(".lp-slected-plan-cat").on('click', function() { 119 jQuery('.lp_show_hide_plans').removeClass('active'); 120 jQuery('.lp_show_hide_plans').removeClass('isactive'); 121 jQuery('.lp_plan_result_section').html(''); 122 jQuery('.lp_hide_general_plans').html(''); 123 jQuery('.lpmonthyearswitcher').hide(); 124 $this = jQuery(this); 125 $durationType = ''; 126 if ( jQuery( ".lpmonthyearswitcher a.switch-fields" ).length ) { 127 if(jQuery('.lpmonthyearswitcher a.switch-fields').hasClass('active')){ 128 $durationType = 'yearly'; 129 }else{ 130 $durationType = 'monthly'; 131 } 132 } 133 $currentStyle = jQuery('#select_style').data('style'); 134 jQuery("body").addClass("listingpro-loading"); 135 jQuery('#cats-selected-plans').html(''); 136 jQuery.ajax({ 137 type: 'POST', 138 dataType: 'json', 139 url: ajax_term_object.ajaxurl, 140 data: { 141 'action': 'listingpro_select_plan_by_cat', 142 'term_id': $this.val(), 143 'currentStyle': $currentStyle, 144 'duration_type': $durationType, 145 }, 146 success: function(data) { 147 jQuery("body").removeClass("listingpro-loading"); 148 if (data.plans) { 149 if (data.switcher) { 150 if (data.switcher == "1") { 151 jQuery('.lpmonthyearswitcher').show() 152 } 153 } 154 //jQuery('.lp_plan_result_section').html(data.plans); 155 jQuery('.lp_plan_result_section[data-style=' + $currentStyle + ']').html(data.plans); 156 jQuery('.lp_plan_result_section').addClass('lp-plan-view-border'); 157 var $hiddenField = '<input type="hidden" name="lp_pre_selected_cats" value="' + $this.val() + '" />'; 158 jQuery($hiddenField).appendTo(".price-plan-button") 159 } 160 } 161 }) 162 }); 163 jQuery(".lp_show_hide_by_duration").on('click', function() { 164 $this = jQuery(this); 165 $durationType = $this.data('durationtype'); 166 $catID = jQuery('.lp-slected-plan-cat:checked').val(); 167 jQuery("body").addClass("listingpro-loading"); 168 jQuery('#cats-selected-plans').html(''); 169 jQuery.ajax({ 170 type: 'POST', 171 dataType: 'json', 172 url: ajax_term_object.ajaxurl, 173 data: { 174 'action': 'filter_pricingplan', 175 'term_id': $catID, 176 'duration_type': $durationType, 177 }, 178 success: function(data) { 179 jQuery("body").removeClass("listingpro-loading"); 180 if (data.plans) { 181 jQuery('#cats-selected-plans').html(data.plans); 182 var $hiddenField = '<input type="hidden" name="lp_pre_selected_cats" value="' + $this.val() + '" />'; 183 jQuery($hiddenField).appendTo(".price-plan-button") 184 } 185 } 186 }) 187 }); 188 jQuery('.lp_plans_switcher_btn').on('click', function() { 189 $this = jQuery(this); 190 jQuery('.lp_cats_on_plan_wrap').css({ 191 "visibility": "hidden", 192 "height": "0px", 193 "padding-bottom": "0px" 194 }); 195 196 //$currentVal = jQuery('.lpmonthyearswitcher span.active').html(); 197 //$duration_type = 'monthly'; 198 /* if ($currentVal == "Monthly") { 199 $duration_type = 'monthly' 200 } else if ($currentVal == "Annually") { 201 $duration_type = 'yearly' 202 } */ 203 204 $duration_type = ''; 205 if ( jQuery( ".lpmonthyearswitcher a.switch-fields" ).length ) { 206 if(jQuery('.lpmonthyearswitcher a.switch-fields').hasClass('active')){ 207 $duration_type = 'yearly'; 208 }else{ 209 $duration_type = 'monthly'; 210 } 211 } 212 213 jQuery('.lp_plans_switcher_btn').removeClass('isactive'); 214 jQuery('.lp_hide_general_plans').html(''); 215 jQuery('.lp_hide_general_plans').removeClass('lp-plan-view-border'); 216 jQuery('.lp_plan_result_section').html(''); 217 $this.toggleClass('isactive'); 218 if ($this.hasClass('isactive') && $this.data('val') == 'standard') { 219 $currentStyle = jQuery('#select_style').data('style'); 220 jQuery("body").addClass("listingpro-loading"); 221 //jQuery('input.lp-slected-plan-cat').prop('checked', !1); 222 jQuery('input.lp-slected-plan-cat').prop('checked', false); 223 jQuery('label.active-category-radio').removeClass('active-category-radio'); 224 jQuery.ajax({ 225 type: 'POST', 226 dataType: 'json', 227 url: ajax_term_object.ajaxurl, 228 data: { 229 'action': 'listingpro_select_general_plans', 230 'currentStyle': $currentStyle, 231 'duration_type': $duration_type, 232 }, 233 success: function(data) { 234 jQuery("body").removeClass("listingpro-loading"); 235 if (data.plans) { 236 jQuery('.lpmonthyearswitcher').show(); 237 //jQuery('.lp_plan_result_section').html(data.plans); 238 jQuery('.lp_plan_result_section[data-style=' + $currentStyle + ']').html(data.plans); 239 jQuery('.lp_plan_result_section').addClass('lp-plan-view-border'); 240 var $hiddenField = '<input type="hidden" name="lp_pre_selected_cats" value="' + $this.val() + '" />'; 241 jQuery($hiddenField).appendTo(".price-plan-button") 242 } 243 } 244 }) 245 } else { 246 jQuery('.lp_cats_on_plan_wrap').css({ 247 "visibility": "visible", 248 "height": "auto", 249 "padding-bottom": "40px" 250 }); 251 jQuery('.lp_plan_result_sectiolp_cats_on_plan_wrapn').html(''); 252 jQuery('.lp_plan_result_section').removeClass('lp-plan-view-border'); 253 jQuery('.lpmonthyearswitcher').hide() 254 } 255 }); 256 jQuery('ul.switch_month_year li span').on('click', function() { 257 jQuery("body").addClass("listingpro-loading"); 258 $this = jQuery(this); 259 jQuery('ul.switch_month_year li span').removeClass('active_switch'); 260 $this.toggleClass('active_switch'); 261 $currentVal = $this.html(); 262 $duration_type = ''; 263 $currentStyle = jQuery('#select_style').data('style'); 264 if ($currentVal == "Monthly") { 265 $duration_type = 'monthly' 266 } else if ($currentVal == "Annually") { 267 $duration_type = 'yearly' 268 } 269 $catID = ''; 270 $planUsage = ''; 271 if (jQuery('label').hasClass('active-category-radio')) { 272 $catID = jQuery('label.active-category-radio').find('input').val() 273 } else { 274 $planUsage = 'default' 275 } 276 jQuery('.lp_hide_general_plans').html(''); 277 jQuery('.lp_plan_result_section').html(''); 278 jQuery.ajax({ 279 type: 'POST', 280 dataType: 'json', 281 url: ajax_term_object.ajaxurl, 282 data: { 283 'action': 'filter_pricingplan', 284 'cat_id': $catID, 285 'duration_type': $duration_type, 286 'currentStyle': $currentStyle, 287 'planUsage': $planUsage, 288 }, 289 success: function(data) { 290 jQuery("body").removeClass("listingpro-loading"); 291 if (data) { 292 jQuery('.lp_plan_result_section:first').html(data.plans); 293 var $hiddenField = '<input type="hidden" name="lp_pre_selected_cats" value="' + $this.val() + '" />'; 294 jQuery($hiddenField).appendTo(".price-plan-button"); 295 } 296 } 297 }) 298 }); 299 jQuery('.lp_button_switcher span').on('click', function() { 300 jQuery('.lp_hide_general_plans').removeClass('lp-plan-view-border'); 301 jQuery('.lp_button_switcher span').removeClass('active'); 302 jQuery(this).toggleClass('active'); 303 jQuery("body").addClass("listingpro-loading"); 304 $this = jQuery(this); 305 $currentVal = $this.html(); 306 $duration_type = ''; 307 $currentStyle = jQuery('#select_style').data('style'); 308 if ($currentVal == "Monthly") { 309 $duration_type = 'monthly'; 310 jQuery('.switch-fields').removeClass('active') 311 } else if ($currentVal == "Annually") { 312 $duration_type = 'yearly'; 313 jQuery('.switch-fields').addClass('active') 314 } 315 $catID = ''; 316 $planUsage = ''; 317 if (jQuery('label').hasClass('active-category-radio')) { 318 $catID = jQuery('label.active-category-radio').find('input').val() 319 } else { 320 $planUsage = 'default' 321 } 322 jQuery('.lp_hide_general_plans').html(''); 323 jQuery('.lp_plan_result_section').html(''); 324 jQuery.ajax({ 325 type: 'POST', 326 dataType: 'json', 327 url: ajax_term_object.ajaxurl, 328 data: { 329 'action': 'filter_pricingplan', 330 'cat_id': $catID, 331 'duration_type': $duration_type, 332 'currentStyle': $currentStyle, 333 'planUsage': $planUsage, 334 }, 335 success: function(data) { 336 jQuery("body").removeClass("listingpro-loading"); 337 if (data) { 338 jQuery('.lp_plan_result_section:first').html(data.plans); 339 var $hiddenField = '<input type="hidden" name="lp_pre_selected_cats" value="' + $this.val() + '" />'; 340 jQuery($hiddenField).appendTo(".price-plan-button"); 341 jQuery('.lp_plan_result_section').addClass('lp-plan-view-border') 342 } 343 } 344 }) 345 }); 346 jQuery('.lp_button_switcher a').on('click', function() { 347 jQuery('.lp_hide_general_plans').removeClass('lp-plan-view-border'); 348 $duration_type = ''; 349 $currentStyle = jQuery('#select_style').data('style'); 350 if (jQuery(this).hasClass('active')) { 351 jQuery('.lp-monthly-side').addClass('active'); 352 jQuery('.lp-year-side').removeClass('active'); 353 $duration_type = 'monthly' 354 } else { 355 $duration_type = 'yearly'; 356 jQuery('.lp-year-side').addClass('active'); 357 jQuery('.lp-monthly-side').removeClass('active') 358 } 359 jQuery("body").addClass("listingpro-loading"); 360 $this = jQuery(this); 361 $catID = ''; 362 $planUsage = ''; 363 if (jQuery('label').hasClass('active-category-radio')) { 364 $catID = jQuery('label.active-category
364-radio').find('input').val() 365 } else { 366 $planUsage = 'default' 367 } 368 jQuery('.lp_hide_general_plans').html(''); 369 jQuery('.lp_plan_result_section').html(''); 370 jQuery.ajax({ 371 type: 'POST', 372 dataType: 'json', 373 url: ajax_term_object.ajaxurl, 374 data: { 375 'action': 'filter_pricingplan', 376 'cat_id': $catID, 377 'duration_type': $duration_type, 378 'currentStyle': $currentStyle, 379 'planUsage': $planUsage, 380 }, 381 success: function(data) { 382 jQuery("body").removeClass("listingpro-loading"); 383 if (data) { 384 jQuery('.lp_plan_result_section:first').html(data.plans); 385 var $hiddenField = '<input type="hidden" name="lp_pre_selected_cats" value="' + $this.val() + '" />'; 386 jQuery($hiddenField).appendTo(".price-plan-button"); 387 jQuery('.lp_plan_result_section').addClass('lp-plan-view-border') 388 } 389 } 390 }) 391 }) 392})
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.