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({
|
||||
dragenter: function(event) {
|
||||
event.preventDefault();
|
||||
event.originalEvent.preventDefault();
|
||||
event.originalEvent.stopPropagation();
|
||||
if (!$('#importScreen').length) {
|
||||
oml.ui.importScreen().appendTo(Ox.$body);
|
||||
}
|
||||
},
|
||||
dragover: function(event) {
|
||||
event.preventDefault();
|
||||
event.originalEvent.preventDefault();
|
||||
event.originalEvent.stopPropagation();
|
||||
},
|
||||
drop: function(event) {
|
||||
$('#importScreen').remove();
|
||||
if (event.originalEvent.dataTransfer.files) {
|
||||
event.preventDefault();
|
||||
event.originalEvent.preventDefault();
|
||||
event.originalEvent.stopPropagation();
|
||||
oml.upload(event.originalEvent.dataTransfer.files, function(response) {
|
||||
setTimeout(function() {
|
||||
Ox.Request.clearCache();
|
||||
|
@ -132,24 +139,12 @@
|
|||
removeScreen();
|
||||
oml.bindEvent({
|
||||
close: function() {
|
||||
if(!$('#offline').length) {
|
||||
$('<div>')
|
||||
.attr({id: 'offline'})
|
||||
.css({
|
||||
left: 0,
|
||||
right: 0,
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
position: 'absolute',
|
||||
opacity: 0.5,
|
||||
backgroundColor: 'black',
|
||||
zIndex: 1000
|
||||
})
|
||||
.appendTo(Ox.$body);
|
||||
if (!$('#closedScreen').length) {
|
||||
oml.ui.closedScreen().appendTo(Ox.$body);
|
||||
}
|
||||
},
|
||||
open: function() {
|
||||
$('#offline').remove();
|
||||
$('#closedScreen').remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue