rbrindley: branch 2.0 r4912 - /branches/2.0/config/language.html

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


Author: rbrindley
Date: Tue Jun 23 12:30:51 2009
New Revision: 4912

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

- Added the following to the Language page
	- HTML 4.01 DOCTYPE
	- <html>, <head>, <title>, and "Content-Type" <meta>
- moved js to the bottom


Modified:
    branches/2.0/config/language.html

Modified: branches/2.0/config/language.html
URL: http://svn.asterisk.org/svn-view/asterisk-gui/branches/2.0/config/language.html?view=diff&rev=4912&r1=4911&r2=4912
==============================================================================
--- branches/2.0/config/language.html (original)
+++ branches/2.0/config/language.html Tue Jun 23 12:30:51 2009
@@ -18,97 +18,19 @@
  * at the top of the source tree.
  *
 -->
-<script src="js/jquery.js"></script>
-<script src="js/astman.js"></script>
-<script src="js/jquery.tooltip.js"></script>
-<link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
-<style type="text/css">
+<html>
+<head>
+	<title>Language Preferences</title>
+	<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
 
-</style>
-<script>
-
-function localajaxinit(){
-	(function(){
-		var fd_text = (parent.sessionData.PLATFORM.isAA50 || parent.sessionData.PLATFORM.isABE ) ? 'Factory Reset' : 'Reset Configuration' ;
-		var t = [
-			{url:'preferences.html', desc:'General Preferences'} ,
-			{url:'#', desc:'Language', selected:true } ,
-			{url:'password.html', desc:'Change Password'}
-		];
-		if(parent.sessionData.PLATFORM.isAA50 ) {
-			t.push({url:'reset_defaults.html', desc: fd_text });
-		}
-		t.push( {url:'reboot.html', desc:'Reboot' } );
-		t.push( {url:'flipadvanced.html', desc:'Advanced Options' } );
-		ASTGUI.tabbedOptions( _$('tabbedMenu') , t );
-
-	})();
-	top.document.title = 'Language preferences' ;
-	var c = config2json({filename: 'users.conf', usf:1});
-	if(c.hasOwnProperty('general')){
-		ASTGUI.updateFieldToValue( 'language' , c['general'].getProperty('language') );
-	}
-};
-
-
-function save_changes(){
-	var u = new listOfSynActions('users.conf');
-		u.new_action('update', 'general' , 'language', ASTGUI.getFieldValue('language') );
-	u.callActions();
-	check_ifNeedsDownloading_andDownload();
-};
-
-var check_ifNeedsDownloading_andDownload = function(){
-	var download_selectedLangPack = function(){
-		var check_ifDone = function(){
-			var t = ASTGUI.loadHTML(top.sessionData.directories.output_SysInfo);
-			if ( t.contains('DoneDoneDone') ){
-				ASTGUI.feedback({msg:' Donwloaded Sound Pack !!', showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
-				setTimeout( function(){
-					parent.ASTGUI.dialog.hide();
-					ASTGUI.feedback({msg:' Updated language preferences !!', showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
-					window.location.reload();
-				}, 2000 );
-				return;
-			}
-			setTimeout( check_ifDone , 10000 );
-		};
-		var after = function(){ setTimeout( check_ifDone , 10000 ); };
-		var l = ASTGUI.getFieldValue('language')
-		var platform = (parent.sessionData.PLATFORM.isAA50) ? 'AA50' : 'none';
-		parent.ASTGUI.dialog.waitWhile(' Downloading Language ...');
-		parent.ASTGUI.systemCmd( top.sessionData.directories.script_dldsoundpack + ' ' + l + ' ' + platform + ' &', after);
-	};
-
- 	var check_ifDownloadNeeded = function(){
-		parent.ASTGUI.dialog.waitWhile(' Checking if the selected Language Sounds are installed ...');
-		if( ASTGUI.getFieldValue('language') != 'en' ){
-			ASTGUI.listSystemFiles( top.sessionData.directories.Sounds +  ASTGUI.getFieldValue('language') + '/' , function(a){
-				if( a.length < 15 ){
-					download_selectedLangPack();
-				}else{
-					parent.ASTGUI.dialog.hide();
-					ASTGUI.feedback({msg:' Updated language preferences !!', showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
-					window.location.reload();
-				}
-			});
-		}else{
-			parent.ASTGUI.dialog.hide();
-			ASTGUI.feedback({msg:' Updated language preferences !!', showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
-			window.location.reload();
-		}
-	};
-
-	check_ifDownloadNeeded();
-};
-
-
-</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"> 
-	Language Preferences
-	<span class='refresh_icon' onclick="window.location.reload();" >&nbsp;<img src="images/refresh.png" title=" Refresh " border=0 >&nbsp;</span>
-</div>
+	<div class="iframeTitleBar"> 
+		Language Preferences
+		<span class='refresh_icon' onclick="window.location.reload();" >&nbsp;<img src="images/refresh.png" title=" Refresh " border=0 >&nbsp;</span>
+	</div>
 
 	<center><div id="tabbedMenu"></div></center>
 
@@ -146,5 +68,87 @@
 		</tr>
 	</table>-->
 
+	<script src="js/jquery.js"></script>
+	<script src="js/astman.js"></script>
+	<script src="js/jquery.tooltip.js"></script>
+	<script>
 
+	function localajaxinit(){
+		(function(){
+			var fd_text = (parent.sessionData.PLATFORM.isAA50 || parent.sessionData.PLATFORM.isABE ) ? 'Factory Reset' : 'Reset Configuration' ;
+			var t = [
+				{url:'preferences.html', desc:'General Preferences'} ,
+				{url:'#', desc:'Language', selected:true } ,
+				{url:'password.html', desc:'Change Password'}
+			];
+			if(parent.sessionData.PLATFORM.isAA50 ) {
+				t.push({url:'reset_defaults.html', desc: fd_text });
+			}
+			t.push( {url:'reboot.html', desc:'Reboot' } );
+			t.push( {url:'flipadvanced.html', desc:'Advanced Options' } );
+			ASTGUI.tabbedOptions( _$('tabbedMenu') , t );
+
+		})();
+		top.document.title = 'Language preferences' ;
+		var c = config2json({filename: 'users.conf', usf:1});
+		if(c.hasOwnProperty('general')){
+			ASTGUI.updateFieldToValue( 'language' , c['general'].getProperty('language') );
+		}
+	};
+
+
+	function save_changes(){
+		var u = new listOfSynActions('users.conf');
+			u.new_action('update', 'general' , 'language', ASTGUI.getFieldValue('language') );
+		u.callActions();
+		check_ifNeedsDownloading_andDownload();
+	};
+
+	var check_ifNeedsDownloading_andDownload = function(){
+		var download_selectedLangPack = function(){
+			var check_ifDone = function(){
+				var t = ASTGUI.loadHTML(top.sessionData.directories.output_SysInfo);
+				if ( t.contains('DoneDoneDone') ){
+					ASTGUI.feedback({msg:' Donwloaded Sound Pack !!', showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
+					setTimeout( function(){
+						parent.ASTGUI.dialog.hide();
+						ASTGUI.feedback({msg:' Updated language preferences !!', showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
+						window.location.reload();
+					}, 2000 );
+					return;
+				}
+				setTimeout( check_ifDone , 10000 );
+			};
+			var after = function(){ setTimeout( check_ifDone , 10000 ); };
+			var l = ASTGUI.getFieldValue('language')
+			var platform = (parent.sessionData.PLATFORM.isAA50) ? 'AA50' : 'none';
+			parent.ASTGUI.dialog.waitWhile(' Downloading Language ...');
+			parent.ASTGUI.systemCmd( top.sessionData.directories.script_dldsoundpack + ' ' + l + ' ' + platform + ' &', after);
+		};
+
+		var check_ifDownloadNeeded = function(){
+			parent.ASTGUI.dialog.waitWhile(' Checking if the selected Language Sounds are installed ...');
+			if( ASTGUI.getFieldValue('language') != 'en' ){
+				ASTGUI.listSystemFiles( top.sessionData.directories.Sounds +  ASTGUI.getFieldValue('language') + '/' , function(a){
+					if( a.length < 15 ){
+						download_selectedLangPack();
+					}else{
+						parent.ASTGUI.dialog.hide();
+						ASTGUI.feedback({msg:' Updated language preferences !!', showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
+						window.location.reload();
+					}
+				});
+			}else{
+				parent.ASTGUI.dialog.hide();
+				ASTGUI.feedback({msg:' Updated language preferences !!', showfor: 3 , color: '#5D7CBA', bgcolor: '#FFFFFF'}) ;
+				window.location.reload();
+			}
+		};
+
+		check_ifDownloadNeeded();
+	};
+
+
+	</script>
 </body>
+</html>




More information about the asterisk-gui-commits mailing list