rbrindley: branch 2.0 r4930 - /branches/2.0/config/smtp_settings.html
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Tue Jun 23 12:59:21 CDT 2009
Author: rbrindley
Date: Tue Jun 23 12:59:17 2009
New Revision: 4930
URL: http://svn.asterisk.org/svn-view/asterisk-gui?view=rev&rev=4930
Log:
- Added the following to the STMP page
- <html>, <head>, <title>, and "Content-Type" <meta>
- moved js to the bottom
Modified:
branches/2.0/config/smtp_settings.html
Modified: branches/2.0/config/smtp_settings.html
URL: http://svn.asterisk.org/svn-view/asterisk-gui/branches/2.0/config/smtp_settings.html?view=diff&rev=4930&r1=4929&r2=4930
==============================================================================
--- branches/2.0/config/smtp_settings.html (original)
+++ branches/2.0/config/smtp_settings.html Tue Jun 23 12:59:17 2009
@@ -13,117 +13,123 @@
* agreement you accepted when obtained and/or activated
* the Digium product containing this file.
-->
-<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">
-</style>
-<script>
+<html>
+<head>
+ <title>STMP Settings</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
-var localajaxinit = function(){
- (function (){
- var t = [
- {url:'voicemail.html', desc:'General Settings'} ,
- {url:'emailsettings.html', desc:'Email Settings for VoiceMails'},
- {url:'smtp_settings.html', desc:'SMTP Settings', selected:true }
- ];
- ASTGUI.tabbedOptions( _$('tabbedMenu') , t);
- })();
+ <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
+ <style type="text/css"></style>
+</head>
+<body bgcolor="EFEFEF">
+ <div class="iframeTitleBar">
+ SMTP Settings for Voicemail notification Emails
+ <span class='refresh_icon' onclick="window.location.reload();" > <img src="images/refresh.png" title=" Refresh " border=0 > </span>
+ </div>
- top.document.title = "SMTP Settings";
+ <table width=95% cellpadding=0 cellspacing=0 border=0><tr><td align=center><div id="tabbedMenu"></div></td></tr></table>
- ASTGUI.domActions.enableDisableByCheckBox('chk_UseAuthentication', ['AuthUser','AuthPass'] ) ;
+ <div class='lite_Heading'> SMTP Settings </div>
- var c = config2json({filename:ASTGUI.globals.configfile , usf:1});
- if( c['general'] ){
- _$('smtp_server').value = (c['general']['smtp_server']) ? c['general']['smtp_server'] : '';
- _$('smtp_port').value = (c['general']['smtp_port']) ? c['general']['smtp_port'] : '';
+ <table align=center border=0 cellpadding=2 cellspacing=1>
+ <tr> <td align=right>Smtp server <img src="images/tooltip_info.gif" tip="en,voicemail,16" class='tooltipinfo'>:</td>
+ <td> <input id="smtp_server"></td>
+ </tr>
+ <tr> <td align=right>Port <img src="images/tooltip_info.gif" tip="en,voicemail,17" class='tooltipinfo'>:</td>
+ <td> <input id="smtp_port"></td>
+ </tr>
+ <tr> <td align=right>Use SMTP Authentication :</td>
+ <td> <input id="chk_UseAuthentication" type='checkbox'></td>
+ </tr>
+ <tr> <td align=right>Auth User :</td>
+ <td> <input id="AuthUser"></td>
+ </tr>
+ <tr> <td align=right>Auth Password :</td>
+ <td> <input id="AuthPass"></td>
+ </tr>
+ <tr> <td colspan=2 align="center">
+ <div height="10"></div><BR>
+ <span class='guiButtonCancel' onclick='window.location.reload();'>Cancel</span>
+ <span class='guiButtonEdit' onclick='apply_changes();'>Save</span>
+ </td>
+ </tr>
+ </table>
- if(c['general']['smtp_AuthUser'] ){
- _$('chk_UseAuthentication').checked = true ;
- _$('AuthUser').value = c['general']['smtp_AuthUser'] ;
- _$('AuthPass').value = (c['general']['smtp_AuthPass']) ? c['general']['smtp_AuthPass'] : '';
- }else{
- _$('chk_UseAuthentication').checked = false ;
+ <script src="js/jquery.js"></script>
+ <script src="js/astman.js"></script>
+ <script src="js/jquery.tooltip.js"></script>
+ <script>
+
+ var localajaxinit = function(){
+ (function (){
+ var t = [
+ {url:'voicemail.html', desc:'General Settings'} ,
+ {url:'emailsettings.html', desc:'Email Settings for VoiceMails'},
+ {url:'smtp_settings.html', desc:'SMTP Settings', selected:true }
+ ];
+ ASTGUI.tabbedOptions( _$('tabbedMenu') , t);
+ })();
+
+ top.document.title = "SMTP Settings";
+
+ ASTGUI.domActions.enableDisableByCheckBox('chk_UseAuthentication', ['AuthUser','AuthPass'] ) ;
+
+ var c = config2json({filename:ASTGUI.globals.configfile , usf:1});
+ if( c['general'] ){
+ _$('smtp_server').value = (c['general']['smtp_server']) ? c['general']['smtp_server'] : '';
+ _$('smtp_port').value = (c['general']['smtp_port']) ? c['general']['smtp_port'] : '';
+
+ if(c['general']['smtp_AuthUser'] ){
+ _$('chk_UseAuthentication').checked = true ;
+ _$('AuthUser').value = c['general']['smtp_AuthUser'] ;
+ _$('AuthPass').value = (c['general']['smtp_AuthPass']) ? c['general']['smtp_AuthPass'] : '';
+ }else{
+ _$('chk_UseAuthentication').checked = false ;
+ }
+ _$('chk_UseAuthentication').updateStatus();
}
- _$('chk_UseAuthentication').updateStatus();
+
}
-}
+
+ function apply_changes(){
+ var u = new listOfSynActions(ASTGUI.globals.configfile) ;
+ u.new_action('update', 'general', 'smtp_server', _$('smtp_server').value );
+ u.new_action('update', 'general', 'smtp_port', _$('smtp_port').value );
+ if( _$('chk_UseAuthentication').checked ){
+ u.new_action('update', 'general', 'smtp_AuthUser', _$('AuthUser').value );
+ u.new_action('update', 'general', 'smtp_AuthPass', _$('AuthPass').value );
+ }
+ u.callActions();
+
+ var smtpport = ( parseInt(_$('smtp_port').value, 10 ) ) ? _$('smtp_port').value : '25' ;
+ var cmd1 = "echo \"mailhub=" + _$('smtp_server').value + ":" + smtpport + "\" > /etc/ssmtp/ssmtp.conf ";
+ var cmd2 = "echo \"FromLineOverride=YES\" >> /etc/ssmtp/ssmtp.conf ";
+ var cmd3 = "" , cmd4 = "";
+
+ if( _$('chk_UseAuthentication').checked ){
+ cmd3 = "echo \"AuthUser=" + _$('AuthUser').value + "\" >> /etc/ssmtp/ssmtp.conf ";
+ cmd4 = "echo \"AuthPass=" + _$('AuthPass').value + "\" >> /etc/ssmtp/ssmtp.conf ";
+ }
+
+ parent.ASTGUI.systemCmd( cmd1, function(){
+ parent.ASTGUI.systemCmd( cmd2, function(){
+ if(cmd3){
+ parent.ASTGUI.systemCmd( cmd3, function(){
+ parent.ASTGUI.systemCmd( cmd4, function(){
+ ASTGUI.feedback( { msg:'Changes Saved !! ', showfor:2 });
+ window.location.reload();
+ });
+ });
+ }else{
+ ASTGUI.feedback( { msg:'Changes Saved !! ', showfor:2 });
+ window.location.reload();
+ }
+ });
+ });
+ }
-function apply_changes(){
- var u = new listOfSynActions(ASTGUI.globals.configfile) ;
- u.new_action('update', 'general', 'smtp_server', _$('smtp_server').value );
- u.new_action('update', 'general', 'smtp_port', _$('smtp_port').value );
- if( _$('chk_UseAuthentication').checked ){
- u.new_action('update', 'general', 'smtp_AuthUser', _$('AuthUser').value );
- u.new_action('update', 'general', 'smtp_AuthPass', _$('AuthPass').value );
- }
- u.callActions();
-
- var smtpport = ( parseInt(_$('smtp_port').value, 10 ) ) ? _$('smtp_port').value : '25' ;
- var cmd1 = "echo \"mailhub=" + _$('smtp_server').value + ":" + smtpport + "\" > /etc/ssmtp/ssmtp.conf ";
- var cmd2 = "echo \"FromLineOverride=YES\" >> /etc/ssmtp/ssmtp.conf ";
- var cmd3 = "" , cmd4 = "";
-
- if( _$('chk_UseAuthentication').checked ){
- cmd3 = "echo \"AuthUser=" + _$('AuthUser').value + "\" >> /etc/ssmtp/ssmtp.conf ";
- cmd4 = "echo \"AuthPass=" + _$('AuthPass').value + "\" >> /etc/ssmtp/ssmtp.conf ";
- }
-
- parent.ASTGUI.systemCmd( cmd1, function(){
- parent.ASTGUI.systemCmd( cmd2, function(){
- if(cmd3){
- parent.ASTGUI.systemCmd( cmd3, function(){
- parent.ASTGUI.systemCmd( cmd4, function(){
- ASTGUI.feedback( { msg:'Changes Saved !! ', showfor:2 });
- window.location.reload();
- });
- });
- }else{
- ASTGUI.feedback( { msg:'Changes Saved !! ', showfor:2 });
- window.location.reload();
- }
- });
- });
-}
-
-
-</script>
-<body bgcolor="EFEFEF">
-<div class="iframeTitleBar">
- SMTP Settings for Voicemail notification Emails
- <span class='refresh_icon' onclick="window.location.reload();" > <img src="images/refresh.png" title=" Refresh " border=0 > </span>
-</div>
-
-<table width=95% cellpadding=0 cellspacing=0 border=0><tr><td align=center><div id="tabbedMenu"></div></td></tr></table>
-
-<div class='lite_Heading'> SMTP Settings </div>
-
-<table align=center border=0 cellpadding=2 cellspacing=1>
-<tr> <td align=right>Smtp server <img src="images/tooltip_info.gif" tip="en,voicemail,16" class='tooltipinfo'>:</td>
- <td> <input id="smtp_server"></td>
-</tr>
-<tr> <td align=right>Port <img src="images/tooltip_info.gif" tip="en,voicemail,17" class='tooltipinfo'>:</td>
- <td> <input id="smtp_port"></td>
-</tr>
-<tr> <td align=right>Use SMTP Authentication :</td>
- <td> <input id="chk_UseAuthentication" type='checkbox'></td>
-</tr>
-<tr> <td align=right>Auth User :</td>
- <td> <input id="AuthUser"></td>
-</tr>
-<tr> <td align=right>Auth Password :</td>
- <td> <input id="AuthPass"></td>
-</tr>
-<tr> <td colspan=2 align="center">
- <div height="10"></div><BR>
- <span class='guiButtonCancel' onclick='window.location.reload();'>Cancel</span>
- <span class='guiButtonEdit' onclick='apply_changes();'>Save</span>
- </td>
-</tr>
-</table>
-
+ </script>
</body>
+</html>
More information about the asterisk-gui-commits
mailing list