pari: trunk r966 - /trunk/config/localexts.html
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Mon May 21 20:32:55 MST 2007
Author: pari
Date: Mon May 21 22:32:54 2007
New Revision: 966
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=966
Log:
Operator Extension
Modified:
trunk/config/localexts.html
Modified: trunk/config/localexts.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/localexts.html?view=diff&rev=966&r1=965&r2=966
==============================================================================
--- trunk/config/localexts.html (original)
+++ trunk/config/localexts.html Mon May 21 22:32:54 2007
@@ -26,12 +26,22 @@
<link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
<script>
var usercallbacks = new Object;
-var fieldnames = ['allow_aliasextns', 'allow_an_extns', 'callwaiting', 'cancel', 'hasagent', 'hasdirectory', 'hasiax', 'hasmanager', 'hassip', 'hasvoicemail', 'localextenlength', 'save', 'threewaycalling', 'userbase', 'vmsecret', 'login_exten', 'login_callback_exten'];
+var fieldnames = ['allow_aliasextns', 'allow_an_extns', 'callwaiting', 'cancel', 'hasagent', 'hasdirectory', 'hasiax', 'hasmanager', 'hassip', 'hasvoicemail', 'localextenlength', 'save', 'threewaycalling', 'userbase', 'vmsecret', 'login_exten', 'login_callback_exten','operatorExtension'];
var widgets = {};
var agent_extens={};
+var OPE; // Operator extension before changes
usercallbacks.format = function(t) {
if(t.name == "general" ){ return t.name; }
+
+ if( !t.fieldbyname['trunkstyle'] ){ // all entries from users.conf other than trunks
+ var ie = (document.attachEvent)? 1:0;
+ h = document.createElement('option');
+ h.text = (t.fieldbyname['fullname'])? unescape(t.fieldbyname['fullname'])+" ("+t.name+")" : "Local Extension ("+t.name+")";
+ h.value = t.name;
+ if(ie){ _$('operatorExtension').add(h);} else{ _$('operatorExtension').add(h,null);}
+ }
+
return null;
}
@@ -57,6 +67,16 @@
}
}
+ if( _$('operatorExtension').value != OPE ){
+ if(OPE){
+ uri += build_action('delete', p, specialcontext ,'exten', "",'o,1,Goto(default,'+OPE+',1)' ); p++;
+ }
+ if(_$('operatorExtension').value.length){
+ uri += build_action('append', p, specialcontext ,'exten', 'o,1,Goto(default,' + _$('operatorExtension').value + ',1)' );p++;
+ }
+ }
+
+
if(uri!=""){
makerequest('u','extensions.conf', uri,function(t){});
}
@@ -68,6 +88,7 @@
return false;
}
+ OPE = _$('devices').stored_config.catbyname['general'].fieldbyname['operatorExtension'] ;
agent_extens.login_exten_old = _$('devices').stored_config.catbyname['general'].fieldbyname['login_exten'] ;
agent_extens.login_callback_exten_old = _$('devices').stored_config.catbyname['general'].fieldbyname['login_callback_exten'] ;
@@ -87,6 +108,7 @@
);
return;
}
+
parent.loadscreen(this);
}
@@ -163,10 +185,9 @@
<tr>
<td align="center" valign="top">
<select id="devices" style="display:none"></select>
- <BR>
- <fieldset style="width: 400px">
+ <fieldset style="width: 420px; padding : 3px 0px 0px 0px;">
<legend> Local Extension Settings: </legend>
- <table align='center' width='390' cellpadding=2 cellspacing=1>
+ <table align='center' cellpadding=2 cellspacing=1>
<tr ><td class="field_text" align=left>
Local Extensions are
<select id="localextenlength" class="input9">
@@ -178,13 +199,18 @@
</select> </td>
</tr>
<tr><td class="field_text" align=left>First Extension Number : <input type=text id="userbase" size=5 class="input9"></td></tr>
+ <tr ><td class="field_text" align=left>
+ Operator Extension : <select id="operatorExtension" class="input9"></select> </td>
+ </tr>
+
+
<tr><td class="field_text" align="left"><input type=checkbox id="allow_aliasextns">Allow analog phones to be assigned to multiple extensions</td></tr>
<tr><td class="field_text" align="left"><input type=checkbox id="allow_an_extns">Allow extensions to be AlphaNumeric (SIP/IAX users)</td></tr>
</table>
</fieldset><BR>
- <fieldset style="width: 400px">
+ <fieldset style="width: 420px">
<legend> Agent Login Settings: </legend>
- <table align='center' width='390' cellpadding=2 cellspacing=1>
+ <table align='center' cellpadding=2 cellspacing=1>
<tr> <td onmouseover="show_tooltip('en', 'users', 18);" class="field_text" align=right>Agent Login Extension : </td>
<td><input type=text id="login_exten" size=5 class="input9"></td>
</tr>
@@ -193,9 +219,9 @@
</tr>
</table>
</fieldset><BR>
- <fieldset style="width: 400px">
+ <fieldset style="width: 420px">
<legend> Default Settings for a New User: </legend>
- <table align='center' width='390' cellpadding=2 cellspacing=1>
+ <table align='center' cellpadding=2 cellspacing=1>
<tr> <td onmouseover="show_tooltip('en', 'users', 15);" class="field_text" align="right"><input type='checkbox' id='hasagent'></td>
<td onmouseover="show_tooltip('en', 'users', 15);" class="field_text" >Is Agent</td>
<td onmouseover="show_tooltip('en', 'users', 8);" align=right><input type='checkbox' id='hasvoicemail'></td>
More information about the asterisk-gui-commits
mailing list