bkruse: branch asterisknow r1470 - /branches/asterisknow/config/trunks.html
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Tue Aug 28 18:08:31 CDT 2007
Author: bkruse
Date: Tue Aug 28 18:08:31 2007
New Revision: 1470
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1470
Log:
Really fixing the issue Siya said.
This will work for all future added
trunks and providers also.
Modified:
branches/asterisknow/config/trunks.html
Modified: branches/asterisknow/config/trunks.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/trunks.html?view=diff&rev=1470&r1=1469&r2=1470
==============================================================================
--- branches/asterisknow/config/trunks.html (original)
+++ branches/asterisknow/config/trunks.html Tue Aug 28 18:08:31 2007
@@ -598,9 +598,7 @@
}else if (_$('trunkstylevoip').checked) {
_$('voip').style.display = "";
//_$('voip').style.height =350;
- for(var x=0; x < opt_userandpass.length; x++) { /* 2 */
- _$(opt_userandpass[x]).style.display = "none";
- }
+ showhidefields();
}else if (_$('trunkstylecustomvoip').checked) {
_$('customvoip').style.display = "" ;
}else if (_$('trunkstyledigital').checked) {
@@ -666,13 +664,8 @@
parent.astmanEngine.config2list("zapscan.conf", _$('zapchan'), new Array(), phonecallbacks);
}
-function showhidefields(prov, edit) {
- /* If it is an edit, we are going to want to display the default */
- if(edit == 1) {
- var provname = prov;
- } else {
- var provname = _$('provider').value;
- }
+function showhidefields() {
+ var provname = _$('provider').value;
if(provname == "bandwidth") {
for(var x=0; x < opt_userandpass.length; x++) { /* 3 */
_$(opt_userandpass[x]).style.display="none";
@@ -935,8 +928,6 @@
_devices.selectitem(i);
showSPdetails();
activateanalogvoip();
- var tmp_prov = (_devices.stored_config.catbyname[sp_value].fieldbyname['provider'] ) ? _devices.stored_config.catbyname[sp_value].fieldbyname['provider'] : '';
- showhidefields(tmp_prov, 1);
break;
}
}
@@ -1084,13 +1075,10 @@
_$('bg_transparent').style.display ='none';
}
-function showSPdetails(){
+function showSPdetails(edit_flag){
_$('cancel').disabled = false;
_$('userscontent').style.display = "";
_$('bg_transparent').style.display ='';
- /* Make our default option VOIP (service providers) */
- _$('trunkstylevoip').click();
- _$('provider').options[0].selected = true;
if ( isnewtrunk == 0){
_$('trunkstyleanalog').disabled = true;
_$('trunkstylevoip').disabled = true;
@@ -1098,11 +1086,11 @@
_$('trunkstyledigital').disabled = true;
_$('provider').disabled = true;
} else {
+ /* Make our default option VOIP (service providers) */
_$('voip').style.display = "";
//_$('voip').style.height =350;
- for(var x=0; x < opt_userandpass.length; x++) { /* 1 */
- _$(opt_userandpass[x]).style.display = "none";
- }
+ _$('trunkstylevoip').click();
+ _$('provider').options[0].selected = true;
}
}
More information about the asterisk-gui-commits
mailing list