Changeset 1859 in subversion


Ignore:
Timestamp:
Sep 20, 2008 3:56:24 AM (5 years ago)
Author:
alec
Message:
  • allow signature textarea size setting from skin + use cols=60
Location:
trunk/roundcubemail
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/steps/settings/edit_identity.inc

    r1806 r1859  
    5757                                    "theme_advanced_toolbar_location : 'top'," . 
    5858                                    "theme_advanced_toolbar_align : 'left'," . 
    59                                     "theme_advanced_buttons1 : 'bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,separator,outdent,indent,charmap,hr'," . 
    60                                     "theme_advanced_buttons2 : 'link,unlink,code,forecolor,fontselect,fontsizeselect'," . 
     59                                    "theme_advanced_buttons1 : 'bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,separator,outdent,indent,charmap,hr,link,unlink,code,forecolor'," . 
     60                                    "theme_advanced_buttons2 : ',fontselect,fontsizeselect'," . 
    6161                                    "theme_advanced_buttons3 : '',". 
    6262                                    "gecko_spellcheck : true });"); 
     
    6868  $OUTPUT->add_label('noemailwarning', 'nonamewarning', 'converting'); 
    6969 
     70  $i_size = !empty($attrib['size']) ? $attrib['size'] : 40; 
     71  $t_rows = !empty($attrib['textarearows']) ? $attrib['textarearows'] : 6; 
     72  $t_cols = !empty($attrib['textareacols']) ? $attrib['textareacols'] : 40; 
    7073 
    7174  list($form_start, $form_end) = get_form_tags($attrib, 'save-identity', array('name' => '_iid', 'value' => $IDENTITY_RECORD['identity_id'])); 
     
    7477 
    7578  // list of available cols 
    76   $a_show_cols = array('name'         => array('type' => 'text'), 
    77                        'email'        => array('type' => 'text'), 
    78                        'organization' => array('type' => 'text'), 
    79                        'reply-to'     => array('type' => 'text', 'label' => 'reply-to'), 
    80                        'bcc'          => array('type' => 'text'), 
    81                        'signature'        => array('type' => 'textarea', 'size' => "40", 'rows' => "6"), 
     79  $a_show_cols = array('name'         => array('type' => 'text', 'size' => $i_size), 
     80                       'email'        => array('type' => 'text', 'size' => $i_size), 
     81                       'organization' => array('type' => 'text', 'size' => $i_size), 
     82                       'reply-to'     => array('type' => 'text', 'label' => 'reply-to', 'size' => $i_size), 
     83                       'bcc'          => array('type' => 'text', 'size' => $i_size), 
     84                       'signature'        => array('type' => 'textarea', 'size' => $t_cols, 'rows' => $t_rows), 
    8285                       'html_signature'=>array('type' => 'checkbox', 'label' => 'htmlsignature', 'onclick' => 'return rcmail.toggle_editor(this, \'rcmfd_signature\');'), 
    8386                       'standard'     => array('type' => 'checkbox', 'label' => 'setdefault')); 
     
    9194      { 
    9295      $out = $form_start; 
    93       $out .= rcmail_get_edit_field($attrib['part'], $IDENTITY_RECORD[$attrib['part']], $attrib + array('size' => 30), $colprop['type']);  
     96      $out .= rcmail_get_edit_field($attrib['part'], $IDENTITY_RECORD[$attrib['part']], $attrib, $colprop['type']);  
    9497      return $out; 
    9598      } 
     
    104107  foreach ($a_show_cols as $col => $colprop) 
    105108    { 
    106     $attrib['id'] = 'rcmfd_'.$col; 
    107  
    108     if (strlen($colprop['onclick'])) 
    109       $attrib['onclick'] = $colprop['onclick']; 
    110     else 
    111       unset($attrib['onclick']); 
     109    $colprop['id'] = 'rcmfd_'.$col; 
    112110 
    113111    if ($col == 'signature') 
    114112      { 
    115       $attrib['size'] = $colprop['size']; 
    116       $attrib['rows'] = $colprop['rows']; 
    117       $attrib['spellcheck'] = true; 
     113      $colprop['spellcheck'] = true; 
    118114      if ($IDENTITY_RECORD['html_signature']) 
    119115        { 
    120         $attrib['class'] = "mce_editor"; 
     116        $colprop['class'] = 'mce_editor'; 
    121117        } 
    122       } 
    123     else 
    124       { 
    125       $attrib['size'] = 40; 
    126       unset($attrib['rows']); 
    127118      } 
    128119 
    129120    $label = strlen($colprop['label']) ? $colprop['label'] : $col; 
    130     $value = rcmail_get_edit_field($col, $IDENTITY_RECORD[$col], $attrib, $colprop['type']); 
     121    $value = rcmail_get_edit_field($col, $IDENTITY_RECORD[$col], $colprop, $colprop['type']); 
    131122 
    132123    $out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 
    133                     $attrib['id'], 
     124                    $colprop['id'], 
    134125                    Q(rcube_label($label)), 
    135126                    $value); 
  • trunk/roundcubemail/skins/default/templates/editidentity.html

    r1796 r1859  
    2525 
    2626<div style="padding:15px;"> 
    27 <roundcube:object name="identityform" size="40" /> 
     27<roundcube:object name="identityform" size="40" textareacols="60" textarearows="6" /> 
    2828 
    2929<p><br /> 
Note: See TracChangeset for help on using the changeset viewer.