From 0d5e7c30845627dccac49e486fabdf2dd49872c5 Mon Sep 17 00:00:00 2001 From: "baloh.matevz" Date: Wed, 21 Sep 2011 14:05:18 +0000 Subject: [PATCH] - When in the view variables panel, if you have the search box selected (which it is when you open the panel) you can, at any time, hit enter to select EDIT (E) of the first variable you see in the list. Screenshot: http://www.kamletos.si/admin%20verbs%203.PNG In the screenshot the sequence of keys was: > open view variables > dir > enter > 2 > enter This will hopefully mean there is less of a need for the mouse when editing variables. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2244 316c924e-a436-60f5-8080-3fe189b3f50e --- code/datums/datumvars.dm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index e47fc5c7a75..4ef7d27dfee 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -27,6 +27,18 @@ client var filter_text = document.getElementById('filter'); var filter = filter_text.value; + if(event.keyCode == 13){ + var vars_ol = document.getElementById('vars'); + var lis = vars_ol.getElementsByTagName("li"); + if(lis.length > 0){ + alist = lis\[0\].getElementsByTagName("a") + if(alist.length > 0){ + location.href=alist\[0\].href; + } + } + return + } + if(filter.value == ""){ return; }else{