Ignore:
Timestamp:
08/14/08 11:15:07 (16 years ago)
Author:
niltonneto
Message:

Ver Tickets no Trac #286 e #287.
Inclusão de template de assinatura padrão.
Assinatura também disponível em formato de texto rico.
Inclusão da biblioteca FCKEditor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/templates/default/preferences.tpl

    r325 r389  
    22<center> 
    33 
    4 <table width="50%" border="0" cellspacing="2" cellpadding="2"> 
     4<table width="65%" border="0" cellspacing="2" cellpadding="2"> 
    55 
    6 <form method="POST" action="{save_action}"> 
     6<form  method="POST" action="{save_action}" onSubmit="selectValues()"> 
    77<input type="hidden" name="try_saved" value="false"> 
    8  
    98    <tr bgcolor="{th_bg}"> 
    109        <td colspan="2" align="center">{lang_config_expressoMail}</td> 
     
    9998    </tr> 
    10099 
    101     <tr bgcolor="{tr_color1}"> 
     100    <tr bgcolor="{tr_color2}"> 
    102101        <td> 
    103102                        {lang_auto_save_draft} 
     
    107106                </td> 
    108107    </tr> 
    109  
     108    <tr bgcolor="{th_bg}"> 
     109        <td colspan="2" align="center">{lang_config_signature}</td> 
     110    </tr> 
    110111     <tr bgcolor="{tr_color1}"> 
    111112        <td> 
     
    116117                </td> 
    117118    </tr> 
    118  
    119119    <tr bgcolor="{tr_color2}"> 
    120         <td colspan='2'> 
    121                         {lang_signature}<BR> 
    122                         <textarea name="signature" rows=4 cols=50>{text_signature}</textarea> 
     120        <td valign="center"> 
     121                        {lang_type_signature} 
     122        </td> 
     123        <td align="center"> 
     124                        <select id="type_signature" name="type_signature" onChange="javascript:changeTypeSignature(this.value)"> 
     125                                <option {type_signature_option_text_selected} value="text">{simple_text}</option> 
     126                                <option {type_signature_option_html_selected} value="html">{html_text}</option> 
     127                        </select> 
     128                </td> 
     129    </tr> 
     130    <tr bgcolor="{tr_color2}"> 
     131        <td colspan='2' valign="center" id="td_html_signature" style="{type_signature_td_html}"> 
     132                        {rtf_signature} 
    123133        </td> 
    124134    </tr> 
    125  
     135     <tr bgcolor="{tr_color2}"> 
     136        <td colspan='2' align="center" id="td_text_signature"  style="{type_signature_td_text}"> 
     137                        <textarea name='text_signature' rows='4' cols='70'>{text_signature}</textarea> 
     138        </td> 
     139    </tr> 
    126140    <tr bgcolor="{th_bg}"> 
    127141        <td colspan="2" > 
     
    140154</table> 
    141155</center> 
     156<script language="JavaScript" type="text/javascript"> 
     157        var form =      document.forms[0]; 
     158 
     159        function selectValues(){ 
     160                var signature = eval("form."+form.type_signature.value+"_signature"); 
     161                signature.name = "signature"; 
     162                return true; 
     163        }        
     164 
     165        function changeTypeSignature(value){ 
     166                var html_signature = FCKeditorAPI.GetInstance("html_signature"); 
     167 
     168                if(value == 'text'){ 
     169                        form.text_signature.value = html_signature.GetHTML(); 
     170                        document.getElementById("td_text_signature").style.display = ''; 
     171                        document.getElementById("td_html_signature").style.display = 'none'; 
     172                } 
     173                else if(value == 'html'){ 
     174                        html_signature.SetHTML(form.text_signature.value); 
     175                        document.getElementById("td_text_signature").style.display = 'none'; 
     176                        document.getElementById("td_html_signature").style.display  = ''; 
     177                } 
     178                 
     179        } 
     180</script>   
Note: See TracChangeset for help on using the changeset viewer.