mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 11:01:04 +00:00
Fixed entry shortcuts available in list view
This commit is contained in:
parent
7c6b7a40d1
commit
0df2a4b021
7 changed files with 70 additions and 62 deletions
|
@ -1,22 +1,26 @@
|
||||||
import Mousetrap from 'mousetrap';
|
import Mousetrap from 'mousetrap';
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
|
|
||||||
/* Article view */
|
$(document).ready(() => {
|
||||||
Mousetrap.bind('o', () => {
|
if ($('#article').length > 0) {
|
||||||
$('div#article_toolbar ul.links a.original')[0].click();
|
/* Article view */
|
||||||
});
|
Mousetrap.bind('o', () => {
|
||||||
|
$('div#article_toolbar ul.links a.original')[0].click();
|
||||||
|
});
|
||||||
|
|
||||||
/* mark as favorite */
|
/* mark as favorite */
|
||||||
Mousetrap.bind('f', () => {
|
Mousetrap.bind('f', () => {
|
||||||
$('div#article_toolbar ul.links a.favorite')[0].click();
|
$('div#article_toolbar ul.links a.favorite')[0].click();
|
||||||
});
|
});
|
||||||
|
|
||||||
/* mark as read */
|
/* mark as read */
|
||||||
Mousetrap.bind('a', () => {
|
Mousetrap.bind('a', () => {
|
||||||
$('div#article_toolbar ul.links a.markasread')[0].click();
|
$('div#article_toolbar ul.links a.markasread')[0].click();
|
||||||
});
|
});
|
||||||
|
|
||||||
/* delete */
|
/* delete */
|
||||||
Mousetrap.bind('del', () => {
|
Mousetrap.bind('del', () => {
|
||||||
$('div#article_toolbar ul.links a.delete')[0].click();
|
$('div#article_toolbar ul.links a.delete')[0].click();
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,22 +1,26 @@
|
||||||
import Mousetrap from 'mousetrap';
|
import Mousetrap from 'mousetrap';
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
|
|
||||||
/* open original article */
|
$(document).ready(() => {
|
||||||
Mousetrap.bind('o', () => {
|
if ($('#article').length > 0) {
|
||||||
$('ul.side-nav a.original i')[0].click();
|
/* open original article */
|
||||||
});
|
Mousetrap.bind('o', () => {
|
||||||
|
$('ul.side-nav a.original i')[0].click();
|
||||||
|
});
|
||||||
|
|
||||||
/* mark as favorite */
|
/* mark as favorite */
|
||||||
Mousetrap.bind('f', () => {
|
Mousetrap.bind('f', () => {
|
||||||
$('ul.side-nav a.favorite i')[0].click();
|
$('ul.side-nav a.favorite i')[0].click();
|
||||||
});
|
});
|
||||||
|
|
||||||
/* mark as read */
|
/* mark as read */
|
||||||
Mousetrap.bind('a', () => {
|
Mousetrap.bind('a', () => {
|
||||||
$('ul.side-nav a.markasread i')[0].click();
|
$('ul.side-nav a.markasread i')[0].click();
|
||||||
});
|
});
|
||||||
|
|
||||||
/* delete */
|
/* delete */
|
||||||
Mousetrap.bind('del', () => {
|
Mousetrap.bind('del', () => {
|
||||||
$('ul.side-nav a.delete i')[0].click();
|
$('ul.side-nav a.delete i')[0].click();
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a title="{{ 'menu.top.search'|trans }}" class="waves-effect" href="javascript: void(null);" id="nav-btn-search">
|
<a class="waves-effect tooltipped" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.search'|trans }}" href="javascript: void(null);" id="nav-btn-search">
|
||||||
<i class="material-icons">search</i>
|
<i class="material-icons">search</i>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue