Added shortcut

This commit is contained in:
Nicolas Lœuillet 2016-11-18 19:21:31 +01:00
parent 32f455c131
commit 995c204428
7 changed files with 19 additions and 5 deletions

View file

@ -0,0 +1,7 @@
$(document).ready(() => {
Mousetrap.bind('s', () => {
$('#search').trigger('click');
$('#search_entry_term').focus();
return false;
});
});

View file

@ -30,6 +30,12 @@ $(document).ready(() => {
/* Actions */ /* Actions */
Mousetrap.bind('g n', () => { Mousetrap.bind('g n', () => {
$('#nav-btn-add').trigger('click'); $('#nav-btn-add').trigger('click');
return false;
});
Mousetrap.bind('s', () => {
$('#nav-btn-search').trigger('click');
return false;
}); });
Mousetrap.bind('esc', () => { Mousetrap.bind('esc', () => {

View file

@ -364,3 +364,4 @@ fos_js_routing:
- developer - developer
- howto - howto
- logout - logout
- new

View file

@ -1034,7 +1034,7 @@ class EntryControllerTest extends WallabagCoreTestCase
$crawler = $client->submit($form, $data); $crawler = $client->submit($form, $data);
$this->assertCount(4, $crawler->filter('div[class=entry]')); $this->assertCount(5, $crawler->filter('div[class=entry]'));
// Search on starred list // Search on starred list
$crawler = $client->request('GET', '/starred/list'); $crawler = $client->request('GET', '/starred/list');
@ -1078,7 +1078,7 @@ class EntryControllerTest extends WallabagCoreTestCase
$form = $crawler->filter('form[name=search]')->form(); $form = $crawler->filter('form[name=search]')->form();
$data = [ $data = [
'search_entry[term]' => 'pocket', 'search_entry[term]' => 'wxcvbnqsdf', // a string not available in the database
]; ];
$crawler = $client->submit($form, $data); $crawler = $client->submit($form, $data);

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