pari: trunk r94 - /trunk/config/

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Tue Oct 31 12:57:06 MST 2006


Author: pari
Date: Tue Oct 31 13:57:06 2006
New Revision: 94

URL: http://svn.digium.com/view/asterisk-gui?rev=94&view=rev
Log:
User can Logout from anywhere .. in appliance & advanced

Modified:
    trunk/config/cfgadvanced.html
    trunk/config/cfgappliance.html
    trunk/config/cfgbasic.html
    trunk/config/homeapp.html

Modified: trunk/config/cfgadvanced.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgadvanced.html?rev=94&r1=93&r2=94&view=diff
==============================================================================
--- trunk/config/cfgadvanced.html (original)
+++ trunk/config/cfgadvanced.html Tue Oct 31 13:57:06 2006
@@ -170,6 +170,22 @@
 
 	astmanEngine.setURL('../../rawman');
 	astmanEngine.setEventCallback(eventeater.eventcb);
+
+	function Logoff() {
+		var opt2 = {
+			method: 'get',
+			asynchronous: true,
+			onSuccess: function() {	 
+					// reload the browser URL
+					window.location.href=window.location.href;
+			},
+			onFailure: function(t) {
+				alert("Config Error: " + t.status + ": " + t.statusText);
+			}
+		};
+		opt2.parameters ="action=logoff";
+		var tmp2 = new Ajax.Request("../../rawman", opt2);
+	}
 </script>
 <head>
 	<title>Asterisk Configuration GUI</title>
@@ -203,7 +219,7 @@
 				<iframe width="540" height="505" frameborder="0" border="0" marginheight="0" marginwidth="0" src="home.html" id="mainscreen" style="position:absolute;top:48px;" SCROLLING=no></iframe>
 		</td>
 		<td valign=top width=250 height="505">
-			<div class="mainscreenTooltipBar"><span style="font-weight:bold">&nbsp;</span></div>
+			<div id="logoutlink" class="mainscreenTooltipBar" align=right style="font-weight:bold">&nbsp;</div>
 			<div style="margin-left: 4px;">
 			<BR>
 			<font style="margin-left:4px; font-family : Trebuchet MS, Arial, Helvetica, sans-serif;font-size: 11px; font-weight: bold">Tooltips:</font>

Modified: trunk/config/cfgappliance.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgappliance.html?rev=94&r1=93&r2=94&view=diff
==============================================================================
--- trunk/config/cfgappliance.html (original)
+++ trunk/config/cfgappliance.html Tue Oct 31 13:57:06 2006
@@ -161,6 +161,23 @@
 
 	astmanEngine.setURL('../../rawman');
 	astmanEngine.setEventCallback(eventeater.eventcb);
+
+	function Logoff() {
+		var opt2 = {
+			method: 'get',
+			asynchronous: true,
+			onSuccess: function() {	 
+					// reload the browser URL
+					window.location.href=window.location.href;
+			},
+			onFailure: function(t) {
+				alert("Config Error: " + t.status + ": " + t.statusText);
+			}
+		};
+		opt2.parameters ="action=logoff";
+		var tmp2 = new Ajax.Request("../../rawman", opt2);
+	}
+
 </script>
 <head>
 	<title>Asterisk Configuration GUI</title>
@@ -194,7 +211,7 @@
 				<iframe width="540" height="505" frameborder="0" border="0" marginheight="0" marginwidth="0" src="homeapp.html" id="mainscreen" style="position:absolute;top:48px;" SCROLLING=no></iframe>
 		</td>
 		<td valign=top width=250 height="505">
-			<div class="mainscreenTooltipBar"><span style="font-weight:bold">&nbsp;</span></div>
+			<div id="logoutlink" class="mainscreenTooltipBar" align=right style="font-weight:bold">&nbsp;</div>
 			<div style="margin-left: 4px;">
 			<BR>
 			<font style="margin-left:4px; font-family : Trebuchet MS, Arial, Helvetica, sans-serif;font-size: 11px; font-weight: bold">Tooltips:</font>

Modified: trunk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgbasic.html?rev=94&r1=93&r2=94&view=diff
==============================================================================
--- trunk/config/cfgbasic.html (original)
+++ trunk/config/cfgbasic.html Tue Oct 31 13:57:06 2006
@@ -178,7 +178,7 @@
 		};
 		opt2.parameters ="action=logoff";
 		var tmp2 = new Ajax.Request("../../rawman", opt2);
-}
+	}
 
 
 

Modified: trunk/config/homeapp.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/homeapp.html?rev=94&r1=93&r2=94&view=diff
==============================================================================
--- trunk/config/homeapp.html (original)
+++ trunk/config/homeapp.html Tue Oct 31 13:57:06 2006
@@ -55,6 +55,8 @@
 		localloggedon = 1;
 		updateButtons();
 		$('statusbar').innerHTML = "<i>Connected!</i>";
+		parent.document.getElementById('logoutlink').innerHTML = "Logout";
+		parent.document.getElementById('logoutlink').onclick = parent.Logoff ;
 		parent.astmanEngine.pollEvents();
 	}
 	
@@ -62,6 +64,7 @@
 		if ((parent.loggedon == 0) && (localloggedon == 0))
 			return;
 		parent.setLoggedOn(0);
+		parent.document.getElementById('logoutlink').innerHTML = "&nbsp;";
 		localloggedon = 0;
 		updateButtons();
 	}



More information about the asterisk-gui-commits mailing list