Browse Source

Added shortcut to focus search

Tobias Reich 11 years ago
parent
commit
0cbf57dbfa
2 changed files with 8 additions and 1 deletions
  1. 8 1
      assets/js/init.js
  2. 0 0
      assets/min/main.js

+ 8 - 1
assets/js/init.js

@@ -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 it is too large
+ 0 - 0
assets/min/main.js


Some files were not shown because too many files changed in this diff