diff --git a/picturelicious/media/shortcuts.js.php b/picturelicious/media/shortcuts.js.php index 7eab7ff..c7ece32 100755 --- a/picturelicious/media/shortcuts.js.php +++ b/picturelicious/media/shortcuts.js.php @@ -1,6 +1,7 @@ +var imageId; document.onkeydown=function(e){ var pressedKey = e.keyCode || e.which; @@ -8,16 +9,16 @@ document.onkeydown=function(e){ up: 38, // right: 39, // navigate back down: 40, // - one: 49, // vote 1* // TODO - two: 50, // vote 2* // TODO - three: 51, // vote 3* // TODO - four: 52, // vote 4* // TODO - five: 53, // vote 5* // TODO - num1: 97, // vote 1* // TODO - num2: 98, // vote 2* // TODO - num3: 99, // vote 3* // TODO - num4: 100, // vote 4* // TODO - num5: 101, // vote 5* // TODO + one: 49, // vote 1* + two: 50, // vote 2* + three: 51, // vote 3* + four: 52, // vote 4* + five: 53, // vote 5* + num1: 97, // vote 1* + num2: 98, // vote 2* + num3: 99, // vote 3* + num4: 100, // vote 4* + num5: 101, // vote 5* plus: 107, // toggle image display size minus: 109, // toggle image display size c: 67, // focus cursor into comments field @@ -30,7 +31,6 @@ document.onkeydown=function(e){ }; var focusedElement = document.activeElement; - console.log("focused: " + focusedElement.id); if( focusedElement.id != "commentContent" && focusedElement.id != "q" ) { @@ -45,22 +45,27 @@ document.onkeydown=function(e){ break; case keyCodes.one: case keyCodes.num1: + rate(imageId,1); return false; break; case keyCodes.two: case keyCodes.num2: + rate(imageId,2); return false; break; case keyCodes.three: case keyCodes.num3: + rate(imageId,3); return false; break; case keyCodes.four: case keyCodes.num4: + rate(imageId,4); return false; break; case keyCodes.five: case keyCodes.num5: + rate(imageId,5); return false; break; case keyCodes.plus: diff --git a/picturelicious/templates/view.tpl.php b/picturelicious/templates/view.tpl.php index 992fbf2..bc6d7f3 100755 --- a/picturelicious/templates/view.tpl.php +++ b/picturelicious/templates/view.tpl.php @@ -44,7 +44,7 @@
- <?php echo htmlspecialchars($iv->image['tags']) ?> + <?php echo htmlspecialchars($iv->image['tags']) ?>