From 628537c7a8ff0d5a50196a19ee0e25ced549a446 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Mon, 3 Apr 2006 01:48:59 +0000 Subject: Minor demo cleanups git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17009 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- static-http/astman.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'static-http/astman.js') diff --git a/static-http/astman.js b/static-http/astman.js index 1a6927263..81f896c1c 100644 --- a/static-http/astman.js +++ b/static-http/astman.js @@ -121,6 +121,7 @@ function Astman() { var s, x; var cclass, count=0; var found = 0; + var foundactive = 0; var fieldlist = new Array("channel", "callerid", "calleridname", "context", "extension", "priority"); me.chancallback = callback; @@ -133,8 +134,10 @@ function Astman() { cclass = "chanlistodd"; else cclass = "chanlisteven"; - if (me.selecttarget && (me.selecttarget == x)) + if (me.selecttarget && (me.selecttarget == x)) { cclass = "chanlistselected"; + foundactive = 1; + } count++; s = s + "\t"; s = s + "" + channels[x].channel + ""; @@ -169,6 +172,9 @@ function Astman() { if (!found) s += "No active channels\n"; s += "\n"; + if (!foundactive) { + me.selecttarget = null; + } return s; }; this.parseResponse = function(t, callback) { -- cgit v1.2.3