From d7fe3e5ca0244e3cd3e880a961b8a3c2686e2a2f Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 7 Jun 2012 02:14:17 +0400 Subject: [PATCH] done basic scafolding for moving between rows via a keyboard... Signed-off-by: Alex A. Naanou --- ui/gallery.html | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/ui/gallery.html b/ui/gallery.html index 5a887aaf..a391fe1d 100755 --- a/ui/gallery.html +++ b/ui/gallery.html @@ -78,6 +78,10 @@ var keys = { previousKeys: [37, 80], nextKeys: [39, 78], + promoteKeys: [40], + demoteKeys: [38], + + shiftKeys: [16], helpShowOnUnknownKey: true } @@ -88,9 +92,24 @@ function handleKeys(event){ var _ = (fn(code, keys.closeKeys) >= 0) ? function(){}() : (fn(code, keys.nextKeys) >= 0) ? nextImage() : (fn(code, keys.previousKeys) >= 0) ? prevImage() + : (fn(code, keys.promoteKeys) >= 0) ? function(){ + if(event.shiftKey){ + focusBelowRibbon() + } else { + promoteImage() + } + }() + : (fn(code, keys.demoteKeys) >= 0) ? function(){ + if(event.shiftKey){ + focusAboveRibbon() + } else { + demoteImage() + } + }() : (fn(code, keys.toggleRibbonView) >= 0) ? toggleRibbonView() + : (fn(code, keys.shiftKeys) >= 0) ? true // XXX - : (keys.helpShowOnUnknownKey) ? function(){}() + : (keys.helpShowOnUnknownKey) ? function(){alert(code)}() : false; return false; } @@ -150,8 +169,14 @@ function nextImage(){ } // XXX focus to above ribbon... +function focusAboveRibbon(){ + alert('not implemmented...') +} // XXX focus to below ribbon... +function focusBelowRibbon(){ + alert('not implemmented...') +} // create ribbon above/below helpers... @@ -302,7 +327,8 @@ function demoteImage(){ .ribbon { height: 360px; - width: 5000px; + /* XXX make this expand correctly */ + width: 8000px; overflow: visible; padding-top: 2px; padding-bottom: 2px; @@ -454,8 +480,13 @@ function demoteImage(){

-
- +
+ + +

+ +
+