Added hotkeys for selecting posts in upload form

This commit is contained in:
Marcin Kurczewski 2014-08-27 18:57:49 +02:00
parent 37ff4705a6
commit 9c26087b46

View file

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