From 57e922c59c2437010bb5ea9e8ee705089975374e Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 18 Jan 2014 05:57:41 +0400 Subject: [PATCH] added key def replace helper function updateHTMLKeyDoc(..) to keyboead.js... Signed-off-by: Alex A. Naanou --- ui/lib/keyboard.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ui/lib/keyboard.js b/ui/lib/keyboard.js index d49b8f22..b8dc9c8d 100755 --- a/ui/lib/keyboard.js +++ b/ui/lib/keyboard.js @@ -720,6 +720,20 @@ function getKeysByDocHTML(doc, help, combine_sections){ } +// Update key definitions... +// +// NOTE: this does not support multiple sections... +function updateHTMLKeyDoc(help, root){ + root = root == null ? $('body') : root + return root.find('.key-doc').each(function(i, e){ + e = $(e) + var doc = e.find('.doc') + var keys = $(getKeysByDocHTML(doc.html(), help)).find('.keys') + e.find('.keys').html(keys.html()) + }) +} + + /********************************************************************** * Key binding editor...