only allow dropping of files
This commit is contained in:
parent
ee42cb21dd
commit
4810a7ee97
1 changed files with 8 additions and 4 deletions
|
@ -118,10 +118,14 @@
|
||||||
});
|
});
|
||||||
Ox.$document.on({
|
Ox.$document.on({
|
||||||
dragenter: function(event) {
|
dragenter: function(event) {
|
||||||
event.originalEvent.preventDefault();
|
if (Ox.contains(event.originalEvent.dataTransfer.types, 'Files')) {
|
||||||
event.originalEvent.stopPropagation();
|
event.originalEvent.preventDefault();
|
||||||
if (!$('#importScreen').length && !$('#closedScreen').length) {
|
event.originalEvent.stopPropagation();
|
||||||
oml.ui.importScreen().appendTo(Ox.$body);
|
if (!$('#importScreen').length && !$('#closedScreen').length) {
|
||||||
|
oml.ui.importScreen().appendTo(Ox.$body);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log(event.originalEvent.dataTransfer);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dragover: function(event) {
|
dragover: function(event) {
|
||||||
|
|
Loading…
Reference in a new issue