pari: trunk r472 - /trunk/config/backup.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Thu Mar 22 14:51:17 MST 2007


Author: pari
Date: Thu Mar 22 16:51:16 2007
New Revision: 472

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=472
Log:
If no previous backups are found ?

Modified:
    trunk/config/backup.html

Modified: trunk/config/backup.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/backup.html?view=diff&rev=472&r1=471&r2=472
==============================================================================
--- trunk/config/backup.html (original)
+++ trunk/config/backup.html Thu Mar 22 16:51:16 2007
@@ -52,17 +52,8 @@
 function showlist_of_files(){
 	var k = _$('bkp_files').innerHTML ;
 	var bkpfiles = k.split("<br>") ;
-	
+
 	clear_table();
-
-//	if( typeof bkpfiles[0] == "undefined"  || bkpfiles[0] == "" ){
-//		$('table_one').style.display="none";
-//		var newRow = $('bkpfilesTable').insertRow(-1);
-//		var newCell0 = newRow.insertCell(0);
-//		newCell0 .align = "center";
-//		newCell0 .innerHTML = "<BR><I>No Previous Backup Files !!</I><BR><BR> Please click on the 'Take a BackUp' button<BR> to  take a backup of the current system configuration<BR><BR>" ;
-//		return true;
-//	}
 
 	for( var i =0 ; i < bkpfiles.length ; i++){
 		if( typeof bkpfiles[i] == "undefined"  || bkpfiles[i] == "" ){
@@ -73,6 +64,19 @@
 
 		addrow_totable( bkpfiles[i], i );
 	}
+
+
+	var _bft = _$('bkpfilesTable') ;
+	
+	if( _bft.rows.length == 0 ){
+		_$('table_one').style.display="none";
+		var newRow = _bft.insertRow(-1);
+		var newCell0 = newRow.insertCell(0);
+		newCell0 .align = "center";
+		newCell0 .innerHTML = "<BR><I> No Previous Backup configurations found !!</I> <BR><BR>" +
+			"Please click on the 'Take a BackUp' button<BR> to  take a backup of the current system configuration<BR><BR>" ;
+	}
+
 	parent.loadscreen(this);
 }
 
@@ -93,6 +97,9 @@
 	var year = filedate[0].substr(0,4);
 	
 	var newRow = _$('bkpfilesTable').insertRow(-1);
+	newRow.style.backgroundColor='#FFFFFF';
+	newRow.onmouseover= function(){ this.style.backgroundColor='#F9F0D1'; };
+	newRow.onmouseout=function(){ this.style.backgroundColor='#FFFFFF'; };
 	
 	var newCell0 = newRow.insertCell(0);
 	newCell0 .innerHTML = i+1 ;



More information about the asterisk-gui-commits mailing list