Added shortcut to focus search

This commit is contained in:
Tobias Reich 2014-04-14 11:06:13 +02:00
parent d382b62f57
commit 0cbf57dbfa
2 changed files with 9 additions and 2 deletions

View File

@ -73,7 +73,14 @@ $(document).ready(function(){
.bind('left', function() { if (visible.photo()) $("#imageview a#previous").click() })
.bind('right', function() { if (visible.photo()) $("#imageview a#next").click() })
.bind(['u', 'ctrl+u'], function() { $("#upload_files").click() })
.bind(['s', 'ctrl+s'], function() { if (visible.photo()) $("#button_star").click() })
.bind(['s', 'ctrl+s', 'f', 'ctrl+f'], function(e) {
if (visible.photo()) {
$("#button_star").click();
} else if (visible.albums()) {
e.preventDefault();
$("#search").focus();
}
})
.bind(['r', 'ctrl+r'], function(e) {
e.preventDefault();
if (visible.album()) album.setTitle(album.getID());

File diff suppressed because one or more lines are too long