aboutsummaryrefslogtreecommitdiffstats
path: root/static-http
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-03 01:48:59 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-03 01:48:59 +0000
commit1139bf72ca8f22e16fded818a528450e4276ac2f (patch)
tree619da00da25d4b56e58d7c11be68586784114569 /static-http
parentf533b7504cb3a60ecd111137223db647b7e170ec (diff)
Minor demo cleanups
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17009 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'static-http')
-rw-r--r--static-http/ajamdemo.html4
-rw-r--r--static-http/astman.js8
2 files changed, 11 insertions, 1 deletions
diff --git a/static-http/ajamdemo.html b/static-http/ajamdemo.html
index 687b59044..f6b690e86 100644
--- a/static-http/ajamdemo.html
+++ b/static-http/ajamdemo.html
@@ -49,10 +49,14 @@
selectedchan = null;
}
if (loggedon) {
+ $('username').disabled = 1;
+ $('secret').disabled = 1;
$('logoff').disabled = 0;
$('login').disabled = 1;
$('refresh').disabled = 0;
} else {
+ $('username').disabled = 0;
+ $('secret').disabled = 0;
$('logoff').disabled = 1;
$('login').disabled = 0;
$('refresh').disabled = 1;
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<tr class='" + cclass + "' id='" + channels[x].channel + "' onClick='astmanEngine.clickChannel(event)'>";
s = s + "<td>" + channels[x].channel + "</td>";
@@ -169,6 +172,9 @@ function Astman() {
if (!found)
s += "<tr><td colspan=" + fieldlist.length + "><i class='light'>No active channels</i></td>\n";
s += "</table>\n";
+ if (!foundactive) {
+ me.selecttarget = null;
+ }
return s;
};
this.parseResponse = function(t, callback) {