From f5554c3ad83fff985d0a103926e927b3af4d392f Mon Sep 17 00:00:00 2001 From: ngn Date: Fri, 13 Mar 2015 16:11:30 +0000 Subject: [PATCH] keyboard icon on lbar opens Prefs on Keyboard tab --- client/ide.coffee | 2 +- client/prefs.coffee | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/ide.coffee b/client/ide.coffee index 17bef950..138a746d 100644 --- a/client/ide.coffee +++ b/client/ide.coffee @@ -152,7 +152,7 @@ module.exports = -> return # language bar - $('.lbar-prefs').click prefs + $('.lbar-prefs').click -> prefs 'keyboard'; return $tip = $ '.lbar-tip'; $tipDesc = $ '.lbar-tip-desc'; $tipText = $ '.lbar-tip-text'; $tipTriangle = $ '.lbar-tip-triangle' ttid = null # tooltip timeout id $ '.lbar' diff --git a/client/prefs.coffee b/client/prefs.coffee index 01a4ac28..620912a1 100644 --- a/client/prefs.coffee +++ b/client/prefs.coffee @@ -9,7 +9,7 @@ ok = -> prefs.prefixKey pk; prefs.windowTitle wt $d.dialog 'close'; false -D.prefs = prefs = module.exports = -> +D.prefs = prefs = module.exports = (tabName) -> if !$d # the dialogue, lazily initialized $d = $ """
@@ -53,6 +53,7 @@ D.prefs = prefs = module.exports = -> $i[0].selectionStart = $i[0].selectionEnd = p + u.length; return $d.dialog('option', 'position', at: 'center').dialog 'open' + if tabName then $d.tabs active: $("#prefs-tabs-nav a[href='#prefs-tab-#{tabName}']").parent().index() # load current values $('#prefs-prefixKey').val prefs.prefixKey()