Wrap image uploading in anonymous function.
This commit is contained in:
parent
001a47afb0
commit
502f420678
|
@ -1643,6 +1643,7 @@ $(document).ready(function(){
|
|||
Contacts.UI.Card.saveProperty(this);
|
||||
});
|
||||
|
||||
$(function() {
|
||||
// Upload function for dropped contact photos files. Should go in the Contacts class/object.
|
||||
$.fileUpload = function(files){
|
||||
var file = files[0];
|
||||
|
@ -1690,6 +1691,7 @@ $(document).ready(function(){
|
|||
xhr.setRequestHeader('Content-Type', file.type);
|
||||
xhr.send(file);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).bind('drop dragover', function (e) {
|
||||
e.preventDefault(); // prevent browser from doing anything, if file isn't dropped in dropZone
|
||||
|
|
Loading…
Reference in New Issue