pari: branch asterisknow r1051 - in /branches/asterisknow: ./ config/

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed Jun 6 11:02:25 MST 2007


Author: pari
Date: Wed Jun  6 13:02:24 2007
New Revision: 1051

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1051
Log:
Merged revisions 1044-1049 via svnmerge from 
https://origsvn.digium.com/svn/asterisk-gui/trunk

........
r1044 | pari | 2007-06-06 07:00:07 -0500 (Wed, 06 Jun 2007) | 1 line

updating todo
........
r1045 | pari | 2007-06-06 09:48:59 -0500 (Wed, 06 Jun 2007) | 1 line

Fix for 9870: http://bugs.digium.com/view.php?id=9870
........
r1046 | pari | 2007-06-06 10:31:22 -0500 (Wed, 06 Jun 2007) | 1 line

updating todo
........
r1047 | pari | 2007-06-06 10:58:02 -0500 (Wed, 06 Jun 2007) | 1 line

nat, canreinvite options for users
........
r1048 | pari | 2007-06-06 11:24:00 -0500 (Wed, 06 Jun 2007) | 1 line

dtmfmode in users
........
r1049 | pari | 2007-06-06 12:59:02 -0500 (Wed, 06 Jun 2007) | 1 line

Codec settings in Users
........

Modified:
    branches/asterisknow/   (props changed)
    branches/asterisknow/config/home.html
    branches/asterisknow/config/users.html
    branches/asterisknow/todo.txt

Propchange: branches/asterisknow/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jun  6 13:02:24 2007
@@ -1,1 +1,1 @@
-/trunk:1-449,489-540,542-557,559,561-577,580-586,588-1034
+/trunk:1-449,489-540,542-557,559,561-577,580-586,588-1050

Modified: branches/asterisknow/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/home.html?view=diff&rev=1051&r1=1050&r2=1051
==============================================================================
--- branches/asterisknow/config/home.html (original)
+++ branches/asterisknow/config/home.html Wed Jun  6 13:02:24 2007
@@ -131,7 +131,7 @@
 	}
 	parent.document.getElementById('login_name').value = _$('username').value ;
 	_$('statusbar').innerHTML = "<i>Logging in...</i>";
-	parent.astmanEngine.sendRequest('action=login&username=' + _$('username').value + "&secret=" + _$('secret').value, afterlogin);
+	parent.astmanEngine.sendRequest('action=login&username=' + encodeURIComponent( _$('username').value ) + "&secret=" + encodeURIComponent(_$('secret').value), afterlogin);
 }
 
 afterlogin = function(msgs) {

Modified: branches/asterisknow/config/users.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/users.html?view=diff&rev=1051&r1=1050&r2=1051
==============================================================================
--- branches/asterisknow/config/users.html (original)
+++ branches/asterisknow/config/users.html Wed Jun  6 13:02:24 2007
@@ -28,7 +28,7 @@
 var widgets = new Object;
 var callbacks = new Object;
 var extencallbacks = new Object;
-var fieldnames = ['callwaiting' ,'cancel' ,'cid_number' ,'context' ,'delete' ,'email' ,'fullname' ,'group' ,'hasagent' ,'hasdirectory' ,'hasiax' ,'hasmanager' ,'hassip' ,'hasvoicemail' ,'host' ,'mailbox' ,'name' ,'new' ,'save' ,'secret' ,'threewaycalling' ,'vmsecret' ,'zapchan', 'registeriax', 'registersip'];
+var fieldnames = ['callwaiting' ,'cancel' ,'cid_number' ,'context' ,'delete' ,'email' ,'fullname' ,'group' ,'hasagent' ,'hasdirectory' ,'hasiax' ,'hasmanager' ,'hassip' ,'hasvoicemail' ,'host' ,'mailbox' ,'name' ,'new' ,'save' ,'secret' ,'threewaycalling' ,'vmsecret' ,'zapchan', 'registeriax', 'registersip','canreinvite','nat','dtmfmode', 'disallow','allow'];
 
 var localextenlength = 4;
 var allow_aliasextns = "no";
@@ -186,7 +186,8 @@
 }
 
 callbacks.postselect = function(box, val) {
-	parent._$('tooltip').innerHTML = parent.tooltip_default ; 
+	parent._$('tooltip').innerHTML = parent.tooltip_default ;
+	_$('codecs_text').innerHTML = '' ; 
 	if( box.selectedIndex == -1)
 		return true;
 	if(val == "reserved" ){
@@ -215,6 +216,7 @@
 			return true;
 		}
 	}
+	_$('codecs_text').innerHTML = 'disallow: '+ _$('disallow').value + ' <BR> allow:' + _$('allow').value ;
 }
 
 callbacks.savechanges = function(){
@@ -292,6 +294,143 @@
 		purge( document.body );
 	} catch(e){ }
 }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+CODECSETTINGS = {
+	selectbox_add: function(selectbox_id, codec){
+		switch(codec) {
+			case 'ulaw': ASTGUI.selectbox.append(selectbox_id,"u-law", "ulaw"); break;
+			case 'alaw': ASTGUI.selectbox.append(selectbox_id,"a-law", "alaw"); break;
+			case 'gsm': ASTGUI.selectbox.append(selectbox_id,"GSM", "gsm"); break;
+			case 'ilbc': ASTGUI.selectbox.append(selectbox_id,"ILBC", "ilbc"); break;
+			case 'speex': ASTGUI.selectbox.append(selectbox_id,"SPEEX", "speex"); break;
+			case 'g726': ASTGUI.selectbox.append(selectbox_id,"G.726", "g726"); break;
+			case 'adpcm': ASTGUI.selectbox.append(selectbox_id,"ADPCM", "adpcm"); break;
+			case 'lpc10': ASTGUI.selectbox.append(selectbox_id,"LPC10", "lpc10"); break;
+			case 'g729': ASTGUI.selectbox.append(selectbox_id,"G.729", "g729"); break;
+			default: break
+		}
+	},
+	selectbox_remove: function(selectbox_id,codec){
+		for (var x=0; x < $(selectbox_id).length; x++){
+			if( $(selectbox_id).options[x].value==codec ){	$(selectbox_id).remove(x); return true;}
+		}
+	},
+
+	update_div_setordercodecs:function(){
+		_$('disallowed').innerHTML=""; _$('allowed').innerHTML="";
+		if( _$('disallow').value == "all" ){
+			this.selectbox_add(_$("disallowed"), "ulaw");
+			this.selectbox_add(_$("disallowed"), "alaw");
+			this.selectbox_add(_$("disallowed"), "gsm");
+			this.selectbox_add(_$("disallowed"), "ilbc");
+			this.selectbox_add(_$("disallowed"), "speex");
+			this.selectbox_add(_$("disallowed"), "g726");
+			this.selectbox_add(_$("disallowed"), "adpcm");
+			this.selectbox_add(_$("disallowed"), "lpc10");
+			this.selectbox_add(_$("disallowed"), "g729");
+		}else{
+			var tmp = _$('disallow').value.split(",");
+			for(var x=0; x < tmp.length; x++){ this.selectbox_add(_$("disallowed"), tmp[x]); }
+		}
+		if(_$('allow').value =="all"){
+			this.selectbox_add(_$("allowed"), "ulaw");
+			this.selectbox_add(_$("allowed"), "alaw");
+			this.selectbox_add(_$("allowed"), "gsm");
+			this.selectbox_add(_$("allowed"), "ilbc");
+			this.selectbox_add(_$("allowed"), "speex");
+			this.selectbox_add(_$("allowed"), "g726");
+			this.selectbox_add(_$("allowed"), "adpcm");
+			this.selectbox_add(_$("allowed"), "lpc10");
+			this.selectbox_add(_$("allowed"), "g729");
+		}else{
+			var tmp = _$('allow').value.split(",");
+			for(var x=0; x < tmp.length; x++){
+				this.selectbox_add(_$("allowed"), tmp[x]);
+				this.selectbox_remove("disallowed",tmp[x]);
+			}
+		}
+	},
+
+	show_codecs: function(){
+		if( _$('devices').selectedIndex == -1 ){ return true; }
+		this.update_div_setordercodecs();
+		_$('codecs_content').style.display = "";
+		_$('bg_transparent').style.display ='';
+	},
+
+	enable_selectedcodec: function(){
+		if(_$('disallowed').selectedIndex == -1 ){return true;}
+		// add to allowed
+		this.selectbox_add(_$("allowed") ,  _$('disallowed').value );
+		// remove selected from disallowed
+		this.selectbox_remove("disallowed", _$('disallowed').value );
+		this.update_ordercodecs();
+	},
+
+	disable_selectedcodec: function(){
+		if(_$('allowed').selectedIndex == -1 ){return true;}
+		// add to disallowed
+		this.selectbox_add(_$("disallowed") ,  _$('allowed').value );
+		// remove selected from allowed
+		this.selectbox_remove("allowed", _$('allowed').value );
+		this.update_ordercodecs();
+	},
+
+	update_ordercodecs: function(){
+		var _allow = _$('allow') ;
+		var _allowed = _$('allowed') ;
+		var _disallow = _$('disallow');
+		var _disallowed = _$('disallowed');
+	
+		_disallow.value = "all";
+		_allow.value = "";
+
+		for (var x=0; x < _allowed.length ; x++){
+			if(x==0){
+				_allow.value = _allowed.options[x].value ; 
+			}else{
+				_allow.value = _allow.value + "," +  _allowed.options[x].value ; 
+			}
+		}
+		_$('save').disabled = false;
+		_$('cancel').disabled = false;
+
+		_$('codecs_text').innerHTML = 'disallow: '+ _disallow.value + ' <BR> allow:' + _allow.value ;
+	},
+	
+	disallow_all_refresh: function (){
+		_$('disallow').value = "all";
+		_$('disallowed').innerHTML=""; 	_$('allowed').innerHTML="";
+		_$('allow').value = "";
+		this.update_div_setordercodecs();
+		_$('disallow').value = "all";
+		_$('codecs_text').innerHTML = 'disallow: '+ _$('disallow').value + ' <BR> allow:' + _$('allow').value ;
+		_$('save').disabled = false;
+		_$('cancel').disabled = false;
+
+	},
+
+	codecs_hide: function (){
+		_$('codecs_content').style.display = 'none';
+		_$('bg_transparent').style.display ='none';
+	}
+}
+
+
 </script>
 <body id="foo" onload="localajaxinit()"  bgcolor="#EFEFEF" onunload="free_mem()">
 <div class="mainscreenTitleBar">
@@ -325,48 +464,62 @@
 			</td>
 			</tr>
 			<tr><td align="center">
-				<BR>
-				<fieldset style="width: 225px; ">
+				<fieldset style="width:280px">
 					<legend>&nbsp;Extension Options:&nbsp;</legend>
-				<table align='center'  width='220'  cellpadding=1 cellspacing=1>
+				<table align='center' width=270 cellpadding=1 cellspacing=1>
 				<tr>
 					<td width=40 align=right><input type='checkbox' id='hasvoicemail'></td>
 					<td class="field_text" tip="en,users,8">Voicemail</td>
-				</tr>
-				<tr>
+
 					<td align=right><input type='checkbox' id='hasdirectory'></td>
 					<td class="field_text" tip="en,users,9">In Directory</td>
 				</tr>
 				<tr>
 					<td align=right><input type='checkbox' id='hassip'></td>
 					<td class="field_text" tip="en,users,10">SIP</td>
-				</tr>
-				<tr>
+
 					<td align=right><input type='checkbox' id='hasiax'></td>
 					<td class="field_text" tip="en,users,11">IAX</td>
 				</tr>
 				<tr>
 					<td align=right><input type='checkbox' id='hasmanager'></td>
 					<td class="field_text" tip="en,users,12">CTI</td>
-				</tr>
-				<tr>
-					<td align=right><input type='checkbox' id='callwaiting'></td>
-					<td class="field_text" tip="en,users,13">Call&nbsp;Waiting</td>
-				</tr>
-				<tr>
-					<td align=right><input type='checkbox' id='threewaycalling'></td>
-					<td class="field_text" tip="en,users,14">3-Way&nbsp;Calling</td>
-				</tr>
-				<tr>
+
 					<td align=right>
 						<input type='checkbox' id='hasagent' dfalt='1'>
 						<input type='hidden' dfalt='dynamic' id='host'>
 					</td>
 					<td class="field_text" tip="en,users,15">Is&nbsp;Agent</td>
 				</tr>
+				<tr>
+					<td align=right><input type='checkbox' id='callwaiting'></td>
+					<td class="field_text" tip="en,users,13">Call&nbsp;Waiting</td>
+
+					<td align=right><input type='checkbox' id='threewaycalling'></td>
+					<td class="field_text" tip="en,users,14">3-Way&nbsp;Calling</td>
+				</tr>
+				<tr>
+					<td align=right><input type='checkbox' id='canreinvite'></td>
+					<td class="field_text">Can Reinvite</td>
+
+					<td align=right><input type='checkbox' id='nat'></td>
+					<td class="field_text">NAT</td>
+				</tr>
+
+				<tr>
+					<td align=right colspan=3><input id="dtmfmode" size=10 class="input8" dfalt="rfc2833"></td>
+					<td class="field_text">DTMFMode</td>
+				</tr>
 				</table>
 				</fieldset>
 			</td>
+			</tr>
+			<tr>
+				<td onclick="CODECSETTINGS.show_codecs();" style="cursor: pointer"  class="field_text">
+					<div style="margin-left: 15px;"><I>Codecs</I>
+						<div style="margin-left: 15px;"><span id="codecs_text"></span></div>
+					</div>
+				</td>
 			</tr>
 			</table>
 			</div>
@@ -391,4 +544,42 @@
 	<input type="hidden" id="cust_country" name="cust_country">
 </form>
 </div>
+<!-- Codecs content DIV -->
+<div id="codecs_content" STYLE="display:none; position: absolute; left: 20; top: 125; width:350; height:245;  background-color:#F4EFE5;   border-width: 1px; border-color: #7E5538; border-style: solid;z-index:5">
+	<table width="100%" cellpadding=0 cellspacing=0 onmousedown="ASTGUI.startDrag(event , 'codecs_content');">
+	<TR bgcolor="#7E5538"  style="background-image:url('images/title_gradient.gif');">
+		<TD Height="20" align="center" style="cursor: move"><font style="color:#FFFFFF; font-size: 12px; font-weight:bold;">Codec Preferences</font></TD>
+		<TD Height="20" align="right" style="cursor: move"><A href="#" onclick="CODECSETTINGS.codecs_hide();"><font style="color:#FFFFFF; font-size: 12px; font-weight:bold;">X</font></A></TD>
+		<TD width=4></TD>
+	</TR>
+	</table>
+	<table align=center>
+		<tr><td><BR></td></tr>
+		<tr><td class="field_text">Allowed</td>
+			<td></td>
+			<td class="field_text">Disallowed</td>
+		</tr>
+		<tr><td><select id="allowed" size=9 class="input8"></select></td>
+			<td>	<input type="button" id="select_codec" value="<" onclick="CODECSETTINGS.enable_selectedcodec()"><BR>
+				<input type="button" id="deselect_codec" value=">" onclick="CODECSETTINGS.disable_selectedcodec()"><BR>
+				<input type="button" value="&#187;&#187;" onclick="CODECSETTINGS.disallow_all_refresh();">
+
+			</td>
+
+			<td><select id="disallowed" size=9 class="input8"></select></td>
+		</tr>
+		<tr><td></td>
+			<td></td>
+			<td class="field_text">
+				<input id='allow' style="display:none">
+				<input id='disallow'  style="display:none">
+			</td>
+		</tr>
+		<tr><td colspan=3 align=Center><input type="button" class="buttonbold" id="setordercodecs" value="Ok" onclick="CODECSETTINGS.codecs_hide()"></td></tr>
+		<tr><td><BR></td></tr>
+	</table>
+</div>
+<!-- Codecs content DIV -->
+<div id="bg_transparent" STYLE="display:none; position: absolute; left: 0; top: 24; width:100%; height:100%;  background-color:#EFEFEF; -moz-opacity:.50;opacity:.50; border-width: 1px; border-color: #EFEFEF; border-style: solid; z-index:4">
+</div>
 </body>

Modified: branches/asterisknow/todo.txt
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/todo.txt?view=diff&rev=1051&r1=1050&r2=1051
==============================================================================
--- branches/asterisknow/todo.txt (original)
+++ branches/asterisknow/todo.txt Wed Jun  6 13:02:24 2007
@@ -26,6 +26,11 @@
 
 *  it would be very usefull, to define the max time a client can be in the queue.. so we can put a voice telling "Please leva a meesage we will cal you back" in a vm..   or something like that :) -- killfill on irc
 
+* Finish multiple language support (lang.js) 
+
+* All system path variables should be able to edit via GUI.
+
+
 Completed
 ----------
 * Operator Extension



More information about the asterisk-gui-commits mailing list