Blocked revisions 92510 via svnmerge
[asterisk/asterisk.git] / static-http / ajamdemo.html
index 687b590..607a2cf 100644 (file)
@@ -7,7 +7,7 @@
        var logoffs = new Object;
        var channels = new Object;
        var pongs = new Object;
-       var loggedon = 0;
+       var loggedon = -1;
        var selectedchan = null;
        var hungupchan = "";
        var transferedchan = "";
@@ -15,7 +15,7 @@
        var demo = new Object;
        
        function loggedOn() {
-               if (loggedon)
+               if (loggedon == 1)
                        return;
                loggedon = 1;
                updateButtons();
@@ -29,7 +29,7 @@
        }
 
        function loggedOff() {
-               if (!loggedon)
+               if (loggedon == 0)
                        return;
                loggedon = 0;
                selectedchan = null;
                        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;