pari: trunk r313 - /trunk/config/queues.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed Jan 31 23:56:23 MST 2007


Author: pari
Date: Thu Feb  1 00:56:22 2007
New Revision: 313

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=313
Log:
Fix: When a 'New' Queue is clicked, the new Extension's number is not being calculated properly (always returning 6000)

Modified:
    trunk/config/queues.html

Modified: trunk/config/queues.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/queues.html?view=diff&rev=313&r1=312&r2=313
==============================================================================
--- trunk/config/queues.html (original)
+++ trunk/config/queues.html Thu Feb  1 00:56:22 2007
@@ -362,8 +362,18 @@
 queuecallbacks.newcategory = function(t) {
 		var tmp = null;
 		$('save_q').disabled=false;
-		if ($('queues').stored_config.catbyname['general']){ tmp = objcopy($('queues').stored_config.catbyname['general']);	}
-		tmp.name = first_free_exten($('queues'), userbase);
+		if ($('queues').stored_config.catbyname['general']){ 
+				tmp = objcopy($('queues').stored_config.catbyname['general']);	
+				x = userbase ; 
+				for( var f=0; f < $('queues').options.length ; f++ ){
+						if( x < $('queues').options[f].innerHTML.split(' -- ')[0] )
+							break;
+						x++;
+				}				
+				tmp.name = x;
+		}else{
+			tmp.name = 6000 ;	// a default value if one is not defined in users.conf's general context
+		}
 
 		$('testmulti').innerHTML ="";
 		for (k=0;k< $('agents').length ;k++ ){



More information about the asterisk-gui-commits mailing list