handle download menu entry

This commit is contained in:
Jan Gerber 2015-05-14 13:08:16 +02:00
parent 6bce40ad3a
commit 515a6d23f6
2 changed files with 3 additions and 1 deletions

View file

@ -71,7 +71,7 @@ def run():
(r'/(.*?)/pdf/', FileHandler), (r'/(.*?)/pdf/', FileHandler),
(r'/(.*?)/txt/', FileHandler), (r'/(.*?)/txt/', FileHandler),
(r'/(.*?)/get/', FileHandler, { (r'/(.*?)/get/', FileHandler, {
'download': True 'attachment': True
}), }),
(r'/(.*)/(cover|preview)(\d*).jpg', IconHandler), (r'/(.*)/(cover|preview)(\d*).jpg', IconHandler),
(r'/api/', oxtornado.ApiHandler, dict(context=db.session)), (r'/api/', oxtornado.ApiHandler, dict(context=db.session)),

View file

@ -464,6 +464,8 @@ oml.ui.mainMenu = function() {
(oml.$ui.titlesDialog || ( (oml.$ui.titlesDialog || (
oml.$ui.titlesDialog = oml.ui.titlesDialog() oml.$ui.titlesDialog = oml.ui.titlesDialog()
)).open(); )).open();
} else if (id == 'download') {
document.location.href = '/' + oml.user.ui.item + '/get/';
} else { } else {
Ox.print('MAIN MENU DOES NOT YET HANDLE', id); Ox.print('MAIN MENU DOES NOT YET HANDLE', id);
} }