file drop improvements

This commit is contained in:
rlx 2016-01-12 13:27:09 +05:30
parent 6274ae08ea
commit 61fe4d2805

View file

@ -98,7 +98,7 @@
dragenter: function(event) {
event.originalEvent.preventDefault();
event.originalEvent.stopPropagation();
if (!$('#importScreen').length) {
if (!$('#importScreen').length && !$('closedScreen').length) {
oml.ui.importScreen().appendTo(Ox.$body);
}
},
@ -106,6 +106,10 @@
event.originalEvent.preventDefault();
event.originalEvent.stopPropagation();
},
dragstart: function(event) {
event.originalEvent.preventDefault();
event.originalEvent.stopPropagation();
},
drop: function(event) {
$('#importScreen').remove();
if (event.originalEvent.dataTransfer.files) {