⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jingle.html.svn-base

📁 asterisk-gui asterisk网关接口编程 控制asterisk的接口
💻 SVN-BASE
字号:
<!-- * Asterisk-GUI	-	an Asterisk configuration interface * * Configure accounts in jingle.conf * * Copyright (C) 2006-2007, Digium, Inc. * * Mark Spencer <markster@digium.com> * Pari Nannapaneni <pari@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/astman.js"></script><link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" /><script>var phonecallbacks = new Object;var widgets = {};var fieldnames = ['allow', 'cancel', 'connection', 'context', 'delete', 'disallow', 'name', 'new', 'save', 'username'];phonecallbacks.format = function(t) {	var tmp = t.name.split('general');	if(tmp.length>1) { return false; } else { return t.name; }}phonecallbacks.postselect = function(box, val) {	}phonecallbacks.loaded = function() {}function enable_selectedcodec(){	// add to allowed	selectbox_add("allowed" ,  $('disallowed').value );	// remove selected from disallowed	selectbox_remove("disallowed", $('disallowed').value );}function disable_selectedcodec(){	// add to disallowed	selectbox_add("disallowed" ,  $('allowed').value );	// remove selected from allowed	selectbox_remove("allowed", $('allowed').value );}function selectbox_add(selectbox_id, codec){	switch(codec) {		case 'ulaw':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="ulaw">u-law</option>'; break		case 'alaw':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="alaw">a-law</option>'; break		case 'gsm':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="gsm">GSM</option>'; break		case 'ilbc':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="ilbc">ILBC</option>'; break		case 'speex':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="speex">SPEEX</option>'; break		case 'g726':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="g726">G.726</option>'; break		case 'adpcm':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="adpcm">ADPCM</option>'; break		case 'lpc10':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="lpc10">LPC10</option>'; break		case 'g729':   $(selectbox_id).innerHTML = $(selectbox_id).innerHTML + '<option value="g729">G.729a</option>'; break		default: break	}}function 	selectbox_remove(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;		}	}}function update_ordercodecs(){	$('disallow').value = "";	$('allow').value = "";	if($('disallow_all').checked){			$('disallow').value = "all";	}else{		for (var x=0; x < $('disallowed').length ; x++){			if(x==0){				$('disallow').value = $('disallowed').options[x].value ;			}else{				$('disallow').value = $('disallow').value + "," + $('disallowed').options[x].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 ; 		}	}	$('div_setordercodecs').style.display = "none";	for (var x =0; x < fieldnames.length; x++) {		widgets[fieldnames[x]].disabled = false;	}	$('JingleUsers').disabled = false;}function cancel_ordercodecs(){	for (var x =0; x < fieldnames.length; x++) {		widgets[fieldnames[x]].disabled = false;	}	$('div_setordercodecs').style.display = "none";	$('JingleUsers').disabled = false;}function update_div_setordercodecs(){	if($('JingleUsers').selectedIndex	==-1){ return true;}	$('disallowed').innerHTML=""; 	$('allowed').innerHTML="";	if( $('disallow').value == "all" || $('disallow').value == ""){		$('disallow_all').checked = true;		selectbox_add("disallowed", "ulaw");		selectbox_add("disallowed", "alaw");		selectbox_add("disallowed", "gsm");		selectbox_add("disallowed", "ilbc");		selectbox_add("disallowed", "speex");		selectbox_add("disallowed", "g726");		selectbox_add("disallowed", "adpcm");		selectbox_add("disallowed", "lpc10");		selectbox_add("disallowed", "g729");	}else{		var tmp = $('disallow').value.split(",");		for(var x=0; x < tmp.length; x++){			selectbox_add("disallowed", tmp[x]);		}	}	var tmp = $('allow').value.split(",");	for(var x=0; x < tmp.length; x++){		selectbox_add("allowed", tmp[x]);		selectbox_remove("disallowed",tmp[x]);	}	for (var x =0; x < fieldnames.length; x++) {		widgets[fieldnames[x]].disabled = true;	}	$('JingleUsers').disabled = true;	$('div_setordercodecs').style.display='block';}function localajaxinit() {	setWindowTitle("Jingle");	parent.loadscreen(this);	for (var x =0; x < fieldnames.length; x++) {		widgets[fieldnames[x]] = $(fieldnames[x]);		widgets[fieldnames[x]].disabled = true;	}	parent.astmanEngine.config2list("jingle.conf", $('JingleUsers'), widgets, phonecallbacks);	return;}</script><body id="foo" onload="localajaxinit()"  bgcolor="EFEFEF"><div class="mainscreenTitleBar">	<span style="margin-left: 4px;font-weight:bold;">Jingle Configuration</span>	<span style="cursor: pointer; cursor: hand;" onclick="window.location.href=window.location.href;" >&nbsp;<img src="images/refresh.png" title=" Refresh " border=0 >&nbsp;</span></div><div class="mainscreenContentBox" id="userscontent"><table class="mainscreenTable" align="center">	<tr valign="top">		<td colspan='2'>Users:</td>	</tr>	<tr valign="top">		<td>	<select size="28" id="JingleUsers" style="width:220px; height: 415px"><option>Loading...</option></select>	</td>		<td colspan='3'  style='width:311px; height: 415px'>			<div id='adjustments'>				<table cellspacing='0' cellpadding='0'>				<tr valign="top">				<td>	<table cellpaddin=1 cellspacing=0>					<tr>	<td class="field_text">Extension:</td>						<td><input size='12' id='name' class="input8"></td>					</tr>					<tr>	<td class="field_text">Username:</td>						<td><input size='20' id='username' class="input8"></td>					</tr>					<tr>	<td class="field_text">Disallowed Codecs:</td>						<td><input size='12' id='disallow' class="input8"></td>					</tr>					<tr>	<td class="field_text">Allowed Codecs:</td>						<td>	<input size='12' id='allow' class="input8">							<input type=button id="sd" value="Edit" onclick="update_div_setordercodecs()">							<div style="position:absolute; display:none; left: 170; top: 190; width:350; background-color:#F4EFE5; border-width: 1px; border-color: #7E5538; border-style: solid;" id="div_setordercodecs">							<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="enable_selectedcodec()"><BR>									<input type="button" id="deselect_codec" value=">" onclick="disable_selectedcodec()">								</td>								<td>	<select id="disallowed" size=9 class="input8"></select>	</td>							</tr>							<tr>	<td></td>								<td></td>								<td class="field_text"><input type=checkbox id="disallow_all">Disallow All</td>							</tr>							<tr>	<td colspan=3 align=Center>									<input type="button" class="buttonbold" id="setordercodecs" value="update" onclick="update_ordercodecs()">&nbsp;&nbsp;									<input type="button" class="buttonbold" id="cancel_setorder" value="Cancel" onclick="cancel_ordercodecs()">								</td>							</tr>							<tr>	<td><BR></td>	</tr>							</table>							</div>						</td>					</tr>					<tr>	<td>Context:</td>						<td><input size='12' id='context'  class="input8"></td>					</tr>					<tr>	<td>Connection:</td>						<td><input size='12' id='connection'  class="input8"></td>					</tr>					</table>				</td>				</tr>				</table>			</div>		</td>	</tr>					<tr>	<td align='center'>			<input type='button' id='new' value='New' class="buttonbold" >&nbsp;&nbsp;<input type='button' id='delete' value='Delete' class="buttonbold" >		</td>		<td colspan='1' align='center'>			<input type='button' id='save' value='Save' class="buttonbold" >&nbsp;&nbsp;<input type='button' id='cancel' value='Cancel' class="buttonbold" >		</td>	</tr>	<tr>	</tr></table></div></body>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -