pari: branch 2.0 r3909 - in /branches/2.0/config: followme.html js/pbx.js
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Fri Sep 26 16:42:03 CDT 2008
Author: pari
Date: Fri Sep 26 16:42:02 2008
New Revision: 3909
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=3909
Log:
Adding an Options section where you can enable/disable CallScreening & other followme preferences
Modified:
branches/2.0/config/followme.html
branches/2.0/config/js/pbx.js
Modified: branches/2.0/config/followme.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/followme.html?view=diff&rev=3909&r1=3908&r2=3909
==============================================================================
--- branches/2.0/config/followme.html (original)
+++ branches/2.0/config/followme.html Fri Sep 26 16:42:02 2008
@@ -96,6 +96,7 @@
<script>
var EDIT_USER ;
var CURRENT_DESTINATIONS = [] ;
+var FOLLOWME_OPTIONS = '';
var load_users_table = function(){
var TBL = _$('table_userslist') ;
@@ -122,6 +123,14 @@
var ext_globals = context2json({filename: 'extensions.conf', context: 'globals' , usf: 1});
var followme_cnf = config2json({filename: 'followme.conf', usf: 0});
+
+
+ if( ext_globals.hasOwnProperty('FOLLOWMEOPTIONS') ){
+ FOLLOWME_OPTIONS = ext_globals.FOLLOWMEOPTIONS ;
+ if( FOLLOWME_OPTIONS.contains('s') ){ _$('chk_fmoptions_s').checked = true; }
+ if( FOLLOWME_OPTIONS.contains('a') ){ _$('chk_fmoptions_a').checked = true; }
+ if( FOLLOWME_OPTIONS.contains('n') ){ _$('chk_fmoptions_n').checked = true; }
+ }
ul.each( function(user){ // list each user in table
var fmvar = 'FOLLOWME_' + user ;
@@ -157,6 +166,16 @@
var localajaxinit = function(){
+ ASTGUI.tabbedOptions( _$('tabbedMenu') , [
+ { url: '#',
+ desc: 'FollowMe Preferences for Users',
+ click_function: function(){ $('#div_ONE_FOLLOWMEUSERS').show(); $('#div_TWO_FOLLOWME_PREFS').hide(); }
+ },{
+ url: '#',
+ desc: 'FollowMe Options',
+ click_function: function(){ $('#div_ONE_FOLLOWMEUSERS').hide(); $('#div_TWO_FOLLOWME_PREFS').show(); }
+ }
+ ]);
ASTGUI.events.add( 'newFM_Number_radio_local', 'click' , function(){
$('#FMU_newNumber_local').hide();
@@ -178,7 +197,10 @@
followMe_MiscFunctions.load_LocalExtensionsList();
top.document.title = 'Follow Me' ;
+
load_users_table();
+
+ $('#tabbedMenu').find('A:eq(0)').click();
(function(){
var mcls = config2json({filename: 'musiconhold.conf', usf: 1});
@@ -406,16 +428,56 @@
};
+var update_FollowMe_Options = function(){
+
+ FOLLOWME_OPTIONS = '';
+
+ if( _$('chk_fmoptions_n').checked ) FOLLOWME_OPTIONS = FOLLOWME_OPTIONS + 'n' ;
+ if( _$('chk_fmoptions_a').checked ) FOLLOWME_OPTIONS = FOLLOWME_OPTIONS + 'a' ;
+ if( _$('chk_fmoptions_s').checked ) FOLLOWME_OPTIONS = FOLLOWME_OPTIONS + 's' ;
+
+ ASTGUI.updateaValue({ file:'extensions.conf', context :'globals', variable :'FOLLOWMEOPTIONS', value : FOLLOWME_OPTIONS });
+ ASTGUI.feedback({msg:' Saved !!', showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
+
+};
+
+
</script>
<body bgcolor="EFEFEF">
<div class="iframeTitleBar">
Follow Me <span class='refresh_icon' onclick="window.location.reload();" > <img src="images/refresh.png" title=" Refresh " border=0 > </span>
</div>
+ <center><div id="tabbedMenu"></div></center>
+
+<div id='div_ONE_FOLLOWMEUSERS'>
<div class='lite_Heading' id='thisPage_lite_Heading'>'<i>Follow Me</i>' preferences for users</div>
<table id='table_userslist' cellpadding=0 cellspacing=0 border=0 align=center style='clear:both;'></table>
-
+</div>
+<div id='div_TWO_FOLLOWME_PREFS' style="display:none;">
+ <div class='lite_Heading'>FollowMe Options</div>
+ <table align="center" cellpadding=2 cellspacing=2 border=0>
+ <tr> <td valign=top align=right> <input type=checkbox id='chk_fmoptions_s'></td>
+ <td>Playback the incoming status message prior to starting the follow-me step(s)</td>
+ </tr>
+ <tr> <td height=10></td></tr>
+ <tr> <td valign=top align=right> <input type=checkbox id='chk_fmoptions_a'></td>
+ <td>Record the caller's name so it can be announced to the callee on each step</td>
+ </tr>
+ <tr> <td height=10></td></tr>
+ <tr> <td valign=top align=right> <input type=checkbox id='chk_fmoptions_n'></td>
+ <td>Playback the unreachable status message if we've run out of steps to reach the or the callee has elected not to be reachable.</td>
+ </tr>
+ <tr> <td height=10></td></tr>
+
+ <tr> <td align=center colspan=2>
+ <span class='guiButtonCancel' id='cancel' onclick='window.location.reload();'>Cancel</span>
+ <span class='guiButtonEdit' id='save' onclick='update_FollowMe_Options();'>Save</span>
+ </td>
+ </tr>
+ </table>
+</div>
<div id="div_followUser_edit" STYLE="width:600; display:none;" class='dialog'>
<TABLE width="100%" cellpadding=0 cellspacing=0>
Modified: branches/2.0/config/js/pbx.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/pbx.js?view=diff&rev=3909&r1=3908&r2=3909
==============================================================================
--- branches/2.0/config/js/pbx.js (original)
+++ branches/2.0/config/js/pbx.js Fri Sep 26 16:42:02 2008
@@ -29,7 +29,7 @@
// check whether the config files are in proper format and have every thing needed for the gui to function properly
var check_For_Contexts = {
general : { static : 'yes', writeprotect : 'no', clearglobalvars : 'yes' },
- globals : { FEATURES : '' , DIALOPTIONS : '' , RINGTIME: '20' },
+ globals : { FEATURES : '' , DIALOPTIONS : '' , RINGTIME: '20', FOLLOWMEOPTIONS : '' },
default : {},
'macro-stdexten' : [
'exten=s,1,Set(__DYNAMIC_FEATURES=${FEATURES})',
@@ -46,7 +46,7 @@
],
'macro-stdexten-followme' : [
'exten=s,1,Dial(${ARG2},${RINGTIME},${DIALOPTIONS})',
- 'exten=s,2,Followme(${ARG1},a)',
+ 'exten=s,2,Followme(${ARG1},${FOLLOWMEOPTIONS})',
'exten=s,3,Voicemail(${ARG1},u)',
'exten=s-NOANSWER,1,Voicemail(${ARG1},u)',
'exten=s-BUSY,1,Voicemail(${ARG1},b)',
More information about the asterisk-gui-commits
mailing list