implement quit api. indicate if backend is offline

This commit is contained in:
j 2016-01-08 10:02:24 +05:30
commit 5d4ed8ffbc
8 changed files with 83 additions and 35 deletions

View file

@ -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);
}

View file

@ -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();
}
});
});
}