I re-attached the patch, It applies on current master correctly. Regards, Gehad
From 56f5f886750b5b3cd2b0748dc41c64f60d4a4756 Mon Sep 17 00:00:00 2001 From: Gehad elrobey <[email protected]> Date: Thu, 26 Jun 2014 16:47:48 +0300 Subject: [PATCH 1/2] HTML: use Right/Left arrows to switch between dives
Use arrows to switch between dives in dive detailed view. Signed-off-by: Gehad elrobey <[email protected]> --- theme/dive_export.html | 2 ++ theme/list_lib.js | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/theme/dive_export.html b/theme/dive_export.html index 91c47db..e1d89f4 100644 --- a/theme/dive_export.html +++ b/theme/dive_export.html @@ -111,6 +111,8 @@ window.onload=function(){ showAllDives(); document.getElementById("divePanel").style.display='none'; document.body.style.visibility='visible'; + + document.onkeydown = switchDives; } function changeAdvSearch(e){ diff --git a/theme/list_lib.js b/theme/list_lib.js index 0d84516..4347475 100644 --- a/theme/list_lib.js +++ b/theme/list_lib.js @@ -1026,3 +1026,16 @@ function prevDetailedDive() showDiveDetails(--dive_id); } } + +function switchDives(e) +{ + if(document.getElementById("divePanel").style.display == 'block'){ + e = e || window.event; + if (e.keyCode == '37') { + prevDetailedDive(); + } + else if (e.keyCode == '39') { + nextDetailedDive(); + } + } +} -- 1.9.1
_______________________________________________ subsurface mailing list [email protected] http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
