From f3c02c29cb1958f11ad8df317371c68275c52af3 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 23 May 2013 01:44:09 +0400 Subject: [PATCH] added docs to ui/lib/keyboard.js... Signed-off-by: Alex A. Naanou --- ui/lib/keyboard.js | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/ui/lib/keyboard.js b/ui/lib/keyboard.js index 63e68b27..55474547 100755 --- a/ui/lib/keyboard.js +++ b/ui/lib/keyboard.js @@ -464,6 +464,37 @@ function buildKeybindingsHelp(keybindings){ return res } + +// Build a basic HTML table with keyboard help... +// +// +// The table will look like this: +// +// +// +// +// +// +// +// +// +// +// +// +// +// ... +// +//
SECTION TITLE +//
SECTION DESCRIPTION +//
KEYS +// ACTION DESCRIPTION +//
+// +// NOTE: section are not separated in any way other than the element. +// NOTE: the actual HTML is created by jQuery, so the table may get +// slightly structurally changed, i.e. a element will be +// added etc. +// function buildKeybindingsHelpHTML(keybindings){ var doc = buildKeybindingsHelp(keybindings) @@ -473,9 +504,12 @@ function buildKeybindingsHelpHTML(keybindings){ if(mode == 'doc'){ continue } + // section head... res += ' ' + mode + '\n' mode = doc[mode] - res += ' '+ mode.doc + '\n' + res += ' '+ mode.doc + '\n' + + // keys... for(var action in mode){ if(action == 'doc'){ continue