pari: trunk r214 - /trunk/config/menus.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Thu Jan 4 13:50:00 MST 2007


Author: pari
Date: Thu Jan  4 14:49:59 2007
New Revision: 214

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=214
Log:
 *FIX* : The Steps in the voicemenus were not being sorted correctly

Modified:
    trunk/config/menus.html

Modified: trunk/config/menus.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/menus.html?view=diff&rev=214&r1=213&r2=214
==============================================================================
--- trunk/config/menus.html (original)
+++ trunk/config/menus.html Thu Jan  4 14:49:59 2007
@@ -704,6 +704,7 @@
 			var newoption = document.createElement("option");
 			newoption.text = format_step(voicemenusdata[current_context].extensions['s'][x]);
 			newoption.value = voicemenusdata[current_context].extensions['s'][x];
+			console.log("FOR '" + newoption.value +"' current_context is '" + current_context + "' and x is '" + x+"'" );
 			$('steps').options.add ( newoption );
 		}
 	}
@@ -715,8 +716,8 @@
 					priority_1 = tmp[1];
 					tmp = $('steps').options[y-1].value.split(",") ;
 					priority_2 = tmp[1];
-
-					  if (priority_2 > priority_1){
+					console.log("checking whether " + priority_2 +" is > " + priority_1);
+					  if (priority_2 - priority_1 > 0){
 							buffer = $('steps').options[y-1].value;
 							$('steps').options[y-1].value = $('steps').options[y].value;
 							$('steps').options[y].value = buffer;
@@ -726,6 +727,7 @@
 					  }
 				}
 	}
+
 
 	$('steps').disabled = false;
 	$('comment').disabled = false;



More information about the asterisk-gui-commits mailing list