pari: trunk r79 - in /trunk/config: ./ stylesheets/

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed Oct 18 12:23:55 MST 2006


Author: pari
Date: Wed Oct 18 14:23:52 2006
New Revision: 79

URL: http://svn.digium.com/view/asterisk-gui?rev=79&view=rev
Log:
Bug Fix - 'Active Channels > Transfer/hangup not working 

Modified:
    trunk/config/cfgbasic.html
    trunk/config/options.html
    trunk/config/status.html
    trunk/config/stylesheets/schwing.css
    trunk/config/users.html

Modified: trunk/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/cfgbasic.html?rev=79&r1=78&r2=79&view=diff
==============================================================================
--- trunk/config/cfgbasic.html (original)
+++ trunk/config/cfgbasic.html Wed Oct 18 14:23:52 2006
@@ -115,8 +115,8 @@
 			for (var i = 0; i < panels.length; i++) {
 				if (panels[i].name == 'home')
 					continue;
-				$(panels[i].name).onclick = false;
-				$(panels[i].name).onmouseover = false;
+				$(panels[i].name).onClick = false;
+				$(panels[i].name).onMouseOver = false;
 				$(panels[i].name).style.visibility = 'hidden';
 			}
 		}
@@ -139,7 +139,7 @@
 
 	function showmainscreen(page) {
 		if (started) {
-			$('mainscreen').innerHTML = "Loading active screen...";
+//			$('mainscreen').innerHTML = "Loading active screen...";
 			$('mainscreen').src = page.titleBar.id + ".html";
 		}
 	}

Modified: trunk/config/options.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/options.html?rev=79&r1=78&r2=79&view=diff
==============================================================================
--- trunk/config/options.html (original)
+++ trunk/config/options.html Wed Oct 18 14:23:52 2006
@@ -229,12 +229,12 @@
 	</tr>
 	<tr valign="top" height="18">	<td><B>GUI - access settings: </B></td></tr>
 	<tr>	<td align="center" valign="top" height=170>
-					<div id="channellist" class="chanlist">
-					<table>	<tr>	<td colspan=2 height=18></td></tr>
+					<div id="gui_accesssettings" class="chanlist">
+					<table>	<tr>	<td colspan=2 height=10></td></tr>
 									<tr  onmouseover="show_tooltip('en', 'options', 3);"><td>Bind Address:</td>		<td><input size=14 id='bindaddr' dfalt="127.0.0.1" onkeydown="$('save').disabled=false; $('cancel').disabled=false;"></td></tr>
 									<tr  onmouseover="show_tooltip('en', 'options', 4);"><td>Port:</td>						<td><input size=14 id='bindport' dfalt=80  onkeydown="$('save').disabled=false; $('cancel').disabled=false;"></td></tr>
 									<tr  onmouseover="show_tooltip('en', 'options', 5);"><td>HTTP Timeout:</td>	<td><input size=14 id='httptimeout'  onkeydown="$('save').disabled=false; $('cancel').disabled=false;"></td></tr>
-									<tr><td colspan=2><BR></td></tr>
+									<tr><td colspan=2 height=8> </td></tr>
 									<tr><td colspan=2 align=center><input type=button id=save value="Save"  onclick="update_guisettings_http()">&nbsp;<input type=button id=cancel value="Cancel" onclick="cancel_guisettings()"></td></tr>
 					</table>
 					<select  size="5" id="hiddenfield" style="display:none;"></select>

Modified: trunk/config/status.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/status.html?rev=79&r1=78&r2=79&view=diff
==============================================================================
--- trunk/config/status.html (original)
+++ trunk/config/status.html Wed Oct 18 14:23:52 2006
@@ -42,23 +42,24 @@
 		loggedon = 1;
 		updateButtons();
 		$('status').innerHTML = "<i>Retrieving channel status...</i>";
-		parent.astmanEngine.pollEvents();
-		parent.astmanEngine.sendRequest('action=status', activechannels.channels);
-	}
-	
+		astmanEngine.pollEvents();
+		astmanEngine.sendRequest('action=status', activechannels.channels);
+	}
+
 	function clearChannelList() {
 		$('channellist').innerHTML = "<i class='light'>Not connected</i>";
-			$('transfer').disabled = 1;
-			$('hangup').disabled = 1;
 	}
 
 	function loggedOff() {
+		if (loggedon == 0)
+			return;
 		loggedon = 0;
 		selectedchan = null;
-		parent.astmanEngine.channelClear();
+		updateButtons();
+		astmanEngine.channelClear();
 	 	clearChannelList();
 	}
-	
+
 	function updateButtons()
 	{
 		if ($(selectedchan)) {
@@ -72,12 +73,10 @@
 		if (loggedon) {
 			$('refresh').disabled = 0;
 		} else {
-			$('transfer').disabled = 1;
-			$('hangup').disabled = 1;
 			$('refresh').disabled = 1;
 		}
 	}
-	
+
 	activechannels.channelCallback = function(target) {
 		selectedchan = target;
 		updateButtons();
@@ -91,8 +90,8 @@
 			loggedOff();
 
 		for (i=1;i<msgs.length - 1;i++) 
-			parent.astmanEngine.channelUpdate(msgs[i]);
-		$('channellist').innerHTML = parent.astmanEngine.channelTable(activechannels.channelCallback);
+			astmanEngine.channelUpdate(msgs[i]);
+		$('channellist').innerHTML = astmanEngine.channelTable(activechannels.channelCallback);
 		$('status').innerHTML = "Ready";
 	}
 
@@ -121,22 +120,22 @@
 
 	function doHangup() {
 		hungupchan = selectedchan;
-		parent.astmanEngine.sendRequest('action=hangup&channel=' + selectedchan, activechannels.hungup);
+		astmanEngine.sendRequest('action=hangup&channel=' + selectedchan, activechannels.hungup);
 	}
 
 	function doStatus() {
 		$('status').innerHTML = "<i>Updating channel status...</i>";
-		parent.astmanEngine.channelClear();
-		parent.astmanEngine.sendRequest('action=status', activechannels.channels);
+		astmanEngine.channelClear();
+		astmanEngine.sendRequest('action=status', activechannels.channels);
 	}	
 		
 	function doLogin() {
 		$('status').innerHTML = "<i>Logging in...</i>";
-		parent.astmanEngine.sendRequest('action=login&username=' + $('username').value + "&secret=" + $('secret').value, activechannels.logins);
+		astmanEngine.sendRequest('action=login&username=' + $('username').value + "&secret=" + $('secret').value, activechannels.logins);
 	}
 	
 	function doTransfer() {
-		var channel = parent.astmanEngine.channelInfo(selectedchan);
+		var channel = astmanEngine.channelInfo(selectedchan);
 		var exten = prompt("Enter new extension for " + selectedchan);
 		var altchan;
 		if (exten) {
@@ -146,17 +145,17 @@
 			}
 			if (altchan) {
 				transferredchan = selectedchan + " and " + altchan + " to " + exten;
-				parent.astmanEngine.sendRequest('action=redirect&channel=' + selectedchan + "&priority=1&extrachannel=" + altchan + "&exten=" + exten, activechannels.transferred);
+				astmanEngine.sendRequest('action=redirect&channel=' + selectedchan + "&priority=1&extrachannel=" + altchan + "&exten=" + exten, activechannels.transferred);
 			} else {
 				transferredchan = selectedchan + " to " + exten;
-				parent.astmanEngine.sendRequest('action=redirect&channel=' + selectedchan + "&priority=1&exten=" + exten, activechannels.transferred);
+				astmanEngine.sendRequest('action=redirect&channel=' + selectedchan + "&priority=1&exten=" + exten, activechannels.transferred);
 			}
 		}
 	}
 	
 	function doLogoff() {
 		$('status').innerHTML = "<i>Logging off...</i>";
-		parent.astmanEngine.sendRequest('action=logoff', activechannels.logoffs);
+		astmanEngine.sendRequest('action=logoff', activechannels.logoffs);
 	}
 	
 	activechannels.pongs  = function(msgs) {
@@ -173,18 +172,19 @@
 		var x;
 		if (loggedon) {
 			for (i=1;i<msgs.length - 1;i++) {
-				parent.astmanEngine.channelUpdate(msgs[i]);
+				astmanEngine.channelUpdate(msgs[i]);
 			}
-			$('channellist').innerHTML = parent.astmanEngine.channelTable(activechannels.channelCallback);
-			parent.astmanEngine.pollEvents();
+			$('channellist').innerHTML = astmanEngine.channelTable(activechannels.channelCallback);
+			astmanEngine.pollEvents();
 		}
 		updateButtons();
 	}
 
 function localajaxinit(){
-		parent.astmanEngine.setEventCallback(activechannels.eventcb);
+		astmanEngine.setURL('../../rawman');
+		astmanEngine.setEventCallback(activechannels.eventcb);
 		clearChannelList();
-		parent.astmanEngine.sendRequest('action=ping', activechannels.pongs);
+		astmanEngine.sendRequest('action=ping', activechannels.pongs);
 		parent.loadscreen(this);
 }
 </script>

Modified: trunk/config/stylesheets/schwing.css
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/stylesheets/schwing.css?rev=79&r1=78&r2=79&view=diff
==============================================================================
--- trunk/config/stylesheets/schwing.css (original)
+++ trunk/config/stylesheets/schwing.css Wed Oct 18 14:23:52 2006
@@ -16,13 +16,13 @@
 }
 
 .mainscreenContentBox {
-   font-size        : 10px;
+   font-size        : 11px;
    border           : 0px;
    padding          : 0px 8px 0px 8px;
 }
 
 .mainscreenBorderBox {
-   font-size        : 10px;
+   font-size        : 11px;
    border           : 1px solid #1f669b;
    border-top-width : 0px;
    border-left-width : 0px;
@@ -40,7 +40,7 @@
 }
 
 .statusbar {
-   font-size        : 10px;
+   font-size        : 11px;
    border           : 1px solid #1f669b;
    padding          : 0px 8px 0px 8px;
    background-color : #ffff00;
@@ -78,6 +78,10 @@
 	background-color : #f0f5ff;
 }	
 
+.chanlistselected {
+	background-color : #ffb13d;
+}
+
 .light {
 	color : #717171;
 }

Modified: trunk/config/users.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/users.html?rev=79&r1=78&r2=79&view=diff
==============================================================================
--- trunk/config/users.html (original)
+++ trunk/config/users.html Wed Oct 18 14:23:52 2006
@@ -97,7 +97,14 @@
 		var noneopt = document.createElement("OPTION");
 		noneopt.value = "";
 		noneopt.innerHTML = "None";
-		$('zapchan').options.add(noneopt, 0);
+
+		try {
+			$('zapchan').options.add(noneopt, 0);
+		}
+		catch(err) {
+			$('zapchan').add(noneopt, 0);
+		}
+		
 		parent.astmanEngine.config2list("extensions.conf", $('context'), new Array(), numcallbacks);
 	}
 	



More information about the asterisk-gui-commits mailing list