1jQuery(document).ready(function(){ 2 function imic_update_url_cats(key, value, url) { 3 if (!url) url = window.location.href; 4 var re = new RegExp("([?&])" + key + "=.*?(&|#|$)(.*)", "gi"), 5 hash; 6 if (re.test(url)) { 7 if (typeof value !== 'undefined' && value !== null) 8 return url.replace(re, '$1' + key + "=" + value + '$2$3'); 9 else { 10 hash = url.split('#'); 11 url = hash[0].replace(re, '$1$3').replace(/(&|\?)$/, ''); 12 if (typeof hash[1] !== 'undefined' && hash[1] !== null) 13 url += '#' + hash[1]; 14 return url; 15 } 16 } 17 else { 18 if (typeof value !== 'undefined' && value !== null) { 19 var separator = url.indexOf('?') !== -1 ? '&' : '?'; 20 hash = url.split('#'); 21 url = hash[0] + separator + key + '=' + value; 22 if (typeof hash[1] !== 'undefined' && hash[1] !== null) 23 url += '#' + hash[1]; 24 return url; 25 } 26 else 27 return url; 28 } 29} 30function getUrlParams_cats() { 31 var result = {}; 32 var params = (window.location.search.split('?')[1] || '').split('&'); 33 for(var param in params) { 34 if (params.hasOwnProperty(param)) { 35 var paramParts = params[param].split('='); 36 result[paramParts[0]] = decodeURIComponent(paramParts[1] || ""); 37 } 38 } 39 return result; 40} 41 jQuery(".get-child-cat").live('change',function() { 42 //alert("saibaba"); 43 var $this_id = jQuery(this).parent().attr("id"); 44 var $slug = jQuery(this).val(); 45 var $blank = jQuery(this).find(':selected').data('val'); 46 var $page = jQuery(this).data('page'); 47 48 if($blank=="blank") 49 { 50 jQuery('#'+$this_id).nextAll('div').remove(); 51 } 52 else 53 { 54 jQuery(jQuery(this).parent().parent().find("#loading-field")).show(); 55 jQuery("#child-field-loading").show(); 56 jQuery.ajax({ 57 type:'POST', 58 url:classified.ajaxurl, 59 async: false, 60 data: { 61 action:'imi_get_child_category', 62 parents: $slug, 63 ids: $this_id, 64 pagess: $page, 65 }, 66 success: function(data) { 67 //alert(data); 68 (jQuery('#'+$this_id).parent().find("#loading-field")).hide(); 69 jQuery("#child-field-loading").hide(); 70 jQuery('#'+$this_id).nextAll('div').remove(); 71 jQuery('#'+$this_id).parent().append(data); 72 jQuery('.selectpicker').selectpicker({container:'body'}); 73 }, 74 erro: function(errorThrown) { 75 76 } 77 }); 78 } 79 if($page=="ad") 80 { 81 jQuery(".waiting").fadeIn(); 82 var $id = jQuery("#vehicle-id").attr("class"); 83 jQuery.ajax({ 84 type: 'POST', 85 url: classified.ajaxurl, 86 data: { 87 action: 'imic_set_ad_fields', 88 slug: $slug, 89 update:$id 90 }, 91 success: function(data) { 92 jQuery(".waiting").fadeOut(); 93 if(data!='blank') 94 { 95 jQuery("#addcustom").empty(); 96 jQuery("#addcustom").html(data); 97 jQuery('.selectpicker').selectpicker({container:'body'}); 98 } 99 }, 100 error: function(errorThrown) { 101 } 102 }); 103 jQuery.ajax({ 104 type: 'POST', 105 url: classified.ajaxurl, 106 data: { 107 action: 'imic_set_tags_fields', 108 slug: $slug, 109 update:$id 110 }, 111 success: function(data) { 112 if(data!='blank') 113 { 114 jQuery("#dynamic-tags").empty(); 115 jQuery("#dynamic-tags").html(data); 116 } 117 }, 118 error: function(errorThrown) { 119 } 120 }); 121 } 122 if($page!='') 123 { 124 history.pushState('', '', imic_update_url_cats("list-cat",$slug,'')); 125 } 126 if($page!="ad"&&$page!='') 127 { 128 var $cat_vars = getUrlParams_cats(); 129 var $category = "1"; 130 jQuery(".waiting").fadeIn(); 131 jQuery.ajax({ 132 type: 'POST', 133 url: classified.ajaxurl, 134 data: { 135 action: 'imic_search_result', 136 values: $cat_vars, 137 category: $category, 138 }, 139 success: function(data) { 140 jQuery(".waiting").fadeOut(); 141 if($page=="yes") 142 { 143 jQuery("#listing-with-filter").empty(); 144 jQuery("#listing-with-filter").html(data); 145 } 146 else 147 { 148 jQuery("#results-holder").empty(); 149 jQuery("#results-holder").html(data); 150 } 151 jQuery('ul.inline li').prepend('<i class="fa fa-caret-right"></i> '); 152 jQuery(".format-standard").each(function(){ 153 jQuery(this).find(".media-box").append("<span class='zoom'><span class='icon'><i class='icon-plus'></i></span></span>"); 154 }); 155 }, 156 error: function(errorThrown) { 157 } 158 }); 159 } 160 }); 161 jQuery(".matched-tags-list a").live("click",function(){ 162 if(jQuery(this).hasClass("act-tag")) 163 { 164 jQuery(this).removeClass("act-tag"); 165 jQuery(this).find("i").remove(); 166 167 } 168 else 169 { 170 jQuery(this).addClass("act-tag"); 171 jQuery(this).append(" <i class=\"fa fa-check\"></i>"); 172 } 173 $tags = []; 174 jQuery(".matched-tags-list .act-tag").each(function(index, element) { 175 $tags.push(jQuery(this).html()); 176 }); 177 var $category = "0"; 178 var $cat_vars = getUrlParams_cats(); 179 jQuery(".waiting").fadeIn(); 180 jQuery.ajax({ 181 type: 'POST', 182 url: classified.ajaxurl, 183 data: { 184 action: 'imic_search_result', 185 values: $cat_vars, 186 tags: $tags, 187 category: $category 188 }, 189 success: function(data) { 190 jQuery(".waiting").fadeOut(); 191 jQuery("#results-holder").empty(); 192 jQuery("#results-holder").html(data); 193 jQuery('ul.inline li').prepend('<i class="fa fa-caret-right"></i> '); 194 jQuery(".format-standard").each(function(){ 195 jQuery(this).find(".media-box").append("<span class='zoom'><span class='icon'><i class='icon-plus'></i></span></span>"); 196 }); 197 }, 198 error: function(errorThrown) { 199 } 200 }); 201 }); 202});
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.