pari: branch asterisknow r273 - in /branches/asterisknow: ./ config/
config/s...
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Fri Jan 19 14:02:03 MST 2007
Author: pari
Date: Fri Jan 19 15:02:02 2007
New Revision: 273
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=273
Log:
Merged revisions 271-272 via svnmerge from
https://origsvn.digium.com/svn/asterisk-gui/trunk
........
r271 | pari | 2007-01-19 14:46:27 -0600 (Fri, 19 Jan 2007) | 1 line
tweaks: display no calling rules message in outgoing calls and incoming calling rules pages
........
r272 | pari | 2007-01-19 14:56:25 -0600 (Fri, 19 Jan 2007) | 1 line
tweak: donot let user edit the serviceprovider type once it is added
........
Modified:
branches/asterisknow/ (props changed)
branches/asterisknow/config/incoming.html
branches/asterisknow/config/numberplan.html
branches/asterisknow/config/setup/4.html
branches/asterisknow/config/setup/5.html
branches/asterisknow/config/trunks.html
Propchange: branches/asterisknow/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jan 19 15:02:02 2007
@@ -1,1 +1,1 @@
-/trunk:1-269
+/trunk:1-272
Modified: branches/asterisknow/config/incoming.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/incoming.html?view=diff&rev=273&r1=272&r2=273
==============================================================================
--- branches/asterisknow/config/incoming.html (original)
+++ branches/asterisknow/config/incoming.html Fri Jan 19 15:02:02 2007
@@ -113,6 +113,16 @@
addrowtotable( j, i, didtrunks[i][j].action, didtrunks[i][j].priority);
}
}
+
+ if( $('callingRulesTable').rows.length == 0){
+ $('table_one').style.display="none";
+ var newRow = $('callingRulesTable').insertRow(-1);
+ var newCell0 = newRow.insertCell(0);
+ newCell0 .align = "center";
+ newCell0 .innerHTML = "<BR>An <I>incoming Calling Rule</I> is not defined<BR><BR> Please click on 'Add a Incoming Rule' button<BR> to add a new incoming call rule.<BR><BR>" ;
+ return true;
+ }
+
}
function addrowtotable(a,b,c,d){ // a is pattern, b is DID_trunk, c is action, d is priority
Modified: branches/asterisknow/config/numberplan.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/numberplan.html?view=diff&rev=273&r1=272&r2=273
==============================================================================
--- branches/asterisknow/config/numberplan.html (original)
+++ branches/asterisknow/config/numberplan.html Fri Jan 19 15:02:02 2007
@@ -142,6 +142,7 @@
}
// now show this object in a table.
var rules_nosp = new Array ;
+
for( var x in default_np_data ){ // x is the pattern
// sort the priorities
if ( x == "extend"){ break;}
@@ -153,6 +154,7 @@
sorted_priorities.sort();
// done sorting priorities
// show fields in a table in the order of sorted priorities
+
for( var z=0; z < sorted_priorities.length ; z++ ){
//check if the trunk defined is actually an existing trunk
var trunk_exists = 0;
@@ -180,6 +182,15 @@
if(rules_nosp.length > 0 ){
$('status').innerHTML = "Note: A Service Provider is not defined for the Rules <BR>" + rules_nosp ;
$('trunks').selectedIndex = -1;
+ }
+
+ if( $('callingRulesTable').rows.length == 0 ){
+ $('table_one').style.display="none";
+ var newRow = $('callingRulesTable').insertRow(-1);
+ var newCell0 = newRow.insertCell(0);
+ newCell0 .align = "center";
+ newCell0 .innerHTML = "<BR>A <I>Calling Rule</I> is not defined<BR><BR> Please click on the 'Add a Calling Rule' button<BR> to add a Calling Rule<BR><BR>" ;
+ return true;
}
}
Modified: branches/asterisknow/config/setup/4.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/setup/4.html?view=diff&rev=273&r1=272&r2=273
==============================================================================
--- branches/asterisknow/config/setup/4.html (original)
+++ branches/asterisknow/config/setup/4.html Fri Jan 19 15:02:02 2007
@@ -141,8 +141,8 @@
}
var sp1 = document.createElement("img");
sp1.src = "../" + $('providerlogo').value ;
- sp1.width="214";
- sp1.height="46";
+ //sp1.width="214";
+ //sp1.height="46";
$('providerlogo_image').appendChild(sp1);
}
}
@@ -224,6 +224,10 @@
callbacks.beforeSaving = function(){
if(isnewtrunk ==1){
+ provider = $('provider').stored_config.catbyname[$('provider').value];
+ if( typeof provider.fieldbyname['trunk_username'] != "undefined" ){
+ $('name').value = provider.fieldbyname['trunk_username'];
+ }
dids_array.push($('name').value );
}else{
old_trunkname = $('devices').value ;
@@ -606,6 +610,12 @@
$('cancel').disabled = false;
$('userscontent').style.display = "block";
$('bg_transparent').style.display = "block";
+ if ( isnewtrunk == 0){
+ $('trunkstyleanalog').disabled = true;
+ $('trunkstylevoip').disabled = true;
+ $('trunkstylecustomvoip').disabled = true;
+ $('provider').disabled = true;
+ }
}
function deleteSP(trunk){
@@ -706,10 +716,11 @@
<LABEL FOR="trunkstyleanalog"><input name='trunkstyle' type='radio' id='trunkstyleanalog' onclick='activateanalogvoip()' value='analog'>Analog</LABEL><BR>
<LABEL FOR="trunkstylevoip"><input name='trunkstyle' type='radio' id='trunkstylevoip' onclick='activateanalogvoip()' value='voip'>VoIP</LABEL><BR>
<LABEL FOR="trunkstylecustomvoip"><input name='trunkstyle' type='radio' id='trunkstylecustomvoip' onclick='activateanalogvoip()' value='customvoip'>Custom VoIP</LABEL>
-
+ <div id="div_providername" style="display:none">
<BR><BR>
<B>Provider Name:</B><BR>
<input id="name" size=10 class='input8'>
+ </div>
</font>
<!-- Provider type -->
Modified: branches/asterisknow/config/setup/5.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/setup/5.html?view=diff&rev=273&r1=272&r2=273
==============================================================================
--- branches/asterisknow/config/setup/5.html (original)
+++ branches/asterisknow/config/setup/5.html Fri Jan 19 15:02:02 2007
@@ -189,9 +189,17 @@
}else{
addrowtotable( x , sorted_priorities[z] , default_np_data[x][sorted_priorities[z]].trunk , default_np_data[x][sorted_priorities[z]].digits2strip );
}
-
- }
- }
+ }
+ }
+
+ if( $('callingRulesTable').rows.length == 0 ){
+ $('table_one').style.display="none";
+ var newRow = $('callingRulesTable').insertRow(-1);
+ var newCell0 = newRow.insertCell(0);
+ newCell0 .align = "center";
+ newCell0 .innerHTML = "<BR>A <I>Calling Rule</I> is not defined<BR><BR> Please click on the 'Add a Calling Rule' button<BR> to add a Calling Rule<BR><BR>" ;
+ return true;
+ }
}
numplan_callbacks.eachline = true;
Modified: branches/asterisknow/config/trunks.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/trunks.html?view=diff&rev=273&r1=272&r2=273
==============================================================================
--- branches/asterisknow/config/trunks.html (original)
+++ branches/asterisknow/config/trunks.html Fri Jan 19 15:02:02 2007
@@ -197,6 +197,10 @@
callbacks.beforeSaving = function(){
if(isnewtrunk ==1){
+ provider = $('provider').stored_config.catbyname[$('provider').value];
+ if( typeof provider.fieldbyname['trunk_username'] != "undefined" ){
+ $('name').value = provider.fieldbyname['trunk_username'];
+ }
dids_array.push($('name').value );
}else{
old_trunkname = $('devices').value ;
@@ -579,6 +583,12 @@
$('cancel').disabled = false;
$('userscontent').style.display = "block";
$('bg_transparent').style.display ='';
+ if ( isnewtrunk == 0){
+ $('trunkstyleanalog').disabled = true;
+ $('trunkstylevoip').disabled = true;
+ $('trunkstylecustomvoip').disabled = true;
+ $('provider').disabled = true;
+ }
}
function deleteSP(trunk){
@@ -662,10 +672,11 @@
<LABEL FOR="trunkstyleanalog"><input name='trunkstyle' type='radio' id='trunkstyleanalog' onclick='activateanalogvoip()' value='analog'>Analog</LABEL><BR>
<LABEL FOR="trunkstylevoip"><input name='trunkstyle' type='radio' id='trunkstylevoip' onclick='activateanalogvoip()' value='voip'>VoIP</LABEL><BR>
<LABEL FOR="trunkstylecustomvoip"><input name='trunkstyle' type='radio' id='trunkstylecustomvoip' onclick='activateanalogvoip()' value='customvoip'>Custom VoIP</LABEL>
-
+ <div id="div_providername" style="display:none">
<BR><BR>
<B>Provider Name:</B><BR>
<input id="name" size=10 class='input8'>
+ </div>
<!-- Provider type -->
</td>
<td>
@@ -685,7 +696,7 @@
<table align="center">
<tr onmouseover="show_tooltip('en', 'trunks', 1);"><td style='width:80px' valign='top' class="field_text">Provider:</td><td><select size='6' id='provider' style='width:200px' altonchange='selectprovider()' class="input8"></select></td></tr>
<tr><td colspan='2' align='center'><div style="height:15px" id='status'></div></td></tr>
- <tr><td colspan='2' align='center'><img id='providerlogo' style='visibility:hidden;width:214px;height:46px'></td></tr>
+ <tr><td colspan='2' align='center'><img id='providerlogo' style='visibility:hidden;'></td></tr>
<tr><td colspan='2' align='center'><div id='providerdesc' align='left' style='width:230px;height:100px; font-size:10px'></div></td></tr>
<tr onmouseover="show_tooltip('en', 'trunks', 3);"><td class="field_text">Username:</td><td><input size='20' id='username' class="input8"></td></tr>
<tr onmouseover="show_tooltip('en', 'trunks', 4);"><td class="field_text">Password:</td><td><input size='20' id='secret' class="input8"></td></tr>
More information about the asterisk-gui-commits
mailing list