espiceland: branch 2.0 r5078 - /branches/2.0/config/js/followme.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Thu Sep 2 10:33:56 CDT 2010


Author: espiceland
Date: Thu Sep  2 10:33:52 2010
New Revision: 5078

URL: http://svnview.digium.com/svn/asterisk-gui?view=rev&rev=5078
Log:
Added null checking to followMe_MiscFunctions.push_newdest(). Now we ignore the dial order if we're adding the first number. Fixes ASTGUI-116

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

Modified: branches/2.0/config/js/followme.js
URL: http://svnview.digium.com/svn/asterisk-gui/branches/2.0/config/js/followme.js?view=diff&rev=5078&r1=5077&r2=5078
==============================================================================
--- branches/2.0/config/js/followme.js (original)
+++ branches/2.0/config/js/followme.js Thu Sep  2 10:33:52 2010
@@ -342,12 +342,12 @@
 		if( tmp_number.contains('-') ) tmp_number = tmp_number.withOut('-');
 		var tmp_dest = tmp_number + ',' + tmp_seconds;
 
-		if( _$('newFM_Order_radio_after').checked ){
+		var tmp_last = CURRENT_DESTINATIONS.lastValue();
+		if( _$('newFM_Order_radio_after').checked || !tmp_last){
 			CURRENT_DESTINATIONS.push(tmp_dest);
 		}
 
-		if ( _$('newFM_Order_radio_alongWith').checked ){
-			var tmp_last = CURRENT_DESTINATIONS.lastValue();
+		if ( _$('newFM_Order_radio_alongWith').checked && tmp_last){
 			CURRENT_DESTINATIONS.replaceLastWith( tmp_last.split(',')[0] + '&' + tmp_dest );
 		}
 




More information about the asterisk-gui-commits mailing list