[asterisk-commits] trunk r17009 - in /trunk/static-http:
ajamdemo.html astman.js
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Apr 2 18:49:00 MST 2006
Author: markster
Date: Sun Apr 2 20:48:59 2006
New Revision: 17009
URL: http://svn.digium.com/view/asterisk?rev=17009&view=rev
Log:
Minor demo cleanups
Modified:
trunk/static-http/ajamdemo.html
trunk/static-http/astman.js
Modified: trunk/static-http/ajamdemo.html
URL: http://svn.digium.com/view/asterisk/trunk/static-http/ajamdemo.html?rev=17009&r1=17008&r2=17009&view=diff
==============================================================================
--- trunk/static-http/ajamdemo.html (original)
+++ trunk/static-http/ajamdemo.html Sun Apr 2 20:48:59 2006
@@ -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;
Modified: trunk/static-http/astman.js
URL: http://svn.digium.com/view/asterisk/trunk/static-http/astman.js?rev=17009&r1=17008&r2=17009&view=diff
==============================================================================
--- trunk/static-http/astman.js (original)
+++ trunk/static-http/astman.js Sun Apr 2 20:48:59 2006
@@ -121,6 +121,7 @@
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 @@
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 @@
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) {
More information about the asterisk-commits
mailing list