Bring navigation (with right, left and enter) on material entries page. Supports going to next and previous page !

Also better indentation for js files (changed editorconfig for them).

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2016-11-03 10:02:16 +01:00
parent 16ef7607f4
commit 5637a26e9a
12 changed files with 162 additions and 24 deletions

View File

@ -1,19 +1,22 @@
import Mousetrap from 'mousetrap';
import $ from 'jquery';
/* open original article */
Mousetrap.bind('o', () => {
$('ul.side-nav li:nth-child(2) a i')[0].click();
$('ul.side-nav li:nth-child(2) a i')[0].click();
});
/* mark as favorite */
Mousetrap.bind('s', () => {
$('ul.side-nav li:nth-child(5) a i')[0].click();
$('ul.side-nav li:nth-child(5) a i')[0].click();
});
/* mark as read */
Mousetrap.bind('a', () => {
$('ul.side-nav li:nth-child(4) a i')[0].click();
$('ul.side-nav li:nth-child(4) a i')[0].click();
});
/* delete */
Mousetrap.bind('del', () => {
$('ul.side-nav li:nth-child(6) a i')[0].click();
$('ul.side-nav li:nth-child(6) a i')[0].click();
});