pari: trunk r93 - in /trunk/config: cfgbasic.html home.html

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


Author: pari
Date: Tue Oct 31 13:20:04 2006
New Revision: 93

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

Modified:
    trunk/config/cfgbasic.html
    trunk/config/home.html

Modified: trunk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgbasic.html?rev=93&r1=92&r2=93&view=diff
==============================================================================
--- trunk/config/cfgbasic.html (original)
+++ trunk/config/cfgbasic.html Tue Oct 31 13:20:04 2006
@@ -47,6 +47,7 @@
 			astmanEngine.pollEvents();
 	}
 
+
 	panels.push( 
 
 		new PanelDef("home", "Home", "home.png",
@@ -161,6 +162,26 @@
 
 	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>
@@ -168,7 +189,9 @@
 <body onload="javascript:registerajax()" topmargin=1>
 <table border="0" align="center" cellspacing="0" cellpadding="0" bgcolor="#dddddd" width=950 height=570>
 <tr height=47><td valign="bottom" align='right' bgcolor='white' height=47><img align='left' src="images/digiumlogo.gif" align="left"></td>
-							<td valign='bottom' align='right' bgcolor='white' colspan=2><a target='_extern' href="http://www.digium.com/astguibasic/about">About Digium</a>&nbsp;|&nbsp;<a target='_extern' href="http://www.digium.com/astguibasic/help">Help</a>&nbsp;</td>
+							<td valign='bottom' align='right' bgcolor='white' colspan=2>
+									<a target='_extern' href="http://www.digium.com/astguibasic/about">About Digium</a>&nbsp;|&nbsp;<a target='_extern' href="http://www.digium.com/astguibasic/help">Help</a>&nbsp;
+							</td>
 </tr>
 <tr><td height="505"><div id="configpanel" style="width:150px; height: 505px;">
 										<script>
@@ -194,7 +217,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/home.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/home.html?rev=93&r1=92&r2=93&view=diff
==============================================================================
--- trunk/config/home.html (original)
+++ trunk/config/home.html Tue Oct 31 13:20:04 2006
@@ -49,6 +49,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();
 	}
 	
@@ -56,6 +58,7 @@
 		if ((parent.loggedon == 0) && (localloggedon == 0))
 			return;
 		parent.setLoggedOn(0);
+		parent.document.getElementById('logoutlink').innerHTML = "&nbsp;";
 		localloggedon = 0;
 		updateButtons();
 	}
@@ -127,9 +130,32 @@
 				  </div>
 				</td></tr>
 
-				<tr><td align='center' colspan='2'><input type="submit" id="login" value="Login" disabled=1 onClick="doLogin()" class="input">
-				&nbsp;&nbsp;&nbsp;&nbsp;
-				<input type="submit" id="logoff" value="Logoff" disabled=1 onClick="doLogoff()" class="input"></td></tr>
+				<tr><td align='center' colspan='2'>
+							<input type="submit" id="login" value="Login" disabled=1 onClick="doLogin()" class="input">
+							&nbsp;&nbsp;&nbsp;&nbsp;
+							<input type="submit" id="logoff" value="Logoff" disabled=1 onClick="doLogoff()" class="input">
+
+
+
+
+
+
+
+
+							<div style="display:none">
+									<TABLE cellpadding=2 cellspacing=1 border=0 bgcolor="#D7D7D7" width=400>
+									<TR><TD bgcolor="#F3F5F6" height="25"><font face="arial" size="2" color="#727986"><B>&nbsp;&nbsp;&nbsp;Welcome to Asterisk GUI</B></font></TD></TR>
+									<TR><TD bgcolor="#FFFFFF">
+												<div ><font face="arial" size="2" color="#727986">Welcome to Asterisk Configuration GUI - You can do blah blah blah using this tool. If you need help or further explanation about anything, just move your mouse on to the field and a brief description about the item will be displayed in the tooltip area.</font>
+												</div>
+												</TD>
+									</TR>
+									</TABLE>
+							</div>
+
+
+						</td>
+				</tr>
 			</table>
 		</td>
 	</tr>



More information about the asterisk-gui-commits mailing list