rbrindley: branch 2.0 r4509 - /branches/2.0/config/js/timeintervals.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Wed Feb 11 11:44:48 CST 2009


Author: rbrindley
Date: Wed Feb 11 11:44:48 2009
New Revision: 4509

URL: http://svn.digium.com/svn-view/asterisk-gui?view=rev&rev=4509
Log:
- changed all '|'s to ','s in Time Intervals javascript

Modified:
    branches/2.0/config/js/timeintervals.js

Modified: branches/2.0/config/js/timeintervals.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/timeintervals.js?view=diff&rev=4509&r1=4508&r2=4509
==============================================================================
--- branches/2.0/config/js/timeintervals.js (original)
+++ branches/2.0/config/js/timeintervals.js Wed Feb 11 11:44:48 2009
@@ -89,7 +89,7 @@
 				var tmp_months = _$('edit_ti_month').value ;
 			}
 
-		ti_time_str = tmp_timerange + '|' + tmp_daysofweek + '|' + tmp_daysofmonth + '|' + tmp_months ;
+		ti_time_str = tmp_timerange + ',' + tmp_daysofweek + ',' + tmp_daysofmonth + ',' + tmp_months ;
 
 		var u = new listOfActions('extensions.conf') ;
 		if( isNewTI == false ){
@@ -98,11 +98,11 @@
 			////////////////////////////////////
 			var EXT_CNF = config2json({filename:'extensions.conf', usf:0 }) ; 
 			for( var ct in EXT_CNF){ if( EXT_CNF.hasOwnProperty(ct) ){
-				// update any lines in any [DID_Trunkx] that are like "include = DID_trunkx_timeinterval_'a'| ..."
+				// update any lines in any [DID_Trunkx] that are like "include = DID_trunkx_timeinterval_'a', ..."
 				if( ct.beginsWith(ASTGUI.contexts.TrunkDIDPrefix) && !ct.contains( '_' + ASTGUI.contexts.TimeIntervalPrefix ) ){
 					var this_trunk_mainDID = EXT_CNF[ct] ;
 					this_trunk_mainDID.each(function(this_line){
-						if( this_line.beginsWith('include=') && this_line.contains(ASTGUI.contexts.TrunkDIDPrefix) && this_line.contains( OLD_TI + '|${' ) ){
+						if( this_line.beginsWith('include=') && this_line.contains(ASTGUI.contexts.TrunkDIDPrefix) && this_line.contains( OLD_TI + ',${' ) ){
 							u.new_action( 'update' , ct , 'include' , this_line.afterChar('=').replaceXY(OLD_TI,ti_name) , this_line.afterChar('=') ) ;
 						}
 					});
@@ -134,11 +134,11 @@
 		u.new_action('delete' , 'globals' , t , '' , '') ;
 		var EXT_CNF = config2json({filename:'extensions.conf', usf:0 }) ; 
 		for( var ct in EXT_CNF){ if( EXT_CNF.hasOwnProperty(ct) ){
-			// delete any lines in any [DID_Trunkx] that are like "include = DID_trunkx_timeinterval_'a'| ..."
+			// delete any lines in any [DID_Trunkx] that are like "include = DID_trunkx_timeinterval_'a', ..."
 			if( ct.beginsWith(ASTGUI.contexts.TrunkDIDPrefix) && !ct.contains(ASTGUI.contexts.TimeIntervalPrefix) ){
 				var this_trunk_mainDID = EXT_CNF[ct] ;
 				this_trunk_mainDID.each(function(this_line){
-					if( this_line.beginsWith('include=') && this_line.contains(ASTGUI.contexts.TrunkDIDPrefix) && this_line.contains( ASTGUI.contexts.TimeIntervalPrefix + a+'|${' ) ){
+					if( this_line.beginsWith('include=') && this_line.contains(ASTGUI.contexts.TrunkDIDPrefix) && this_line.contains( ASTGUI.contexts.TimeIntervalPrefix + a+',${' ) ){
 						u.new_action( 'delete' , ct , 'include' , '' , this_line.afterChar('=') ) ;
 					}
 				});
@@ -158,9 +158,9 @@
 /*
 		sessionData.pbxinfo['timebasedRules'][timebasedrule-custom-2] = {
 			label : 'LabelForThisRule',
-			matches : [ '00:00-23:59|*|25|dec', '00:00-23:59|*|1|jan', '00:00-23:59|*|4|jul' ], // by a set of Dates
+			matches : [ '00:00-23:59,*,25,dec', '00:00-23:59,*,1,jan', '00:00-23:59,*,4,jul' ], // by a set of Dates
 				OR
-			matches : [ '00:00-23:59|sun-sat|*|*'], // - by Day of Week, matches.length == 1
+			matches : [ '00:00-23:59,sun-sat,*,*'], // - by Day of Week, matches.length == 1
 			ifMatched : 'voicemenu-custom-1,s,1',
 			ifNotMatched : 'default,6000,1'
 		}
@@ -175,7 +175,7 @@
 		ASTGUI.updateFieldToValue( 'edit_ti_name', a ); // name of time interval
 		ASTGUI.resetTheseFields( ['edit_ti_starttime', 'edit_ti_endtime', 'edit_ti_dayofweek_start', 'edit_ti_dayofweek_end', 'edit_ti_from_date', 'edit_ti_month' ] );
 
-		var PIECES = TI_LIST[a].split('|') ;
+		var PIECES = TI_LIST[a].split(',') ;
 		if( PIECES[0] != '*' ){
 			_$('edit_ti_entireday').checked = false ;
 			ASTGUI.updateFieldToValue( 'edit_ti_starttime', ASTGUI.miscFunctions.asteriskTime_to_AMPM(PIECES[0].split('-')[0] ) );




More information about the asterisk-gui-commits mailing list