use new screens
This commit is contained in:
parent
df22047962
commit
85bdb00572
1 changed files with 13 additions and 18 deletions
|
@ -96,14 +96,21 @@
|
||||||
});
|
});
|
||||||
Ox.$document.on({
|
Ox.$document.on({
|
||||||
dragenter: function(event) {
|
dragenter: function(event) {
|
||||||
event.preventDefault();
|
event.originalEvent.preventDefault();
|
||||||
|
event.originalEvent.stopPropagation();
|
||||||
|
if (!$('#importScreen').length) {
|
||||||
|
oml.ui.importScreen().appendTo(Ox.$body);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
dragover: function(event) {
|
dragover: function(event) {
|
||||||
event.preventDefault();
|
event.originalEvent.preventDefault();
|
||||||
|
event.originalEvent.stopPropagation();
|
||||||
},
|
},
|
||||||
drop: function(event) {
|
drop: function(event) {
|
||||||
|
$('#importScreen').remove();
|
||||||
if (event.originalEvent.dataTransfer.files) {
|
if (event.originalEvent.dataTransfer.files) {
|
||||||
event.preventDefault();
|
event.originalEvent.preventDefault();
|
||||||
|
event.originalEvent.stopPropagation();
|
||||||
oml.upload(event.originalEvent.dataTransfer.files, function(response) {
|
oml.upload(event.originalEvent.dataTransfer.files, function(response) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
Ox.Request.clearCache();
|
Ox.Request.clearCache();
|
||||||
|
@ -132,24 +139,12 @@
|
||||||
removeScreen();
|
removeScreen();
|
||||||
oml.bindEvent({
|
oml.bindEvent({
|
||||||
close: function() {
|
close: function() {
|
||||||
if(!$('#offline').length) {
|
if (!$('#closedScreen').length) {
|
||||||
$('<div>')
|
oml.ui.closedScreen().appendTo(Ox.$body);
|
||||||
.attr({id: 'offline'})
|
|
||||||
.css({
|
|
||||||
left: 0,
|
|
||||||
right: 0,
|
|
||||||
top: 0,
|
|
||||||
bottom: 0,
|
|
||||||
position: 'absolute',
|
|
||||||
opacity: 0.5,
|
|
||||||
backgroundColor: 'black',
|
|
||||||
zIndex: 1000
|
|
||||||
})
|
|
||||||
.appendTo(Ox.$body);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
open: function() {
|
open: function() {
|
||||||
$('#offline').remove();
|
$('#closedScreen').remove();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue