pari: trunk r985 - /trunk/config/emailsettings.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Fri May 25 09:17:32 MST 2007


Author: pari
Date: Fri May 25 11:17:32 2007
New Revision: 985

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=985
Log:
 convert '\n' to <CR> in textarea when showing to user and convert back to '\n' before saving 

Modified:
    trunk/config/emailsettings.html

Modified: trunk/config/emailsettings.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/emailsettings.html?view=diff&rev=985&r1=984&r2=985
==============================================================================
--- trunk/config/emailsettings.html (original)
+++ trunk/config/emailsettings.html Fri May 25 11:17:32 2007
@@ -28,6 +28,19 @@
 var vmwidgets = {};
 var voicemailcallbacks = {};
 
+voicemailcallbacks.savechanges = function(){
+	var t =	_$('emailbody').value ;
+	var r = t.split('\\n');
+	_$('emailbody').value = r.join('\r\n');	
+}
+
+voicemailcallbacks.beforeSaving = function() {
+	var r = _$('emailbody').value.split('\n');
+	var s = r.join('\\n');
+	_$('emailbody').value = s;
+	return true;
+}
+
 voicemailcallbacks.format = function(t) {
 	if (t.name != 'general')
 		return null;
@@ -36,6 +49,9 @@
 
 voicemailcallbacks.loaded = function() {
 	_$('hiddenvoicemail').selectitem(0) ;
+	var t =	_$('emailbody').value ;
+	var r = t.split('\\n');
+	_$('emailbody').value = r.join('\r\n');
 	parent.loadscreen(this);
 }
 
@@ -81,6 +97,9 @@
 <BR>
 <table align="center" cellpadding=2 cellspacing=1 border=0>
 <TR>	<TD valign=top align=center style="font-size:10px;"><B>Template Variables:</B></TD>
+	<TD style="font-size : 11px;">\t : TAB</TD>
+</TR>
+<TR>	<TD></TD>
 	<TD style="font-size : 11px;">{VM_NAME} : Recipient's firstname and lastname</TD>
 </TR>
 <TR>	<TD></TD>



More information about the asterisk-gui-commits mailing list