pari: trunk r1002 - in /trunk/config: incoming.html timerules.html
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Wed May 30 11:45:28 MST 2007
Author: pari
Date: Wed May 30 13:45:28 2007
New Revision: 1002
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1002
Log:
option to redirect TimeRule to a ringGroup
Modified:
trunk/config/incoming.html
trunk/config/timerules.html
Modified: trunk/config/incoming.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/incoming.html?view=diff&rev=1002&r1=1001&r2=1002
==============================================================================
--- trunk/config/incoming.html (original)
+++ trunk/config/incoming.html Wed May 30 13:45:28 2007
@@ -72,13 +72,11 @@
}
if ( ( t.name.substring(0,asterisk_guiTDPrefix.length) == asterisk_guiTDPrefix ) && t.names[x]=='exten' ){
//get pattern & action
- var temp = t.fields[x].split(',');
- var f = temp[0];
+ var f = ASTGUI.parseContextLine.getExten(t.fields[x]);
if( f == "s" ){return false;}
didtrunks[t.name][f] = new Object();
- didtrunks[t.name][f].priority = temp[1];
- temp.splice(0,2);
- didtrunks[t.name][f].action = temp.join(',');
+ didtrunks[t.name][f].priority = ASTGUI.parseContextLine.getPriority(t.fields[x]);
+ didtrunks[t.name][f].action = ASTGUI.parseContextLine.getAction(t.fields[x])
}
if( t.name.match('ringroups-custom-') && (x == undefined) ){
Modified: trunk/config/timerules.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/timerules.html?view=diff&rev=1002&r1=1001&r2=1002
==============================================================================
--- trunk/config/timerules.html (original)
+++ trunk/config/timerules.html Wed May 30 13:45:28 2007
@@ -109,6 +109,23 @@
var c,d,e,t,p,q;
c = b ;
var found = 0;
+ var get_menuname = function(c){
+ var r,s;
+ for( r =0; r < c.length; r++){
+ s = unescape(c[r]);
+ if( s.match('comment=') ){return "VoiceMenu " + s.split('comment=')[1];}
+ }
+ return null;
+ }
+
+ var get_ringGroupName = function(c){
+ var r,s;
+ for( r =0; r < c.length; r++){
+ if( c[r].match('gui_ring_groupname=') ){return "RingGroup " + c[r].split('gui_ring_groupname=')[1];}
+ }
+ return b;
+ }
+
for( d in c ){
if(c.hasOwnProperty(d)){
if( d == TIMERULES_CATEGORY ){ e = c[d]; found = 1;}
@@ -118,6 +135,11 @@
p.menuname = (q)?q:d;
p.menucontextstring = d+",s,1";
voicemenus.push(p);
+ continue;
+ }
+ if( d.substr(0,17) == 'ringroups-custom-'){
+ ASTGUI.selectbox_push(_$('dest_match'), get_ringGroupName(c[d]) , d+",s,1");
+ ASTGUI.selectbox_push(_$('dest_nomatch'), get_ringGroupName(c[d]) , d+",s,1");
}
}
}
@@ -134,16 +156,6 @@
showlist_of_rules();
set_selectboxes();
-}
-
-
-function get_menuname(c){
- var r,s;
- for( r =0; r < c.length; r++){
- s = unescape(c[r]);
- if( s.match('comment=') ){return "VoiceMenu " + s.split('comment=')[1];}
- }
- return null;
}
More information about the asterisk-gui-commits
mailing list