pari: branch aadk r609 - /branches/aadk/config/

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed Apr 4 09:38:41 MST 2007


Author: pari
Date: Wed Apr  4 11:38:41 2007
New Revision: 609

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=609
Log:
Part 1 of ssmtp settings - part 2 will be added soon

Modified:
    branches/aadk/config/smtp_settings.html
    branches/aadk/config/voicemail.html

Modified: branches/aadk/config/smtp_settings.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/smtp_settings.html?view=diff&rev=609&r1=608&r2=609
==============================================================================
--- branches/aadk/config/smtp_settings.html (original)
+++ branches/aadk/config/smtp_settings.html Wed Apr  4 11:38:41 2007
@@ -26,26 +26,68 @@
 <link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
 <script>
 
-	
+var fieldnames = ['smtp_server' , 'smtp_port', 'save','cancel'] ;
+var widgets = {};
+var gpcallbacks = {};
 
-	function localajaxinit() {
-		setWindowTitle("Network Settings");
-		parent.loadscreen(this);
+gpcallbacks.format = function(t) {
+	if ((t.name != 'general' ))
+		return null;
+	return t.name;
+}
+
+gpcallbacks.loaded = function() {
+	_$('id_guipreferences').selectitem(0);
+	parent.loadscreen(this);
+}
+
+gpcallbacks.savechanges = function(){
+	// generate new /etc/ssmtp/ssmtp.conf (pending) 
+}
+
+function load_smtpsettings(){
+	for (var x =0; x < fieldnames.length; x++ ) {
+		widgets[fieldnames[x]] = _$(fieldnames[x]);
+		widgets[fieldnames[x]].disabled = true;
 	}
+	parent.astmanEngine.config2list(asterisk_guiConfigFile , _$('id_guipreferences'), widgets, gpcallbacks);
+}
+
+
+function localajaxinit() {
+	setWindowTitle("Network Settings");
+	load_smtpsettings();
+}
 
 </script>
 <body id="foo" onload="localajaxinit()"  bgcolor="EFEFEF">
 <div class="mainscreenTitleBar">
-	<span style="margin-left: 4px;font-weight:bold;">Voicemail to Email Settings</span>
-	<span style="cursor: pointer; cursor: hand;" onclick="window.location.href=window.location.href;" >&nbsp;<img src="images/refresh.png" title=" Refresh " border=0 >&nbsp;</span>
+	<span style="margin-left: 4px;font-weight:bold;"><A href="voicemail.html" style="cursor: pointer">Back</A></span>
 </div>
 <div class="mainscreenContentBox" id="mailboxcontent">
 <table class="mainscreenTable" align="center">
-	<tr>	<td valign="top" align="center">
-
-		</td>
+	<tr>
+	<td valign="top" align="center">
+		<BR>
+		<fieldset>
+			<legend><B>&nbsp;SMTP Settings:&nbsp;</B></legend>
+				<table>
+				<tr>	<td align=right>Smtp server :</td>
+					<td>&nbsp;<input id="smtp_server"></td>
+				</tr>
+				<tr>	<td align=right>Port :</td>
+					<td>&nbsp;<input id="smtp_port"></td>
+				</tr>
+				<tr>	<td colspan=2 align="center">
+					<div height="10"></div><BR>
+					<input type="button" id="save" value="save">&nbsp;&nbsp;<input type="button" id="cancel" value="cancel">
+					</td>
+				</tr>
+				</table>
+		</fieldset>
+	</td>
 	</tr>
 </table>
 </div>
-<select id="hiddennetworking" style="display:none"></select>
-</body>
+<select id="id_guipreferences" style="display:none"></select>
+</body>

Modified: branches/aadk/config/voicemail.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/voicemail.html?view=diff&rev=609&r1=608&r2=609
==============================================================================
--- branches/aadk/config/voicemail.html (original)
+++ branches/aadk/config/voicemail.html Wed Apr  4 11:38:41 2007
@@ -416,7 +416,7 @@
 		</div>
 		</td>
 	</tr>
-	<tr>	<td align='center'><span><A href="smtp_settings.html" class="splbutton">Email Settings</A></span></td>
+	<tr>	<td align='center'><span><A href="smtp_settings.html" class="splbutton">SMTP Settings</A></span></td>
 		<td align='center' colspan='2'>
 			<input type='button' id='save' value='Save' class="buttonbold">&nbsp;<input type='button' id='cancel' value='Cancel' class="buttonbold">
 		</td>				



More information about the asterisk-gui-commits mailing list