1jQuery(function($){ 2 /* 3 * дейÑÑвие пÑи нажаÑии на ÐºÐ½Ð¾Ð¿ÐºÑ Ð·Ð°Ð³ÑÑзки изобÑÐ°Ð¶ÐµÐ½Ð¸Ñ 4 * Ð²Ñ Ñакже можеÑе пÑивÑзаÑÑ ÑÑо дейÑÑвие к ÐºÐ»Ð¸ÐºÑ Ð¿Ð¾ ÑÐ°Ð¼Ð¾Ð¼Ñ Ð¸Ð·Ð¾Ð±ÑÐ°Ð¶ÐµÐ½Ð¸Ñ 5 */ 6 $('.upload_image_button').click(function(){ 7 var send_attachment_bkp = wp.media.editor.send.attachment; 8 var button = $(this); 9 wp.media.editor.send.attachment = function(props, attachment) { 10 $(button).parent().prev().attr('src', attachment.url); 11 $(button).prev().val(attachment.id); 12 wp.media.editor.send.attachment = send_attachment_bkp; 13 } 14 wp.media.editor.open(button); 15 return false; 16 }); 17 /* 18 * ÑдалÑем знаÑение пÑоизволÑного Ð¿Ð¾Ð»Ñ 19 * еÑли бÑÑÑ ÑоÑнÑм, Ñо Ð¼Ñ Ð¿ÑоÑÑо ÑдалÑем value Ñ input type="hidden" 20 */ 21 $('.remove_image_button').click(function(){ 22 var r = confirm("УвеÑенÑ?"); 23 if (r == true) { 24 var src = $(this).parent().prev().attr('data-src'); 25 $(this).parent().prev().attr('src', src); 26 $(this).prev().prev().val(''); 27 } 28 return false; 29 }); 30});
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.