1$(function(){ 2 if ($("div").is("#upload")) 3 { 4 var btnUpload=$('#upload'); 5 var status=$('#status'); 6 new AjaxUpload(btnUpload, { 7 action: '/source/upload-file.php', 8 name: 'uploadfile', 9 onSubmit: function(file, ext){ 10 if (! (ext && /^(jpg|png|jpeg|gif)$/.test(ext))){ 11 // extension is not allowed 12 status.text('Only JPG, PNG or GIF files are allowed'); 13 return false; 14 } 15 status.text('Èä¸ò çàãðóçêà...'); 16 }, 17 onComplete: function(file, response){ 18 //On completion clear the status 19 status.text(''); 20 //Add uploaded file to list 21 if(response==="error"){ 22 $('<li></li>').appendTo('#files').text(file).addClass('error'); 23 } else{ 24 $('<li></li>').appendTo('#files').html('<img src="/temp_upload/'+response+'" alt="" /><input type="hidden" name="foto_upload[]" value="' + response + '" /><br />'+file).addClass('success'); 25 } 26 } 27 }); 28 } 29 });
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.