From 9c26087b469743225cc57a4a06205f55f049f5e6 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Wed, 27 Aug 2014 18:57:49 +0200 Subject: [PATCH] Added hotkeys for selecting posts in upload form --- public_html/media/js/post-upload.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/public_html/media/js/post-upload.js b/public_html/media/js/post-upload.js index b9e2c562..b2a9d156 100644 --- a/public_html/media/js/post-upload.js +++ b/public_html/media/js/post-upload.js @@ -76,6 +76,20 @@ function bindUrlHandlerEvents() function bindPostTableOperations() { + Mousetrap.bind('a', function() + { + var prevPost = $('#posts tbody tr.selected:eq(0)').prev().data('post'); + if (prevPost) + selectPostTableRow(prevPost); + }, 'keyup'); + + Mousetrap.bind('d', function() + { + var nextPost = $('#posts tbody tr.selected:eq(0)').next().data('post'); + if (nextPost) + selectPostTableRow(nextPost); + }, 'keyup'); + $('#upload-step2').find('.remove').click(function(e) { e.preventDefault();