implement quit api. indicate if backend is offline
This commit is contained in:
parent
67ad0a82e9
commit
5d4ed8ffbc
8 changed files with 83 additions and 35 deletions
|
|
@ -476,6 +476,10 @@ oml.ui.mainMenu = function() {
|
|||
} else {
|
||||
Ox.print('no way to download multiple right now');
|
||||
}
|
||||
} else if (id == 'quit') {
|
||||
oml.api.quit(function() {
|
||||
//
|
||||
});
|
||||
} else {
|
||||
Ox.print('MAIN MENU DOES NOT YET HANDLE', id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,6 +128,28 @@
|
|||
} catch(e) {}
|
||||
}
|
||||
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);
|
||||
}
|
||||
},
|
||||
open: function() {
|
||||
$('#offline').remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue