first commit
This commit is contained in:
26
_rejestracja/Static/script/UploadImage.js
Normal file
26
_rejestracja/Static/script/UploadImage.js
Normal file
@@ -0,0 +1,26 @@
|
||||
$(function(){
|
||||
var btnUpload=$('#upload');
|
||||
var status=$('#status');
|
||||
new AjaxUpload(btnUpload, {
|
||||
action: urlActionUpload,
|
||||
name: 'uploadfile',
|
||||
onSubmit: function(file, ext){
|
||||
if (! (ext && /^(jpg|png|jpeg|gif)$/.test(ext))){
|
||||
// extension is not allowed
|
||||
status.text('tylko JPG, PNG oraz GIF');
|
||||
return false;
|
||||
}
|
||||
//alert(urlActionUpload);
|
||||
status.text('Wgrywam...');
|
||||
},
|
||||
onComplete: function(file, response){
|
||||
//On completion clear the status
|
||||
status.text('');
|
||||
//Add uploaded file to list
|
||||
//alert(response);
|
||||
|
||||
$('#PhotoDisplay', window.parent.document).html(response);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user