pari: trunk r4 - in /trunk: branches/ tags/ trunk/ trunk/config/ trunk/config...

asterisk-gui-commits at lists.digium.internal asterisk-gui-commits at lists.digium.internal
Fri Sep 1 14:59:22 CDT 2006


Author: pari
Date: Fri Sep  1 14:59:22 2006
New Revision: 4

URL: http://svn.digium.com/view/asterisk-gui?rev=4&view=rev
Log:
First Import by Pari

Added:
    trunk/branches/
    trunk/tags/
    trunk/trunk/
    trunk/trunk/ajamdemo.html
    trunk/trunk/astman.css
    trunk/trunk/astman.js
    trunk/trunk/config/
    trunk/trunk/config/extensions.html   (with props)
    trunk/trunk/config/home.html   (with props)
    trunk/trunk/config/images/
    trunk/trunk/config/images/abe.png   (with props)
    trunk/trunk/config/images/accordion-icon.gif   (with props)
    trunk/trunk/config/images/adv-v.png   (with props)
    trunk/trunk/config/images/adv.png   (with props)
    trunk/trunk/config/images/digium.gif   (with props)
    trunk/trunk/config/images/digium_logo.gif   (with props)
    trunk/trunk/config/images/digiumlogo.gif   (with props)
    trunk/trunk/config/images/dots.gif   (with props)
    trunk/trunk/config/images/dundi.png   (with props)
    trunk/trunk/config/images/home-icon.png   (with props)
    trunk/trunk/config/images/home.png   (with props)
    trunk/trunk/config/images/nufone.gif   (with props)
    trunk/trunk/config/images/panel.png   (with props)
    trunk/trunk/config/images/slice-v.png   (with props)
    trunk/trunk/config/images/slice.png   (with props)
    trunk/trunk/config/images/split-v.png   (with props)
    trunk/trunk/config/images/split.png   (with props)
    trunk/trunk/config/images/voicepulse.gif   (with props)
    trunk/trunk/config/images/vonage.gif   (with props)
    trunk/trunk/config/meetme.html   (with props)
    trunk/trunk/config/menus.html   (with props)
    trunk/trunk/config/numberplan.html   (with props)
    trunk/trunk/config/old/
    trunk/trunk/config/old/extensions.html   (with props)
    trunk/trunk/config/old/schwing-orig.html   (with props)
    trunk/trunk/config/old/sip.html   (with props)
    trunk/trunk/config/old/special.html   (with props)
    trunk/trunk/config/old/trunks-experiment.html   (with props)
    trunk/trunk/config/old/users-prechange.html   (with props)
    trunk/trunk/config/queues.html   (with props)
    trunk/trunk/config/schwing.html   (with props)
    trunk/trunk/config/scripts/
    trunk/trunk/config/scripts/astman.js   (with props)
    trunk/trunk/config/scripts/prototype.js   (with props)
    trunk/trunk/config/scripts/rico.js   (with props)
    trunk/trunk/config/stylesheets/
    trunk/trunk/config/stylesheets/astman.css   (with props)
    trunk/trunk/config/stylesheets/rico.css   (with props)
    trunk/trunk/config/stylesheets/ricoTests.css   (with props)
    trunk/trunk/config/stylesheets/schwing.css   (with props)
    trunk/trunk/config/trunks.html   (with props)
    trunk/trunk/config/users.html   (with props)
    trunk/trunk/config/voicemail.html   (with props)
    trunk/trunk/prototype.js

Added: trunk/trunk/ajamdemo.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/ajamdemo.html?rev=4&view=auto
==============================================================================
--- trunk/trunk/ajamdemo.html (added)
+++ trunk/trunk/ajamdemo.html Fri Sep  1 14:59:22 2006
@@ -1,0 +1,219 @@
+<script src="prototype.js"></script>
+<script src="astman.js"></script>
+<link href="astman.css" media="all" rel="Stylesheet" type="text/css" />
+
+<script>
+	var logins = new Object;
+	var logoffs = new Object;
+	var channels = new Object;
+	var pongs = new Object;
+	var loggedon = -1;
+	var selectedchan = null;
+	var hungupchan = "";
+	var transferedchan = "";
+	
+	var demo = new Object;
+	
+	function loggedOn() {
+		if (loggedon == 1)
+			return;
+		loggedon = 1;
+		updateButtons();
+		$('statusbar').innerHTML = "<i>Retrieving channel status...</i>";
+		astmanEngine.pollEvents();
+		astmanEngine.sendRequest('action=status', demo.channels);
+	}
+	
+	function clearChannelList() {
+		$('channellist').innerHTML = "<i class='light'>Not connected</i>";
+	}
+
+	function loggedOff() {
+		if (loggedon == 0)
+			return;
+		loggedon = 0;
+		selectedchan = null;
+		updateButtons();
+		astmanEngine.channelClear();
+	 	clearChannelList();
+	}
+	
+	function updateButtons()
+	{
+		if ($(selectedchan)) {
+			$('transfer').disabled = 0;
+			$('hangup').disabled = 0;
+		} else {
+			$('transfer').disabled = 1;
+			$('hangup').disabled = 1;
+			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;
+		}
+	}
+	
+	demo.channelCallback = function(target) {
+		selectedchan = target;
+		updateButtons();
+	}
+	
+	demo.channels = function(msgs) {
+		resp = msgs[0].headers['response'];
+		if (resp == "Success") {
+			loggedOn();
+		} else
+			loggedOff();
+
+		for (i=1;i<msgs.length - 1;i++) 
+			astmanEngine.channelUpdate(msgs[i]);
+		$('channellist').innerHTML = astmanEngine.channelTable(demo.channelCallback);
+		$('statusbar').innerHTML = "Ready";
+	}
+
+	demo.logins = function(msgs) {
+		$('statusbar').innerHTML = msgs[0].headers['message'];
+		resp = msgs[0].headers['response'];
+		if (resp == "Success")
+			loggedOn();
+		else
+			loggedOff();
+	};
+	
+	
+	demo.logoffs = function(msgs) {
+		$('statusbar').innerHTML = msgs[0].headers['message'];
+		loggedOff();
+	};
+
+	demo.hungup = function(msgs) {
+		$('statusbar').innerHTML = "Hungup " + hungupchan;
+	}
+	
+	demo.transferred = function(msgs) {
+		$('statusbar').innerHTML = "Transferred " + transferredchan;
+	}
+
+	function doHangup() {
+		hungupchan = selectedchan;
+		astmanEngine.sendRequest('action=hangup&channel=' + selectedchan, demo.hungup);
+	}
+
+	function doStatus() {
+		$('statusbar').innerHTML = "<i>Updating channel status...</i>";
+		astmanEngine.channelClear();
+		astmanEngine.sendRequest('action=status', demo.channels);
+	}	
+		
+	function doLogin() {
+		$('statusbar').innerHTML = "<i>Logging in...</i>";
+		astmanEngine.sendRequest('action=login&username=' + $('username').value + "&secret=" + $('secret').value, demo.logins);
+	}
+	
+	function doTransfer() {
+		var channel = astmanEngine.channelInfo(selectedchan);
+		var exten = prompt("Enter new extension for " + selectedchan);
+		var altchan;
+		if (exten) {
+			if (channel.link) {
+				if (confirm("Transfer " + channel.link + " too?"))
+					altchan = channel.link;
+			}
+			if (altchan) {
+				transferredchan = selectedchan + " and " + altchan + " to " + exten;
+				astmanEngine.sendRequest('action=redirect&channel=' + selectedchan + "&priority=1&extrachannel=" + altchan + "&exten=" + exten, demo.transferred);
+			} else {
+				transferredchan = selectedchan + " to " + exten;
+				astmanEngine.sendRequest('action=redirect&channel=' + selectedchan + "&priority=1&exten=" + exten, demo.transferred);
+			}
+		}
+	}
+	
+	function doLogoff() {
+		$('statusbar').innerHTML = "<i>Logging off...</i>";
+		astmanEngine.sendRequest('action=logoff', demo.logoffs);
+	}
+	
+	demo.pongs  = function(msgs) {
+		resp = msgs[0].headers['response'];
+		if (resp == "Pong") {
+			$('statusbar').innerHTML = "<i>Already connected...</i>";
+			loggedOn();
+		} else {
+			$('statusbar').innerHTML = "<i>Please login...</i>";
+			loggedOff();
+		}
+	}
+	
+	demo.eventcb = function(msgs) {
+		var x;
+		if (loggedon) {
+			for (i=1;i<msgs.length - 1;i++) {
+				astmanEngine.channelUpdate(msgs[i]);
+			}
+			$('channellist').innerHTML = astmanEngine.channelTable(demo.channelCallback);
+			astmanEngine.pollEvents();
+		}
+		updateButtons();
+	}
+	
+	function localajaminit() {
+		astmanEngine.setURL('../rawman');
+		astmanEngine.setEventCallback(demo.eventcb);
+		//astmanEngine.setDebug($('ditto'));
+		clearChannelList();
+		astmanEngine.sendRequest('action=ping', demo.pongs);
+	}
+</script>
+
+<title>Asterisk&trade; AJAM Demo</title>
+<body onload="localajaminit()">
+<table align="center" width=600>
+<tr valign="top"><td>
+<table align="left">
+<tr><td colspan="2"><h2>Asterisk&trade; AJAM Demo</h2></td>
+<tr><td>Username:</td><td><input id="username"></td></tr>
+<tr><td>Secret:</td><td><input type="password" id="secret"></td></tr>
+	<tr><td colspan=2 align="center">
+	  <div id="statusbar">
+		<span style="margin-left: 4px;font-weight:bold">&nbsp;</span>
+	  </div>
+	</td></tr>
+
+	<tr><td><input type="submit" id="login" value="Login" onClick="doLogin()"></td>
+	<td><input type="submit" id="logoff" value="Logoff" disabled=1 onClick="doLogoff()"></td></tr>
+</table>
+</td><td valign='bottom'>
+<table>
+<div style="margin-left:10;margin-right:50;margin-top:10;margin-bottom:20">
+<i>This is a demo of the Asynchronous Javascript Asterisk Manager interface.  You can login with a
+valid, appropriately permissioned manager username and secret.</i>
+</div>
+<tr>
+	<td><input type="submit" onClick="doStatus()" id="refresh" value="Refresh"></td>
+	<td><input type="submit" onClick="doTransfer()" id="transfer" value="Transfer..."></td>
+	<td><input type="submit" onClick="doHangup()" id="hangup" value="Hangup"></td>
+</tr>
+</table>
+</td></tr>
+<tr><td colspan=2>
+		<div id="channellist" class="chanlist">
+		</div>
+	</td></tr>
+<tr><td align="center" colspan=2>
+	<font size=-1><i>
+		Copyright (C) 2006 Digium, Inc.  Asterisk and Digium are trademarks of Digium, Inc.
+	</i></font>
+</td></tr>
+</table>
+</body>

Added: trunk/trunk/astman.css
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/astman.css?rev=4&view=auto
==============================================================================
--- trunk/trunk/astman.css (added)
+++ trunk/trunk/astman.css Fri Sep  1 14:59:22 2006
@@ -1,0 +1,34 @@
+.chanlist {
+	border           : 1px solid #1f669b;
+	height			: 150px;
+	overflow		: auto;
+	background-color : #f1f1f1;
+	width			: 600;
+}
+
+.chantable {
+	border           : 0px;
+	background-color : #f1f1f1;
+	width			: 100%;
+}
+
+.labels {
+	background-color : #000000;
+	color : #ffffff;
+}
+
+.chanlisteven {
+	background-color : #fff8e4;
+}
+
+.chanlistodd {
+	background-color : #f0f5ff;
+}	
+
+.chanlistselected {
+	background-color : #ffb13d;
+}
+
+.light {
+	color : #717171;
+}

Added: trunk/trunk/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/astman.js?rev=4&view=auto
==============================================================================
--- trunk/trunk/astman.js (added)
+++ trunk/trunk/astman.js Fri Sep  1 14:59:22 2006
@@ -1,0 +1,262 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Javascript routines or accessing manager routines over HTTP.
+ *
+ * Copyright (C) 1999 - 2006, Digium, Inc.
+ *
+ * Mark Spencer <markster at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ *
+ */
+
+
+function Astman() {
+	var me = this;
+	var channels = new Array;
+	var lastselect;
+	var selecttarget;
+	this.setURL = function(url) {
+		this.url = url;
+	};
+	this.setEventCallback = function(callback) {
+		this.eventcallback = callback;
+	};
+	this.setDebug = function(debug) {
+		this.debug = debug;
+	};
+	this.clickChannel = function(ev) {
+		var target = ev.target;
+		// XXX This is icky, we statically use astmanEngine to call the callback XXX 
+		if (me.selecttarget)
+			me.restoreTarget(me.selecttarget);
+		while(!target.id || !target.id.length)
+			target=target.parentNode;
+		me.selecttarget = target.id;
+		target.className = "chanlistselected";
+		me.chancallback(target.id);
+	};
+	this.restoreTarget = function(targetname) {
+		var other;
+		target = $(targetname);
+		if (!target)
+			return;
+		if (target.previousSibling) {
+			other = target.previousSibling.previousSibling.className;
+		} else if (target.nextSibling) {
+			other = target.nextSibling.nextSibling.className;
+		}
+		if (other) {
+			if (other == "chanlisteven") 
+				target.className = "chanlistodd";
+			else
+				target.className = "chanlisteven";
+		} else
+				target.className = "chanlistodd";
+	};
+	this.channelUpdate = function(msg, channame) {
+		var fields = new Array("callerid", "calleridname", "context", "extension", "priority", "account", "state", "link", "uniqueid" );
+
+		if (!channame || !channame.length)
+			channame = msg.headers['channel'];
+
+		if (!channels[channame])
+			channels[channame] = new Array();
+			
+		if (msg.headers.event) {
+			if (msg.headers.event == "Hangup") {
+				delete channels[channame];
+			} else if (msg.headers.event == "Link") {
+				var chan1 = msg.headers.channel1;
+				var chan2 = msg.headers.channel2;
+				if (chan1 && channels[chan1])
+					channels[chan1].link = chan2;
+				if (chan2 && channels[chan2])
+					channels[chan2].link = chan1;
+			} else if (msg.headers.event == "Unlink") {
+				var chan1 = msg.headers.channel1;
+				var chan2 = msg.headers.channel2;
+				if (chan1 && channels[chan1])
+					delete channels[chan1].link;
+				if (chan2 && channels[chan2])
+					delete channels[chan2].link;
+			} else if (msg.headers.event == "Rename") {
+				var oldname = msg.headers.oldname;
+				var newname = msg.headers.newname;
+				if (oldname && channels[oldname]) {
+					channels[newname] = channels[oldname];
+					delete channels[oldname];
+				}
+			} else {
+				channels[channame]['channel'] = channame;
+				for (x=0;x<fields.length;x++) {
+					if (msg.headers[fields[x]])
+						channels[channame][fields[x]] = msg.headers[fields[x]];
+				}
+			}
+		} else {
+			channels[channame]['channel'] = channame;
+			for (x=0;x<fields.length;x++) {
+				if (msg.headers[fields[x]])
+					channels[channame][fields[x]] = msg.headers[fields[x]];
+			}
+		}
+	};
+	this.channelClear = function() {
+		channels = new Array;
+	}
+	this.channelInfo = function(channame) {
+		return channels[channame];
+	};
+	this.channelTable = function(callback) {
+		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;
+		s = "<table class='chantable' align='center'>\n";
+		s = s + "\t<tr class='labels' id='labels'><td>Channel</td><td>State</td><td>Caller</td><td>Location</td><td>Link</td></tr>";
+		count=0;
+		for (x in channels) {
+			if (channels[x].channel) {
+				if (count % 2)
+					cclass = "chanlistodd";
+				else
+					cclass = "chanlisteven";
+				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>";
+				if (channels[x].state)
+					s = s + "<td>" + channels[x].state + "</td>";
+				else
+					s = s + "<td><i class='light'>unknown</i></td>";
+				if (channels[x].calleridname && channels[x].callerid && channels[x].calleridname != "<unknown>") {
+					cid = channels[x].calleridname.escapeHTML() + " &lt;" + channels[x].callerid.escapeHTML() + "&gt;";
+				} else if (channels[x].calleridname && (channels[x].calleridname != "<unknown>")) {
+					cid = channels[x].calleridname.escapeHTML();
+				} else if (channels[x].callerid) {
+					cid = channels[x].callerid.escapeHTML();
+				} else {
+					cid = "<i class='light'>Unknown</i>";
+				}
+				s = s + "<td>" + cid + "</td>";
+				if (channels[x].extension) {
+					s = s + "<td>" + channels[x].extension + "@" + channels[x].context + ":" + channels[x].priority + "</td>";
+				} else {
+					s = s + "<td><i class='light'>None</i></td>";
+				}
+				if (channels[x].link) {
+					s = s + "<td>" + channels[x].link + "</td>";
+				} else {
+					s = s + "<td><i class='light'>None</i></td>";
+				}
+				s = s + "</tr>\n";
+				found++;
+			}
+		}
+		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) {
+		var msgs = new Array();
+		var inmsg = 0;
+		var msgnum = 0;
+		var x,y;
+		var s = t.responseText;
+		var allheaders = s.split('\r\n');
+		if (me.debug) 
+			me.debug.value = "\n";
+		for (x=0;x<allheaders.length;x++) {
+			if (allheaders[x].length) {
+				var fields = allheaders[x].split(': ');
+				if (!inmsg) {
+					msgs[msgnum] = new Object();
+					msgs[msgnum].headers = new Array();
+					msgs[msgnum].names = new Array();
+					y=0;
+				}
+				msgs[msgnum].headers[fields[0].toLowerCase()] = fields[1];
+				msgs[msgnum].names[y++] = fields[0].toLowerCase();
+				if (me.debug)
+					me.debug.value = me.debug.value + "field " + fields[0] + "/" + fields[1] + "\n";
+				inmsg=1;
+			} else {
+				if (inmsg) {
+					if (me.debug)
+						me.debug.value = me.debug.value + " new message\n";
+					inmsg = 0;
+					msgnum++;
+				}
+			}
+		}
+		if (me.debug) {
+			me.debug.value = me.debug.value + "msgnum is " + msgnum + " and array length is " + msgs.length + "\n";
+			me.debug.value = me.debug.value + "length is " + msgs.length + "\n";
+			var x, y;
+			for (x=0;x<msgs.length;x++) {
+				for (y=0;y<msgs[x].names.length;y++)  {
+					me.debug.value = me.debug.value + "msg "+ (x + 1) + "/" + msgs[x].names[y] + "/" + msgs[x].headers[msgs[x].names[y]] + "\n";
+				}
+			}
+		}
+		callback(msgs);
+	};
+	this.managerResponse = function(t) {
+		me.parseResponse(t, me.callback);
+	};
+	this.doEvents = function(msgs) {
+		me.eventcallback(msgs);
+	};
+	this.eventResponse = function(t) {
+		me.parseResponse(t, me.doEvents);
+	};
+	this.sendRequest = function(request, callback) {
+		var tmp;
+		var opt = {
+			method: 'get',
+			asynchronous: true,
+			onSuccess: this.managerResponse,
+			onFailure: function(t) {
+				alert("Error: " + t.status + ": " + t.statusText);
+			},
+		};
+		me.callback = callback;
+		opt.parameters = request;
+		tmp = new Ajax.Request(this.url, opt);
+	};
+	this.pollEvents = function() {
+		var tmp;
+		var opt = {
+			method: 'get',
+			asynchronous: true,
+			onSuccess: this.eventResponse,
+			onFailure: function(t) {
+				alert("Event Error: " + t.status + ": " + t.statusText);
+			},
+		};
+		opt.parameters="action=waitevent";
+		tmp = new Ajax.Request(this.url, opt);
+	};
+};
+
+astmanEngine = new Astman();

Added: trunk/trunk/config/extensions.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/extensions.html?rev=4&view=auto
==============================================================================
--- trunk/trunk/config/extensions.html (added)
+++ trunk/trunk/config/extensions.html Fri Sep  1 14:59:22 2006
@@ -1,0 +1,198 @@
+<!--
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Configuration for "MeetMe Extensions"
+ *
+ * Copyright (C) 1999 - 2006, Digium, Inc.
+ *
+ * Mark Spencer <markster at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ *
+-->
+
+<script src="scripts/prototype.js"></script>
+<script src="scripts/rico.js"></script>
+<script src="scripts/astman.js"></script>
+<script src="scripts/extensions.js"></script>
+<link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
+<link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
+
+<script>
+	var origwidth;
+	var widgets = new Array;
+	var adstatus;
+	var meetmes;
+	var callbacks = new Object;
+	var usercallbacks = new Object;
+	var fieldnames = new Array(
+				'delete', 'status', 'new', 'save', 'cancel');
+
+	function changed_extension() {
+		var app;
+		tmp = $('extensions').value.split(']');
+		app = findapp($('extensions').stored_config.catbyname[tmp[0]].subfields[tmp[1]]['app']);
+		$('name').value = $('extensions').stored_config.catbyname[tmp[0]].subfields[tmp[1]]['name'];
+		$('features').value = app.name.toLowerCase();
+	};
+
+	callbacks.format = function(t, x) {
+		return format_extension($('extensions'), t, x);
+	}
+	
+	callbacks.loaded = function() {
+		merge_users($('extensions'), $('hiddenusers'));
+		for (x=0;x<$('extensions').options.length;x++) {
+			var tmp;
+			tmp = $('extensions').options[x].value.split(']');
+			if (tmp.length > 1) {
+				if ($('extensions').stored_config.catbyname[tmp[0]].subfields[tmp[1]]['app'].toLowerCase() != "meetme") {
+					$('extensions').options[x].disabled = true;
+				}
+			}
+		}
+		$('extensions').contentEditable = 'true';
+		$('extensions').disabled = 0;
+		$('extensions').onchange = changed_extension;
+		parent.loadscreen(this);
+	}
+	callbacks.sortfunc = function(a,b) {
+		return (a.name < b.name) ? -1 : 1;
+	}
+	callbacks.newcategory = function() {
+		var tmp = null;
+		var x;
+		if ($('extensions').stored_config.catbyname['general'])
+			tmp = objcopy($('extensions').stored_config.catbyname['general']);
+		if (tmp) {
+			x = tmp.fieldbyname['userbase'];
+			if (x) {
+				while($('extensions').stored_config.catbyname[x]) x++;
+				tmp.name = x;
+			}
+		}
+		return tmp;
+	}
+	callbacks.identifier = "extension";
+	callbacks.eachline = true;
+	
+	usercallbacks.format = function(t) {
+		if ((t.name == 'general'))
+			return null;
+		if (t.fieldbyname['fullname'] && t.fieldbyname['fullname'].length) {
+			return t.name + " -- " + t.fieldbyname['fullname'];
+		} else
+			return t.name;
+	}
+	usercallbacks.loaded = function() {
+		parent.astmanEngine.config2list("extensions.conf", $('extensions'), widgets, callbacks);
+	}
+
+	function togglefeatures() {
+		if (adstatus == "shown") {
+			adstatus = "hidden";
+			new Rico.Effect.Size('advancedw', null, 1, 120, 8, {complete:function() { $('advancedw').style.height=1;} } );
+		} else {
+			adstatus = "shown";
+			$('advancedw').style.visibility = "visible";
+			new Rico.Effect.Size('advancedw', null, 120, 120, 8 );
+		}
+	}
+	function localajaxinit() {
+		$('advancedw').style.overflow = "hidden";
+		$('advancedw').style.height = 1;
+		$('advancedw').style.width = $('split').width;
+		$('advancedi').style.width = $('split').width - 60;
+		adstatus = "hidden";
+		$('extensions').contentEditable = 'false';
+		for (var x in fieldnames) {
+			widgets[fieldnames[x]] = $(fieldnames[x]);
+			widgets[fieldnames[x]].disabled = true;
+		}
+		parent.astmanEngine.config2list("users.conf", $('hiddenusers'), new Array(), usercallbacks);
+	}
+</script>
+
+
+<body id="foo" onload="localajaxinit()">
+
+<div class="mainscreenTitleBar">
+	<span style="margin-left: 4px;font-weight:bold">MeetMe Extension Configuration</span>
+</div>
+<div class="mainscreenContentBox" id="mailboxcontent">
+<table class="mainscreenTable" align="center">
+	<tr valign="top">
+		<td colspan='2'>
+		Extensions:
+		</td>
+	</tr>
+	<tr valign="top">
+		<td>
+		<select disabled size="28" id="extensions" style="width:220px">
+		<option>Loading...</option>
+		</select>
+		</td>
+		<td>
+		<div id='adjustments'>
+		<table cellspacing='0' cellpadding='0'>
+			<tr valign="top"><td>
+				<table>
+				<tr><td>Extension:</td><td><input size='5' id='name'></td></tr>
+				<tr><td>Feature:</td><td><select id='features'></select></td></tr>
+				<tr><td colspan='2'>
+					<div id='featurespecific' style='height:220;width:350'>
+					</div>
+				</td></tr>
+				<tr><td colspan='2' align='center'><div style="height:15px" id='status'></div></td></tr>
+				</table>
+			</td>
+			</tr>
+			<tr><td><img id="split" onClick="togglefeatures()" src="images/split-v.png"></td></tr>
+			<tr><td>
+				<div style="background-image:url(images/slice-v.png)" id='advancedw'>
+				<table id='advancedi' align='center'><tr><td>
+				<div align='center' id='advanced'>
+				</div>
+				</td></tr></table>
+				</div>
+			</td></tr>
+			<tr><td>
+				<img onClick="togglefeatures()" src="images/adv-v.png">
+			</td>
+			</tr>
+		</table>
+		</div>
+		</td>
+
+	</tr><tr>
+		<td align='center'>
+			<table>
+			<tr align='center'><td>
+			<input style='width:80' type='button' id='new' value='New'>
+			</td><td>
+			<input style='width:80' type='button' id='delete' value='Delete'>
+			</td></tr>
+			</table>
+		</td>
+		<td align='center' colspan='2'>
+				<input style='width:80' type='button' id='save' value='Save'>
+				&nbsp;
+				<input style='width:80' type='button' id='cancel' value='Cancel'>
+				&nbsp;
+		<div style='visibility:hidden;overflow:hidden;width:0px;height:0px'>
+			<select id='hiddenusers'>
+			</select>
+		</div>
+		</td>				
+	</tr>
+</table>
+</div>
+</body>

Propchange: trunk/trunk/config/extensions.html
------------------------------------------------------------------------------
    svn:executable = 

Added: trunk/trunk/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/home.html?rev=4&view=auto
==============================================================================
--- trunk/trunk/config/home.html (added)
+++ trunk/trunk/config/home.html Fri Sep  1 14:59:22 2006
@@ -1,0 +1,138 @@
+<!--
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Initial login screen
+ *
+ * Copyright (C) 1999 - 2006, Digium, Inc.
+ *
+ * Mark Spencer <markster at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ *
+-->
+
+<script src="scripts/prototype.js"></script>
+<link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
+<link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
+
+<script>
+	var demo = new Object;
+	var localloggedon = -1;
+	function updateButtons()
+	{
+		if (parent.loggedon) {
+			$('username').disabled = 1;
+			$('secret').disabled = 1;
+			$('logoff').disabled = 0;
+			$('login').disabled = 1;
+		} else {
+			$('username').disabled = 0;
+			$('secret').disabled = 0;
+			$('logoff').disabled = 1;
+			$('login').disabled = 0;
+		}
+	}
+	
+	function loggedOn() {
+		if ((parent.loggedon == 1) && (localloggedon == 1))
+			return;
+		parent.setLoggedOn(1);
+		localloggedon = 1;
+		updateButtons();
+		$('statusbar').innerHTML = "<i>Connected!</i>";
+		parent.astmanEngine.pollEvents();
+	}
+	
+	function loggedOff() {
+		if ((parent.loggedon == 0) && (localloggedon == 0))
+			return;
+		parent.setLoggedOn(0);
+		localloggedon = 0;
+		updateButtons();
+	}
+	
+	demo.logoffs = function(msgs) {
+		$('statusbar').innerHTML = msgs[0].headers['message'];
+		loggedOff();
+	};
+
+	demo.logins = function(msgs) {
+		$('statusbar').innerHTML = msgs[0].headers['message'];
+		resp = msgs[0].headers['response'];
+		if (resp == "Success")
+			loggedOn();
+		else
+			loggedOff();
+	};
+	
+	demo.pongs  = function(msgs) {
+		resp = msgs[0].headers['response'];
+		if (resp == "Pong") {
+			$('statusbar').innerHTML = "<i>Already connected...</i>";
+			loggedOn();
+		} else {
+			$('statusbar').innerHTML = "<i>Please login...</i>";
+			loggedOff();
+		}
+	}
+
+	function localajaxinit() {
+		parent.loadscreen(this);
+	}
+
+	function doLogin() {
+		$('statusbar').innerHTML = "<i>Logging in...</i>";
+		parent.astmanEngine.sendRequest('action=login&username=' + $('username').value + "&secret=" + $('secret').value, demo.logins);
+	}
+	
+	function doLogoff() {
+		$('statusbar').innerHTML = "<i>Logging off...</i>";
+		parent.astmanEngine.sendRequest('action=logoff', demo.logoffs);
+	}
+	function localajaminit() {	
+		parent.astmanEngine.sendRequest('action=ping', demo.pongs);
+	}
+	function localinit() {
+		localajaxinit();
+		localajaminit();
+	}
+
+</script>
+
+
+<body id="foo" onload="localinit()">
+
+<div class="mainscreenTitleBar">
+	<span style="margin-left: 4px;font-weight:bold">Welcome to the Asterisk Configuration Panel</span>
+</div>
+<div class="mainscreenContentBox" id="mailboxcontent">
+<table class="mainscreenTable" width="100%">
+	<tr valign="top">
+		<td colspan=2>
+			<table align="center">
+				<tr><td colspan="2"><h2>Asterisk&trade; Configuration Engine</h2></td>
+				<tr><td>Username:</td><td><input disabled=1 id="username" value="mark"></td></tr>
+				<tr><td>Secret:</td><td><input disabled=1 type="password" id="secret" value="secret"></td></tr>
+				<tr><td colspan=2 align="center">
+				  <div id="statusbar">
+					<span style="margin-left: 4px;font-weight:bold">&nbsp;</span>
+				  </div>
+				</td></tr>
+
+				<tr><td align='center' colspan='2'><input type="submit" id="login" value="Login" disabled=1 onClick="doLogin()">
+				&nbsp;&nbsp;&nbsp;&nbsp;
+				<input type="submit" id="logoff" value="Logoff" disabled=1 onClick="doLogoff()"></td></tr>
+			</table>
+		</td>
+	</tr>
+</table>
+</div>
+</body>

Propchange: trunk/trunk/config/home.html
------------------------------------------------------------------------------
    svn:executable = 

Added: trunk/trunk/config/images/abe.png
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/abe.png?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/abe.png
------------------------------------------------------------------------------
    svn:executable = 

Propchange: trunk/trunk/config/images/abe.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/trunk/config/images/accordion-icon.gif
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/accordion-icon.gif?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/accordion-icon.gif
------------------------------------------------------------------------------
    svn:executable = 

Propchange: trunk/trunk/config/images/accordion-icon.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/trunk/config/images/adv-v.png
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/adv-v.png?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/adv-v.png
------------------------------------------------------------------------------
    svn:executable = 

Propchange: trunk/trunk/config/images/adv-v.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/trunk/config/images/adv.png
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/adv.png?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/adv.png
------------------------------------------------------------------------------
    svn:executable = 

Propchange: trunk/trunk/config/images/adv.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/trunk/config/images/digium.gif
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/digium.gif?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/digium.gif
------------------------------------------------------------------------------
    svn:executable = 

Propchange: trunk/trunk/config/images/digium.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/trunk/config/images/digium_logo.gif
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/digium_logo.gif?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/digium_logo.gif
------------------------------------------------------------------------------
    svn:executable = 

Propchange: trunk/trunk/config/images/digium_logo.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/trunk/config/images/digiumlogo.gif
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/digiumlogo.gif?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/digiumlogo.gif
------------------------------------------------------------------------------
    svn:executable = 

Propchange: trunk/trunk/config/images/digiumlogo.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/trunk/config/images/dots.gif
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/dots.gif?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/dots.gif
------------------------------------------------------------------------------
    svn:executable = 

Propchange: trunk/trunk/config/images/dots.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/trunk/config/images/dundi.png
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/dundi.png?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/dundi.png
------------------------------------------------------------------------------
    svn:executable = 

Propchange: trunk/trunk/config/images/dundi.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/trunk/config/images/home-icon.png
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/home-icon.png?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/home-icon.png
------------------------------------------------------------------------------
    svn:executable = 

Propchange: trunk/trunk/config/images/home-icon.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/trunk/config/images/home.png
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/home.png?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/home.png
------------------------------------------------------------------------------
    svn:executable = 

Propchange: trunk/trunk/config/images/home.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/trunk/config/images/nufone.gif
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/nufone.gif?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/nufone.gif
------------------------------------------------------------------------------
    svn:executable = 

Propchange: trunk/trunk/config/images/nufone.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/trunk/config/images/panel.png
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/panel.png?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/panel.png
------------------------------------------------------------------------------
    svn:executable = 

Propchange: trunk/trunk/config/images/panel.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/trunk/config/images/slice-v.png
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/slice-v.png?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/slice-v.png
------------------------------------------------------------------------------
    svn:executable = 

Propchange: trunk/trunk/config/images/slice-v.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/trunk/config/images/slice.png
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/slice.png?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/slice.png
------------------------------------------------------------------------------
    svn:executable = 

Propchange: trunk/trunk/config/images/slice.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/trunk/config/images/split-v.png
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/split-v.png?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/split-v.png
------------------------------------------------------------------------------
    svn:executable = 

Propchange: trunk/trunk/config/images/split-v.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/trunk/config/images/split.png
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/split.png?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/split.png
------------------------------------------------------------------------------
    svn:executable = 

Propchange: trunk/trunk/config/images/split.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/trunk/config/images/voicepulse.gif
URL: http://svn.digium.com/view/asterisk-gui/trunk/trunk/config/images/voicepulse.gif?rev=4&view=auto
==============================================================================
Binary file - no diff available.

Propchange: trunk/trunk/config/images/voicepulse.gif
------------------------------------------------------------------------------
    svn:executable = 


[... 12327 lines stripped ...]


More information about the asterisk-gui-commits mailing list