rbrindley: branch 2.0 r4942 - /branches/2.0/config/upload_abe_overlay.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Jun 23 13:13:55 CDT 2009


Author: rbrindley
Date: Tue Jun 23 13:13:52 2009
New Revision: 4942

URL: http://svn.asterisk.org/svn-view/asterisk-gui?view=rev&rev=4942
Log:

- Added the following to the ABE Overlay page
	- <html>, <head>, <title>, and "Content-Type" <meta>
- moved js to the bottom


Modified:
    branches/2.0/config/upload_abe_overlay.html

Modified: branches/2.0/config/upload_abe_overlay.html
URL: http://svn.asterisk.org/svn-view/asterisk-gui/branches/2.0/config/upload_abe_overlay.html?view=diff&rev=4942&r1=4941&r2=4942
==============================================================================
--- branches/2.0/config/upload_abe_overlay.html (original)
+++ branches/2.0/config/upload_abe_overlay.html Tue Jun 23 13:13:52 2009
@@ -7,84 +7,89 @@
  * All Rights Reserved.
  *
 -->
-<script src="js/jquery.js"></script>
-<script src="js/astman.js"></script>
-<link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
-<style type="text/css">
+<html>
+<head>
+	<title>GUI Overlay Upload</title>
+	<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
 
-</style>
-<script>
+	<link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
+	<style type="text/css"></style>
+</head>
+<body bgcolor="EFEFEF">
+	<div class="iframeTitleBar"> 
+		Upload GUI overlay file
+		<span style="cursor: pointer; cursor: hand;" onclick="window.location.reload();" >&nbsp;<img src="images/refresh.png" title=" Refresh " border=0 >&nbsp;</span>
+	</div>
 
-starteduploading = 0;
-var overlay_upload_Path ;
-var overlay_disk_Path = '/var/lib/asterisk/gui-overlay/';
+	<tr  id='uploadOVERLAY_iframe_container'>
+		<td align=center>
+			<div style='margin-top: 20px; margin-left:30px'><B>&nbsp;Upload a overlay file&nbsp;</B></div>
+			<IFRAME id="uploadOVERLAY_iframe" src='upload_form.html' width="480" height="100" frameborder="0" border="0" marginheight="0" marginwidth="0"></IFRAME>
+		</td>
+	</tr>
 
-var localajaxinit = function(){
-	top.document.title = 'Upload GUI overlay file' ;
-};
+	</table>
 
-var onUploadForm_load = function(){
-	if(!top.sessionData.httpConf.postmappings_defined || !top.sessionData.httpConf.uploadPaths['backups'] ){
-		top.log.error('AG102');
-		$('#uploadOVERLAY_iframe_container').hide();
-		return ;
-	}
+	<script src="js/jquery.js"></script>
+	<script src="js/astman.js"></script>
+	<script>
 
-	overlay_upload_Path = top.sessionData.httpConf.uploadPaths['backups'] ;
-	var upload_action_path = (top.sessionData.httpConf.prefix) ? '/' + top.sessionData.httpConf.prefix + '/backups' : '/backups' ;
-	_$('uploadOVERLAY_iframe').contentWindow.document.getElementById('form22').action =  upload_action_path ;
-	_$('uploadOVERLAY_iframe').contentWindow.document.getElementById('UploadFORM_UPLOAD_BUTTON').value =  'Upload OverLay file' ;
-};
+	starteduploading = 0;
+	var overlay_upload_Path ;
+	var overlay_disk_Path = '/var/lib/asterisk/gui-overlay/';
+
+	var localajaxinit = function(){
+		top.document.title = 'Upload GUI overlay file' ;
+	};
+
+	var onUploadForm_load = function(){
+		if(!top.sessionData.httpConf.postmappings_defined || !top.sessionData.httpConf.uploadPaths['backups'] ){
+			top.log.error('AG102');
+			$('#uploadOVERLAY_iframe_container').hide();
+			return ;
+		}
+
+		overlay_upload_Path = top.sessionData.httpConf.uploadPaths['backups'] ;
+		var upload_action_path = (top.sessionData.httpConf.prefix) ? '/' + top.sessionData.httpConf.prefix + '/backups' : '/backups' ;
+		_$('uploadOVERLAY_iframe').contentWindow.document.getElementById('form22').action =  upload_action_path ;
+		_$('uploadOVERLAY_iframe').contentWindow.document.getElementById('UploadFORM_UPLOAD_BUTTON').value =  'Upload OverLay file' ;
+	};
 
 
-var onUploadForm_beforeUploading = function(){
-	if( !upload_Filename || !upload_Filename.toLowerCase().endsWith('.tar') ){
-		alert('overlay file needs to be a tar file !');
-		return false;
-	}
+	var onUploadForm_beforeUploading = function(){
+		if( !upload_Filename || !upload_Filename.toLowerCase().endsWith('.tar') ){
+			alert('overlay file needs to be a tar file !');
+			return false;
+		}
 
-	starteduploading = 1;
-	parent.ASTGUI.dialog.waitWhile('File Upload in progress, please wait ..');
-	return true;
-};
+		starteduploading = 1;
+		parent.ASTGUI.dialog.waitWhile('File Upload in progress, please wait ..');
+		return true;
+	};
 
 
-var onUploadForm_unload = function(){
-	if(!starteduploading){ return; }
-	if ( overlay_upload_Path.endsWith('/') ){ overlay_upload_Path = overlay_upload_Path.rChop('/'); }
+	var onUploadForm_unload = function(){
+		if(!starteduploading){ return; }
+		if ( overlay_upload_Path.endsWith('/') ){ overlay_upload_Path = overlay_upload_Path.rChop('/'); }
 
-	ASTGUI.feedback({ msg:'Overlay File Uploaded !!', showfor: 3 });
-	$('#uploadOVERLAY_iframe_container').hide();
-	parent.ASTGUI.dialog.waitWhile('unpacking overlay file');
+		ASTGUI.feedback({ msg:'Overlay File Uploaded !!', showfor: 3 });
+		$('#uploadOVERLAY_iframe_container').hide();
+		parent.ASTGUI.dialog.waitWhile('unpacking overlay file');
 
 
-	ASTGUI.systemCmd( 'rm '+ overlay_disk_Path + '* -rf' , function(){
-		ASTGUI.systemCmd( 'tar -xf '+ overlay_upload_Path + '/' + upload_Filename + ' -C ' + overlay_disk_Path, function(){
-			ASTGUI.systemCmd( 'rm -f '+ overlay_upload_Path + '/' + upload_Filename , function(){
-				ASTGUI.feedback({ msg:'Done !!', showfor: 3 });
-				var t = top.window.location.href;
-				top.window.location.replace(t,true);
+		ASTGUI.systemCmd( 'rm '+ overlay_disk_Path + '* -rf' , function(){
+			ASTGUI.systemCmd( 'tar -xf '+ overlay_upload_Path + '/' + upload_Filename + ' -C ' + overlay_disk_Path, function(){
+				ASTGUI.systemCmd( 'rm -f '+ overlay_upload_Path + '/' + upload_Filename , function(){
+					ASTGUI.feedback({ msg:'Done !!', showfor: 3 });
+					var t = top.window.location.href;
+					top.window.location.replace(t,true);
+				});
 			});
 		});
-	});
-	return;
-};
+		return;
+	};
 
 
-</script>
-<body bgcolor="EFEFEF">
-<div class="iframeTitleBar"> 
-	Upload GUI overlay file
-	<span style="cursor: pointer; cursor: hand;" onclick="window.location.reload();" >&nbsp;<img src="images/refresh.png" title=" Refresh " border=0 >&nbsp;</span>
-</div>
-
-<tr  id='uploadOVERLAY_iframe_container'>
-	<td align=center>
-		<div style='margin-top: 20px; margin-left:30px'><B>&nbsp;Upload a overlay file&nbsp;</B></div>
-		<IFRAME id="uploadOVERLAY_iframe" src='upload_form.html' width="480" height="100" frameborder="0" border="0" marginheight="0" marginwidth="0"></IFRAME>
-	</td>
-</tr>
-
-</table>
-
+	</script>
 </body>
+</html>




More information about the asterisk-gui-commits mailing list