pari: branch 2.0 r4146 - in /branches/2.0/config/js: index.js pbx.js
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Wed Nov 19 14:01:47 CST 2008
Author: pari
Date: Wed Nov 19 14:01:46 2008
New Revision: 4146
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4146
Log:
Replacing pipe with coma,
Trying to be more in line with asterisk 1.6 syntax.
Modified:
branches/2.0/config/js/index.js
branches/2.0/config/js/pbx.js
Modified: branches/2.0/config/js/index.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/index.js?view=diff&rev=4146&r1=4145&r2=4146
==============================================================================
--- branches/2.0/config/js/index.js (original)
+++ branches/2.0/config/js/index.js Wed Nov 19 14:01:46 2008
@@ -787,7 +787,7 @@
y.each(function(user){
var f = new destination;
f.optionText = 'User Extension -- ' + user ;
- f.optionValue = (fortbr)? 'default|' + user + '|1' : 'Goto(default|' + user + '|1)' ;
+ f.optionValue = (fortbr)? 'default,' + user + ',1' : 'Goto(default,' + user + ',1)' ;
tmp.push(f);
if(!fortbr && sessionData.pbxinfo.users[user].getProperty('hasvoicemail').isAstTrue() ){
var p_Text = 'User VoiceMailBox ' + user ;
@@ -798,14 +798,14 @@
y.each(function(meetme){
var f = new destination;
f.optionText = 'Conference Room -- ' + meetme ;
- f.optionValue = (fortbr)? ASTGUI.contexts.CONFERENCES + '|' + meetme + '|1' : 'Goto('+ ASTGUI.contexts.CONFERENCES +'|'+ meetme + '|1)';
+ f.optionValue = (fortbr)? ASTGUI.contexts.CONFERENCES + ',' + meetme + ',1' : 'Goto('+ ASTGUI.contexts.CONFERENCES +','+ meetme + ',1)';
tmp.push(f);
});
var y = sessionData.pbxinfo.queues.getOwnProperties();
y.each(function(q){
var f = new destination;
f.optionText = 'Queue -- ' + q ;
- f.optionValue = (fortbr)? ASTGUI.contexts.QUEUES + '|' + q + '|1' : 'Goto('+ ASTGUI.contexts.QUEUES +'|'+ q + '|1)';
+ f.optionValue = (fortbr)? ASTGUI.contexts.QUEUES + ',' + q + ',1' : 'Goto('+ ASTGUI.contexts.QUEUES +','+ q + ',1)';
tmp.push(f);
});
var y = sessionData.pbxinfo.voicemenus.getOwnProperties();
@@ -813,7 +813,7 @@
var vm_name = sessionData.pbxinfo.voicemenus[vmenu].comment || vmenu ;
var f = new destination;
f.optionText = 'VoiceMenu -- ' + vm_name ;
- f.optionValue = (fortbr)? vmenu+ '|s|1' : 'Goto('+ vmenu +'|s|1)';
+ f.optionValue = (fortbr)? vmenu+ ',s,1' : 'Goto('+ vmenu +',s,1)';
tmp.push(f);
});
var y = sessionData.pbxinfo.timebasedRules.getOwnProperties();
@@ -821,7 +821,7 @@
var tbr_label = sessionData.pbxinfo.timebasedRules[tbr].label || tbr ;
var f = new destination;
f.optionText = 'Time Based Rule -- ' + tbr_label;
- f.optionValue = (fortbr)? tbr + '|s|1' : 'Goto('+ tbr +'|s|1)';
+ f.optionValue = (fortbr)? tbr + ',s,1' : 'Goto('+ tbr +',s,1)';
tmp.push(f);
});
var y = sessionData.pbxinfo.ringgroups.getOwnProperties();
@@ -829,14 +829,14 @@
var rg_name = sessionData.pbxinfo.ringgroups[rg].NAME || rg ;
var f = new destination;
f.optionText = 'Ring Group -- ' + rg_name ;
- f.optionValue = (fortbr)? rg + '|s|1' : 'Goto('+ rg +'|s|1)';
+ f.optionValue = (fortbr)? rg + ',s,1' : 'Goto('+ rg +',s,1)';
tmp.push(f);
});
var y = astgui_managePageGroups.getPGsList();
y.each(function(pge){
var f = new destination;
f.optionText = 'Page Group -- ' + pge ;
- f.optionValue = 'Goto('+ ASTGUI.contexts.PageGroups +'|'+ pge +'|1)';
+ f.optionValue = 'Goto('+ ASTGUI.contexts.PageGroups +','+ pge +',1)';
tmp.push(f);
});
@@ -844,7 +844,7 @@
y.each(function( this_vmg_exten ){
var f = new destination;
f.optionText = 'VoiceMail Group -- ' + (sessionData.pbxinfo.vmgroups[this_vmg_exten].getProperty('label') || this_vmg_exten ) ;
- f.optionValue = (fortbr) ? ASTGUI.contexts.VoiceMailGroups +'|' + this_vmg_exten + '|1' : 'Goto('+ ASTGUI.contexts.VoiceMailGroups +'|' + this_vmg_exten + '|1)' ;
+ f.optionValue = (fortbr) ? ASTGUI.contexts.VoiceMailGroups +',' + this_vmg_exten + ',1' : 'Goto('+ ASTGUI.contexts.VoiceMailGroups +',' + this_vmg_exten + ',1)' ;
tmp.push(f);
});
@@ -852,13 +852,13 @@
var nde = sessionData.pbxinfo['localextensions'].getProperty('defaultDirectory') ;
var f = new destination;
f.optionText = 'Names Directory -- ' + nde ;
- f.optionValue = (fortbr) ? ASTGUI.contexts.Directory + '|' + nde + '|1' : 'Goto('+ ASTGUI.contexts.Directory + '|' + nde + '|1)'; ;
+ f.optionValue = (fortbr) ? ASTGUI.contexts.Directory + ',' + nde + ',1' : 'Goto('+ ASTGUI.contexts.Directory + ',' + nde + ',1)'; ;
tmp.push(f);
}
var f = new destination; // we always point to default|o instead of to where defautl|o points to, so that if when a different user is selected as operator, we do not have to update the menus
f.optionText = 'Operator';
- f.optionValue = (fortbr)? 'default|o|1' : 'Goto(default|o|1)';
+ f.optionValue = (fortbr)? 'default,o,1' : 'Goto(default,o,1)';
tmp.push(f);
if(!fortbr){
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=4146&r1=4145&r2=4146
==============================================================================
--- branches/2.0/config/js/pbx.js (original)
+++ branches/2.0/config/js/pbx.js Wed Nov 19 14:01:46 2008
@@ -406,7 +406,7 @@
df.each( function(line){
if( line.contains( ',1,Goto(ringroups-custom-' ) ){
var rg_ext = ASTGUI.parseContextLine.getExten(line) ;
- var rg_name = line.betweenXY('(', '|') ; //ringroups-custom-1
+ var rg_name = ASTGUI.parseContextLine.getArgs(line)[0] ; //ringroups-custom-1
if( !sessionData.pbxinfo.ringgroups.hasOwnProperty(rg_name) ){
var tmp = {
NAME : rg_name,
@@ -1422,7 +1422,7 @@
});
if( new_menu.alias_exten ){ // add 'exten = 7000,1,Goto(voicemenu-custom-1|s|1)' in context 'voicemenus'
if( !new_menu.alias_exten.contains(',') || !new_menu.alias_exten.toLowerCase().contains('goto(') ){// if new_menu.alias_exten is '4444'
- new_menu.alias_exten = new_menu.alias_exten.lChop('exten=') + ',1,Goto(' + new_name + '|s|1)' ;
+ new_menu.alias_exten = new_menu.alias_exten.lChop('exten=') + ',1,Goto(' + new_name + ',s,1)' ;
}
x.new_action( 'append', ASTGUI.contexts.VoiceMenuExtensions , 'exten', new_menu.alias_exten );
}
@@ -1505,7 +1505,7 @@
var configOptions = line.afterChar('=');
var params = configOptions.betweenXY('|',')');
if( params.contains('a') && params.contains('A') ) { // if is a meetMe Admin Login
- b = configOptions.betweenXY('(','|');
+ b = ASTGUI.parseContextLine.getArgs(line)[0] ;
}
if( !sessionData.pbxinfo.conferences.hasOwnProperty(b) ){
sessionData.pbxinfo.conferences[b] = new ASTGUI.customObject ;
@@ -1662,7 +1662,7 @@
}
for(var u=0, v = rgextns.length; u < v ; u++ ){
- if( rgextns[u].contains(cxtname + '|') ){
+ if( rgextns[u].contains(cxtname + '|') || rgextns[u].contains(cxtname + ',') ){
rg.extension = ASTGUI.parseContextLine.getExten(rgextns[u]);
break;
}
@@ -1717,7 +1717,7 @@
var after = function() {
if( rg.extension ){
var u = new listOfSynActions('extensions.conf') ;
- u.new_action( 'append', ASTGUI.contexts.RingGroupExtensions , 'exten', rg.extension + ',1,Goto(' + newrg + '|s|1)' );
+ u.new_action( 'append', ASTGUI.contexts.RingGroupExtensions , 'exten', rg.extension + ',1,Goto(' + newrg + ',s,1)' );
u.callActions();
}
sessionData.pbxinfo.ringgroups[newrg] = rg ;
@@ -1732,13 +1732,8 @@
var u = new listOfSynActions('extensions.conf') ;
u.new_action('delcat', rgname , '', '');
if( sessionData.pbxinfo.ringgroups[rgname].extension ){
-
-
-
var f = sessionData.pbxinfo.ringgroups[rgname].extension ;
-
-
- u.new_action( 'delete', ASTGUI.contexts.RingGroupExtensions , 'exten', '', f + ',1,Goto(' + rgname + '|s|1)' ) ;
+ u.new_action( 'delete', ASTGUI.contexts.RingGroupExtensions , 'exten', '', f + ',1,Goto(' + rgname + ',s,1)' ) ;
if( sessionData.pbxinfo.ringgroups[rgname].hasOwnProperty('isOLDRG') && sessionData.pbxinfo.ringgroups[rgname].isOLDRG == true ){
u.new_action( 'delete', 'default' , 'exten', '', f + ',1,Goto(' + rgname + '|s|1)' ) ;
}
@@ -2059,13 +2054,12 @@
if(!this_line.beginsWith('exten=') ){ return ; }
var match_str = this_line.afterChar('=');
- if ( this_line.contains('MeetMe(${EXTEN}|') ){
+ if ( this_line.contains('MeetMe(${EXTEN}') ){
// Move any conferences into [conferences]
// old
// [default]
// exten => 6000,1,MeetMe(${EXTEN}|MI) // delete this line
-
- sa.new_action('delete', 'default' , 'exten', '', match_str );
+ sa.new_action('delete', 'default' , 'exten', '', match_str );
// new
// [conferences]
// exten => 6000,1,MeetMe(${EXTEN}|MI)
@@ -2079,7 +2073,7 @@
// [voicemenu-custom-?]
// exten = ????,?,Goto(conferences|6000|1)
var tmp_exten = ASTGUI.parseContextLine.getExten(match_str);
- var tmp_oldMM_gotoStr = 'Goto(default|' + tmp_exten + '|1)' ;
+ var tmp_oldMM_gotoStr = 'Goto(default,' + tmp_exten + ',1)' ;
for ( var catname in ext_conf ){
if( !ext_conf.hasOwnProperty(catname) ) continue;
@@ -2095,7 +2089,7 @@
this_menu.each( function( this_menu_line ){
if( this_menu_line.contains( tmp_oldMM_gotoStr ) ){
var tmp_toReplace = this_menu_line.afterChar('=');
- var tmp_ReplaceWith = tmp_toReplace.replaceXY(tmp_oldMM_gotoStr, 'Goto(' + ASTGUI.contexts.CONFERENCES +'|' + tmp_exten + '|1)' );
+ var tmp_ReplaceWith = tmp_toReplace.replaceXY(tmp_oldMM_gotoStr, 'Goto(' + ASTGUI.contexts.CONFERENCES +',' + tmp_exten + ',1)' );
sa.new_action( 'update', catname , 'exten', tmp_ReplaceWith , tmp_toReplace );
}
});
@@ -2141,7 +2135,7 @@
this_menu.each( function( this_menu_line ){
if( this_menu_line.contains( tmp_oldRG_gotoStr ) ){
var tmp_toReplace = this_menu_line.afterChar('=');
- var tmp_ReplaceWith = tmp_toReplace.replaceXY( tmp_oldRG_gotoStr, 'Goto(' + THIS_RGNAME +'|s|1)' );
+ var tmp_ReplaceWith = tmp_toReplace.replaceXY( tmp_oldRG_gotoStr, 'Goto(' + THIS_RGNAME +',s,1)' );
sa.new_action( 'update', catname , 'exten', tmp_ReplaceWith , tmp_toReplace );
}
});
@@ -2190,7 +2184,7 @@
this_menu.each( function( this_menu_line ){
if( this_menu_line.contains( tmp_oldQ_gotoStr ) ){
var tmp_toReplace = this_menu_line.afterChar('=');
- var tmp_ReplaceWith = tmp_toReplace.replaceXY(tmp_oldQ_gotoStr, 'Goto(' + ASTGUI.contexts.QUEUES +'|' + tmp_exten + '|1)' );
+ var tmp_ReplaceWith = tmp_toReplace.replaceXY(tmp_oldQ_gotoStr, 'Goto(' + ASTGUI.contexts.QUEUES +',' + tmp_exten + ',1)' );
sa.new_action( 'update', catname , 'exten', tmp_ReplaceWith , tmp_toReplace );
}
});
More information about the asterisk-gui-commits
mailing list