pari: trunk r998 - /trunk/config/scripts/astman.js

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed May 30 09:47:04 MST 2007


Author: pari
Date: Wed May 30 11:47:03 2007
New Revision: 998

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=998
Log:
better getAction

Modified:
    trunk/config/scripts/astman.js

Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=998&r1=997&r2=998
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Wed May 30 11:47:03 2007
@@ -60,15 +60,10 @@
 			return q.split('exten=')[1].split(',')[1];
 		},
 
-		getAction: function(q){ // q can be the the whole contextLine or just 'parseContextLine.read(contextline)[1]' 
-			if( q.match('exten=') ){ 
-				var r = q.split('exten=')[1] ;
-			}else{
-				var r = q;
-			}
-			var f = r.indexOf(",");
-			var g = r.indexOf("," , f+1 );
-			return r.substr(g+1);
+		getAction: function(q){ // q can be the the whole contextLine or just 'parseContextLine.read(contextline)[1]'
+			var t = q.split(',');
+			t.splice(0,2);
+			return t.join(',');
 		}
 	},
 



More information about the asterisk-gui-commits mailing list