From d68ecdbfaf022e439ca2160f6ad3035d5924d0fe Mon Sep 17 00:00:00 2001 From: "baloh.matevz" Date: Sun, 2 Oct 2011 19:05:40 +0000 Subject: [PATCH] Deleting, correcting, retyping or changing the search text in view variables now properly updates the variables, eliminating the need to hit refresh if you mistype. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2319 316c924e-a436-60f5-8080-3fe189b3f50e --- code/datums/datumvars.dm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 04abacce91b..34ec20ef476 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -97,6 +97,12 @@ client return } + //This part here resets everything to how it was at the start so the filter is applied to the complete list. Screw efficiency, it's client-side anyway and it only looks through 200 or so variables at maximum anyway (mobs). + if(complete_list != null && complete_list != ""){ + var vars_ol1 = document.getElementById("vars"); + vars_ol1.innerHTML = complete_list + } + if(filter.value == ""){ return; }else{ @@ -268,6 +274,14 @@ client "} html += "" html += body + + html += {" + + "} + html += "" usr << browse(html, "window=variables\ref[D];size=475x650")