pari: trunk r455 - in /trunk/config: backup.html incoming.html localexts.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Tue Mar 20 13:23:35 MST 2007


Author: pari
Date: Tue Mar 20 15:23:35 2007
New Revision: 455

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=455
Log:
trying to finish this optimizing thing

Modified:
    trunk/config/backup.html
    trunk/config/incoming.html
    trunk/config/localexts.html

Modified: trunk/config/backup.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/backup.html?view=diff&rev=455&r1=454&r2=455
==============================================================================
--- trunk/config/backup.html (original)
+++ trunk/config/backup.html Tue Mar 20 15:23:35 2007
@@ -45,15 +45,15 @@
 }
 
 function removebkpfile(){
-	$('message_text').innerHTML = "Please wait while the system <BR> Generates a Backup ... ";
-	$('status_message').style.display="block";
+	_$('message_text').innerHTML = "Please wait while the system <BR> Generates a Backup ... ";
+	_$('status_message').style.display="block";
 	//remove bkpfile on server 
 	parent.astmanEngine.run_tool("/bin/rm " + bkp_path+ "conf_* -f", download_bkp );
 }
 
 
 function showremovebkpfile(){
-	$('status_message').style.display='none';
+	_$('status_message').style.display='none';
 //	$('message_text').innerHTML =  "<A href=\"#\" onclick=\"removebkpfile()\">I have downloaded the file</A><BR><BR>" + "<A href=\"./bkps/"+ bkpfile  +"\" onclick=\"showremovebkpfile()\">ReDownload</A>";
 }
 
@@ -61,20 +61,20 @@
 
 function download_bkp(){
 
-		var today=new Date()
-		var year = today.getFullYear();
-		var month = addzero(today.getMonth() + 1);
-		var day = addzero(today.getDate());
-		var hour =addzero(today.getHours());
-		var minute =addzero(today.getMinutes());
-		var seconds =addzero(today.getSeconds());
-		bkpfile =  "conf_" + year + month + day + hour  + minute +seconds  +".tar";
-		parent.astmanEngine.run_tool("/bin/tar -cf "+ bkp_path + bkpfile +" /etc/asterisk/", callback=function(){
-							$('status').innerHTML = " <I> Finished generating Backup ! </I>";
-							$('status_message').style.display="none";
-							window.location.href = "./bkps/"+ bkpfile ;
-							//$('message_text').innerHTML = "<A href=\"./bkps/"+ bkpfile  +"\" onclick=\"showremovebkpfile()\">Click Here to Download</A>";
-		} );
+	var today=new Date()
+	var year = today.getFullYear();
+	var month = addzero(today.getMonth() + 1);
+	var day = addzero(today.getDate());
+	var hour =addzero(today.getHours());
+	var minute =addzero(today.getMinutes());
+	var seconds =addzero(today.getSeconds());
+	bkpfile =  "conf_" + year + month + day + hour  + minute +seconds  +".tar";
+	parent.astmanEngine.run_tool("/bin/tar -cf "+ bkp_path + bkpfile +" /etc/asterisk/", callback=function(){
+		_$('status').innerHTML = " <I> Finished generating Backup ! </I>";
+		_$('status_message').style.display="none";
+		window.location.href = "./bkps/"+ bkpfile ;
+		//$('message_text').innerHTML = "<A href=\"./bkps/"+ bkpfile  +"\" onclick=\"showremovebkpfile()\">Click Here to Download</A>";
+	} );
 }
 
 </script>

Modified: trunk/config/incoming.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/incoming.html?view=diff&rev=455&r1=454&r2=455
==============================================================================
--- trunk/config/incoming.html (original)
+++ trunk/config/incoming.html Tue Mar 20 15:23:35 2007
@@ -144,24 +144,24 @@
 }
 
 function addrowtotable(a,b,c,d){	// a is pattern, b is DID_trunk, c is action, d is priority
-		var crt = _$('callingRulesTable') ;
-		var sno = crt.rows.length + 1;
-		var newRow = crt.insertRow(-1);
-		newRow.id = "row" + sno; 
-		
-		var newCell0 = newRow.insertCell(0);
-		newCell0.innerHTML = sno ;
-		newCell0.align="center";
-		newCell0.width=35;
-
-		var newCell1 = newRow.insertCell(1);
-		newCell1.innerHTML =  convert_tohuman(a,b,c) ; 
-
-		var newCell2 = newRow.insertCell(2);
-		newCell2.innerHTML = "<A href=\"#\" onclick=\"edit_incomingrule('"+ a +"', '"+ b +"', '" + c + "','" + d+"')\">Edit</A>&nbsp;&nbsp;<A href=\"#\" onclick=\"delete_incomingrule('"+ a +"', '"+ b +"', '" + c + "','" + d+"')\">Delete</A>";
-		newCell2.width=75;
-		newCell2.align="center";
-		return true;
+	var crt = _$('callingRulesTable') ;
+	var sno = crt.rows.length + 1;
+	var newRow = crt.insertRow(-1);
+	newRow.id = "row" + sno; 
+	
+	var newCell0 = newRow.insertCell(0);
+	newCell0.innerHTML = sno ;
+	newCell0.align="center";
+	newCell0.width=35;
+
+	var newCell1 = newRow.insertCell(1);
+	newCell1.innerHTML =  convert_tohuman(a,b,c) ; 
+
+	var newCell2 = newRow.insertCell(2);
+	newCell2.innerHTML = "<A href=\"#\" onclick=\"edit_incomingrule('"+ a +"', '"+ b +"', '" + c + "','" + d+"')\">Edit</A>&nbsp;&nbsp;<A href=\"#\" onclick=\"delete_incomingrule('"+ a +"', '"+ b +"', '" + c + "','" + d+"')\">Delete</A>";
+	newCell2.width=75;
+	newCell2.align="center";
+	return true;
 }
 
 
@@ -425,31 +425,28 @@
 
 
 function delete_incomingrule(a,b,c,d){ // a is pattern, b is DID_trunk, c is action, d is priority
-	t=confirm("Are you sure you want to delete this Incoming Calling Rule?");
-	if(t == false){ 
-		return true; 				
-	}
+	if( !confirm("Are you sure you want to delete this Incoming Calling Rule?") ){ return true; }
 
 	var tmp_match = a+","+d+","+c ;
-		var opt = {
-			method: 'get',
-			asynchronous: true,
-			onSuccess: function(t) { 									
-				// add this to the global object
-				delete didtrunks[b][a];
-				refreshtable();
-			},
-			onFailure: function(t) {
-				gui_alert("Config Error: " + t.status + ": " + t.statusText);
-			}
-		};
-		var uri = build_action('delete',0, b, "exten" ,"", tmp_match);
-		if( a == "_X." ){
-			var tmp2_match = "s," + d + "," + c ;
-			uri += build_action('delete',1,b,"exten","", tmp2_match);
-		}
-		opt.parameters="action=updateconfig&srcfilename=" + encodeURIComponent("extensions.conf") + "&dstfilename=" + encodeURIComponent("extensions.conf") + uri;
-		var tmp = new Ajax.Request("../../rawman", opt);
+	var opt = {
+		method: 'get',
+		asynchronous: true,
+		onSuccess: function(t) { 									
+			// add this to the global object
+			delete didtrunks[b][a];
+			refreshtable();
+		},
+		onFailure: function(t) {
+			gui_alert("Config Error: " + t.status + ": " + t.statusText);
+		}
+	};
+	var uri = build_action('delete',0, b, "exten" ,"", tmp_match);
+	if( a == "_X." ){
+		var tmp2_match = "s," + d + "," + c ;
+		uri += build_action('delete',1,b,"exten","", tmp2_match);
+	}
+	opt.parameters="action=updateconfig&srcfilename=" + encodeURIComponent("extensions.conf") + "&dstfilename=" + encodeURIComponent("extensions.conf") + uri;
+	var tmp = new Ajax.Request("../../rawman", opt);
 }
 
 
@@ -458,10 +455,10 @@
 	showdiv_statusmessage();
 	setWindowTitle("Incoming Calls");
 	for (var x =0; x < focus_fields.length; x++ ) {
-		$(focus_fields[x]).onfocus = function(){this.className = 'input9_hilight';}
-		$(focus_fields[x]).onblur = function(){this.className = 'input9';}
-	}
-	parent.astmanEngine.config2list("users.conf", $('users'), new Array(), user_callbacks);
+		_$(focus_fields[x]).onfocus = function(){this.className = 'input9_hilight';}
+		_$(focus_fields[x]).onblur = function(){this.className = 'input9';}
+	}
+	parent.astmanEngine.config2list("users.conf", _$('users'), new Array(), user_callbacks);
 }
 
 

Modified: trunk/config/localexts.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/localexts.html?view=diff&rev=455&r1=454&r2=455
==============================================================================
--- trunk/config/localexts.html (original)
+++ trunk/config/localexts.html Tue Mar 20 15:23:35 2007
@@ -97,18 +97,18 @@
 
 
 function update_spae(){
-	var lel = $('localextenlength').value;
-	var ub = $('userbase').value ;
-
-	if( lel == "0" ) { return; }
-
-	if( lel == ub.length ) { 
+	var lel = $('localextenlength');
+	var ub = $('userbase') ;
+
+	if( lel.value == "0" ) { return; }
+
+	if( lel.value == ub.value.length ) { 
 		return;
-	}else if( lel < ub.length ){
-		ub = ub.substr(0,lel);
+	}else if( lel.value < ub.value.length ){
+		ub.value = ub.value.substr(0,lel);
 		return;
-	}else if( lel > ub.length ){
-		while ( lel != ub.length  ){ ub = ub+ "0" ; }
+	}else if( lel.value > ub.value.length ){
+		while ( lel.value != ub.value.length  ){ ub.value = ub.value + "0" ; }
 	}
 }
 



More information about the asterisk-gui-commits mailing list