pari: trunk r629 - /trunk/config/voicemail.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Mon Apr 9 14:26:35 MST 2007


Author: pari
Date: Mon Apr  9 16:26:35 2007
New Revision: 629

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=629
Log:
minor fixes

Modified:
    trunk/config/voicemail.html

Modified: trunk/config/voicemail.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/voicemail.html?view=diff&rev=629&r1=628&r2=629
==============================================================================
--- trunk/config/voicemail.html (original)
+++ trunk/config/voicemail.html Mon Apr  9 16:26:35 2007
@@ -43,7 +43,7 @@
 
 function changed_extension() {
 	var app;
-	tmp = $('extensions').value.split(']');
+	var tmp = $('extensions').value.split(']');
 	app = findapp($('extensions').stored_config.catbyname[tmp[0]].subfields[tmp[1]]['app']);
 	$('name').value = $('extensions').stored_config.catbyname[tmp[0]].subfields[tmp[1]]['name'];
 };
@@ -74,7 +74,7 @@
 callbacks.loaded = function() {
 	var whichexten = "";
 	merge_extensions($('extensions'), $('hiddenusers'));
-	for (x=0;x<$('extensions').options.length;x++) {
+	for (var x=0;x<$('extensions').options.length;x++) {
 		var tmp;
 		tmp = $('extensions').options[x].value.split(']');
 		if (tmp.length > 1) {
@@ -92,12 +92,15 @@
 	$('extensions').contentEditable = 'true';
 	$('extensions').disabled = 0;
 	$('extensions').current_category = specialcontext;
-	$('name').onkeydown = function(event){ this.oldvalue = this.value ; };
-	$('name').onkeyup = function(event){  
-		if(this.oldvalue == this.value){return true;} 
-		$('save').disabled = false; 
-		$('cancel').disabled = false; 
-	};	
+
+	add_event( $('name') , 'keydown', function(){ this.oldvalue = this.value ;} );
+
+	add_event( $('name') , 'keyup', function(){
+		if(this.oldvalue == this.value){return true;}
+		$('save').disabled = false;
+		$('cancel').disabled = false;
+	});
+
 	$('name').disabled = false;
 	if (whichexten.length ==0 ){
 		gui_alert("Looks like a default Voicemail Extension is not yet configured \n\n Please set an \'Extension for Checking messages\'  and \n click on 'save' button");
@@ -420,7 +423,7 @@
 	<tr>	<td align='center'></td>
 		<td align='center' colspan='2'>
 			<input type='button' id='save' value='Save' class="buttonbold">&nbsp;<input type='button' id='cancel' value='Cancel' class="buttonbold">
-		</td>				
+		</td>
 	</tr>
 </table>
 </div>



More information about the asterisk-gui-commits mailing list