pari: branch 2.0 r4031 - in /branches/2.0/config: ./ js/
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Wed Oct 29 16:29:56 CDT 2008
Author: pari
Date: Wed Oct 29 16:29:55 2008
New Revision: 4031
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4031
Log:
Finishing AA50-2035 - Paging & Intercom
Modified:
branches/2.0/config/index.html
branches/2.0/config/js/astman.js
branches/2.0/config/js/pbx.js
branches/2.0/config/paging.html
Modified: branches/2.0/config/index.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/index.html?view=diff&rev=4031&r1=4030&r2=4031
==============================================================================
--- branches/2.0/config/index.html (original)
+++ branches/2.0/config/index.html Wed Oct 29 16:29:55 2008
@@ -165,6 +165,10 @@
<div class="ui-accordion-link">Voicemail</div>
<div class="ui-accordion-desc">General settings for voicemail.</div>
</div>
+ <div page='paging.html'>
+ <div class="ui-accordion-link">Paging/Intercom</div>
+ <div class="ui-accordion-desc">Set up 1-Way Paging or 2-Way Intercom for calling individial or group of extensions</div>
+ </div>
<div page='meetme.html'>
<div class="ui-accordion-link">Conferencing</div>
<div class="ui-accordion-desc">MeetMe conference bridging allows quick, ad-hoc conferences with or without security.</div>
Modified: branches/2.0/config/js/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/astman.js?view=diff&rev=4031&r1=4030&r2=4031
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Wed Oct 29 16:29:55 2008
@@ -2612,7 +2612,7 @@
ASTGUI.apps['mISDNscan'] = 'misdn-init scan' ;
ASTGUI.apps['flashupdate'] = 'flashupdate' ;
-ASTGUI.includeContexts = [ 'default' , 'parkedcalls' , ASTGUI.contexts.CONFERENCES , ASTGUI.contexts.RingGroupExtensions , ASTGUI.contexts.VoiceMenuExtensions , ASTGUI.contexts.QUEUES , ASTGUI.contexts.VoiceMailGroups , ASTGUI.contexts.Directory, ASTGUI.contexts.PageGroups ] ;
+ASTGUI.includeContexts = [ 'default' , 'parkedcalls' , ASTGUI.contexts.CONFERENCES , ASTGUI.contexts.RingGroupExtensions , ASTGUI.contexts.VoiceMenuExtensions , ASTGUI.contexts.QUEUES , ASTGUI.contexts.VoiceMailGroups , ASTGUI.contexts.Directory, ASTGUI.contexts.PageGroups , ASTGUI.contexts.PageAnExtension] ;
ASTGUI.customObject.prototype = {
getProperty: function(p){
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=4031&r1=4030&r2=4031
==============================================================================
--- branches/2.0/config/js/pbx.js (original)
+++ branches/2.0/config/js/pbx.js Wed Oct 29 16:29:55 2008
@@ -68,7 +68,7 @@
check_For_Contexts[ASTGUI.contexts.VoiceMenuExtensions] = {} ;
check_For_Contexts[ASTGUI.contexts.VoiceMailGroups] = {} ;
check_For_Contexts[ASTGUI.contexts.Directory] = {} ;
- check_For_Contexts[ASTGUI.contexts.PageAnExtension] = {} ;
+ check_For_Contexts[ASTGUI.contexts.PageAnExtension] = {},
check_For_Contexts[ASTGUI.contexts.PageGroups] = {} ;
check_For_Contexts[ASTGUI.contexts.guitools] = [
'exten=executecommand,1,System(${command})',
Modified: branches/2.0/config/paging.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/paging.html?view=diff&rev=4031&r1=4030&r2=4031
==============================================================================
--- branches/2.0/config/paging.html (original)
+++ branches/2.0/config/paging.html Wed Oct 29 16:29:55 2008
@@ -444,17 +444,59 @@
ASTGUI.updateFieldToValue( 'text_Alert_Info_Header' , c.getProperty('PAGING_HEADER') );
ASTGUI.updateFieldToValue( 'select_Timeout' , c.getProperty('PAGING_TIMEOUT') );
-
- }
-};
-
-
-
+ var d = context2json ({ filename: 'extensions.conf' , context: ASTGUI.contexts.PageAnExtension , usf: 0 });
+ var i = d.length;
+ while (i--) {
+ if( d[i].endsWith('|q)') ){
+ ASTGUI.updateFieldToValue( 'text_prefix_paging' , ASTGUI.parseContextLine.getExten(d[i]).lChop('_').withOut('X') );
+ }
+ if( d[i].endsWith('|qd)') ){
+ ASTGUI.updateFieldToValue( 'text_prefix_intercom' , ASTGUI.parseContextLine.getExten(d[i]).lChop('_').withOut('X') );
+ }
+ }
+ }
+};
+
+var load_Defaults_TAB_page_anExtension = function(){
+ ASTGUI.resetTheseFields( ['text_prefix_paging','text_prefix_intercom']);
+ $('#btn_ld_tpe').hide();
+};
var save_TAB_paging_settings = function(){
ASTGUI.updateaValue({ file:'extensions.conf', context :'globals', variable :'PAGING_HEADER', value : ASTGUI.getFieldValue('text_Alert_Info_Header') });
ASTGUI.updateaValue({ file:'extensions.conf', context :'globals', variable :'PAGING_TIMEOUT', value : ASTGUI.getFieldValue('select_Timeout') });
ASTGUI.feedback({msg:' Saved !!', showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
+};
+
+
+var save_TAB_page_anExtension = function(){
+ // exten => _**XXXX,1,Macro(pagingintercom|Local/${EXTEN:2}|q) // text_prefix_paging
+ // exten => _*#XXXX,1,Macro(pagingintercom|Local/${EXTEN:2}|qd) // text_prefix_intercom
+ // parent.sessionData.GUI_PREFERENCES.ue_start
+
+ var TMP_CONTEXT = ASTGUI.contexts.PageAnExtension ;
+
+ var tmp_X = 'X'.times( parent.sessionData.GUI_PREFERENCES.ue_start.length );
+ var tmp_text_prefix_paging = ASTGUI.getFieldValue('text_prefix_paging');
+ var tmp_text_prefix_intercom = ASTGUI.getFieldValue('text_prefix_intercom');
+
+ var u = new listOfSynActions('extensions.conf');
+
+ if( tmp_text_prefix_paging ){
+ var pg_exten = '_' + tmp_text_prefix_paging + tmp_X + ',1,Macro(pagingintercom|Local/${EXTEN:' + tmp_text_prefix_paging.length + '}|q)' ;
+ u.new_action('append', TMP_CONTEXT , 'exten', pg_exten );
+ }
+
+ if( tmp_text_prefix_intercom ){
+ var itcom_exten = '_' + tmp_text_prefix_intercom + tmp_X + ',1,Macro(pagingintercom|Local/${EXTEN:' + tmp_text_prefix_intercom.length + '}|qd)' ;
+ u.new_action('append', TMP_CONTEXT , 'exten', itcom_exten );
+ }
+
+
+ ASTGUI.miscFunctions.empty_context({ filename:'extensions.conf', context : TMP_CONTEXT , cb : function(){
+ u.callActions();
+ ASTGUI.feedback({msg:' Saved !!', showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
+ }});
};
@@ -477,14 +519,36 @@
</div>
<div class='hideall' id='TAB_page_anExtension'>
-
+ <div class='lite_Heading'> Settings for Paging Individual Extensions </div>
+ <table cellpadding=2 cellspacing=2 border=0 width="90%" align="center">
+ <tr> <td align="right" colspan=2 height=15></td></tr>
+ <TR> <td align="right" width="50%">Prefix for Paging an Extension : </td>
+ <td>
+ <input type=text id="text_prefix_paging" size=2 required='yes' dfalt='**'>
+ </td>
+ </TR>
+ <TR> <td align="right">Prefix for Dialing an Extension as Intercom : </td>
+ <td>
+ <input type=text id="text_prefix_intercom" size=2 required='yes' dfalt='*#'>
+ </td>
+ </TR>
+ <tr> <td align="right" colspan=2 height=10></td></tr>
+ <tr> <td align=right>
+ <span class='guiButton' id='btn_ld_tpe' onclick='load_Defaults_TAB_page_anExtension();'>Load Defaults</span>
+ <span class='guiButtonCancel' onclick='ASTGUI.hideDrag(event);'>Cancel</span>
+ </td>
+ <td>
+ <span class='guiButtonEdit' onclick='save_TAB_page_anExtension();'>Save</span>
+ </td>
+ </tr>
+ </table>
</div>
<div class='hideall' id='TAB_paging_settings'>
<div class='lite_Heading'> Settings for Paging & Intercom </div>
<table cellpadding=2 cellspacing=2 border=0 width="90%" align="center">
<tr> <td align="right" colspan=2 height=15></td></tr>
- <TR> <td align="right">Alert-Info Header : </td>
+ <TR> <td align="right" width="50%">Alert-Info Header : </td>
<td>
<input type=text id="text_Alert_Info_Header" size=16 required='yes'>
</td>
More information about the asterisk-gui-commits
mailing list