1jQuery(document).ready(function($){ 2 3 $('#pd-upload-btn').click(function(e) { 4 e.preventDefault(); 5 var image = wp.media({ 6 title: 'Upload Image', 7 multiple: false 8 }).open() 9 .on('select', function(e){ 10 11 var uploaded_image = image.state().get('selection').first(); 12 var image_url = uploaded_image.toJSON().url; 13 $('#pd_pf_image_url').val(image_url); 14 var html = ['<span class="pd_remove_bg_image">X</span>', 15 '<img src="'+image_url+'" alt="" />' 16 ].join(""); 17 $('#pd_preview_img').html(html); 18 }); 19 }); 20 21 $(document).on( 'click', '.pd_remove_bg_image', function(){ 22 23 $('#pd_preview_img').html(''); 24 $('#pd_pf_image_url').val(''); 25 if($('#sbd_prev_image').length>0){ 26 $('#sbd_prev_image').val(''); 27 } 28 }) 29 30 31 32 $('#qc_pd_category').on('change', function(){ 33 var city = $('#qc_pd_category').val(); 34 35 $.post( 36 ajaxurl, 37 { 38 action : 'qcld_pd_category_filter', 39 cat : city, 40 }, 41 function(data){ 42 43 $('#qc_pd_list').html(data); 44 45 } 46 ); 47 48 }) 49 50 $('#sld_claim_list').on('change',function(e){ 51 e.preventDefault(); 52 if($(this).val()!==''){ 53 $.post( 54 ajaxurl, 55 { 56 action : 'qcld_sbd_show_list_item', 57 listid: $(this).val() 58 }, 59 function(data){ 60 $('#sld_list_item').html(data); 61 } 62 ); 63 }else{ 64 $('#sld_list_item').html(''); 65 } 66 67 }) 68 69 $(document).on('click', "#sbd_generate", function(e){ 70 var objc = $(this); 71 72 if($('#sbd_item_link').val()!=''){ 73 var html = "<div id='sbd_ajax_preloader'><div class='sbd_ajax_loader'></div></div>"; 74 $('body').append(html); 75 $.post(ajaxurl, { 76 action: 'qcpd_generate_text', 77 url: $('#sbd_item_link').val(), 78 }, 79 function(data) { 80 81 $('#sbd_ajax_preloader').remove(); 82 var data = JSON.parse(data); 83 $('#sbd_title').val(data.title) 84 $('#sbd_subtitle').val(data.description) 85 86 }); 87 88 }else{ 89 alert('Item link field cannot left empty!'); 90 } 91 92 93 }) 94 95 96 97 98}) 99 100function initMap() { 101 102}
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.