Changeset 4816 in subversion


Ignore:
Timestamp:
May 30, 2011 12:19:51 PM (2 years ago)
Author:
alec
Message:
  • Add option to force spellchecking before sending a message (#1485458)
Location:
trunk/roundcubemail
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r4812 r4816  
    22=========================== 
    33 
     4- Added option to force spellchecking before sending a message (#1485458) 
    45- Fix handling of "<" character in contact data, search fields and folder names (#1487864) 
    56- Fix saving "<" character in identity name and organization fields (#1487864) 
  • trunk/roundcubemail/config/main.inc.php.dist

    r4811 r4816  
    704704$rcmail_config['default_addressbook'] = null; 
    705705 
     706// Enables spell checking before sending a message. 
     707$rcmail_config['spellcheck_before_send'] = false; 
     708 
    706709// end of config file 
  • trunk/roundcubemail/program/localization/en_US/labels.inc

    r4811 r4816  
    414414$labels['replysamefolder'] = 'Place replies in the folder of the message being replied to'; 
    415415$labels['defaultaddressbook'] = 'Add new contacts to the selected addressbook'; 
     416$labels['spellcheckbeforesend'] = 'Check spelling before sending a message'; 
    416417 
    417418$labels['folder']  = 'Folder'; 
  • trunk/roundcubemail/program/localization/en_US/messages.inc

    r4724 r4816  
    142142$messages['foldercreated'] = 'Folder created successfully'; 
    143143$messages['invalidimageformat'] = 'Not a valid image format'; 
     144$messages['mispellingsfound'] = 'Spelling errors detected in the message'; 
    144145 
    145146?> 
  • trunk/roundcubemail/program/localization/pl_PL/labels.inc

    r4811 r4816  
    458458$labels['defaultaddressbook'] = 'Nowe kontakty dodawaj do wybranej ksiÄ 
    459459ÅŒki adresowej'; 
     460$labels['spellcheckbeforesend'] = 'Przed wysłaniem wiadomości sprawdzaj pisownię'; 
    460461 
    461462?> 
  • trunk/roundcubemail/program/localization/pl_PL/messages.inc

    r4724 r4816  
    193193cych wpisów</b>'; 
    194194$messages['invalidimageformat'] = 'Niepoprawny format obrazka'; 
     195$messages['mispellingsfound'] = 'Wykryto błędy pisowni w tej wiadomości'; 
    195196 
    196197?> 
  • trunk/roundcubemail/program/steps/mail/sendmail.inc

    r4604 r4816  
    410410  } 
    411411 
     412  // Check spelling before send 
     413  if ($CONFIG['spellcheck_before_send'] && $CONFIG['enable_spellcheck'] 
     414    && empty($_SESSION['compose']['spell_checked']) 
     415  ) { 
     416    $spellchecker = new rcube_spellchecker(); 
     417    $spell_result = $spellchecker->check($message_body, $isHtml); 
     418 
     419    $_SESSION['compose']['spell_checked'] = true; 
     420 
     421    if (!$spell_result) { 
     422      $OUTPUT->show_message('mispellingsfound', 'error'); 
     423      $OUTPUT->command('command', 'spellcheck'); 
     424      $OUTPUT->send('iframe'); 
     425    } 
     426  } 
     427 
    412428  // generic footer for all messages 
    413429  if ($isHtml && !empty($CONFIG['generic_message_footer_html'])) { 
     
    421437      $footer = '<pre>'.$footer.'</pre>'; 
    422438  } 
     439 
    423440  if ($footer) 
    424441    $message_body .= "\r\n" . $footer; 
  • trunk/roundcubemail/program/steps/settings/func.inc

    r4811 r4816  
    546546    } 
    547547 
     548    if (!isset($no_override['spellcheck_before_send']) && $config['enable_spellcheck']) { 
     549      $field_id = 'rcmfd_spellcheck_before_send'; 
     550      $input_spellcheck = new html_checkbox(array('name' => '_spellcheck_before_send', 'id' => $field_id, 'value' => 1)); 
     551 
     552      $blocks['main']['options']['spellcheck_before_send'] = array( 
     553        'title' => html::label($field_id, Q(rcube_label('spellcheckbeforesend'))), 
     554        'content' => $input_spellcheck->show($config['spellcheck_before_send']?1:0), 
     555      ); 
     556    } 
     557 
    548558    if (!isset($no_override['show_sig'])) { 
    549559      $field_id = 'rcmfd_show_sig'; 
  • trunk/roundcubemail/program/steps/settings/save_prefs.inc

    r4813 r4816  
    7171      'dsn_default'        => isset($_POST['_dsn_default']) ? TRUE : FALSE, 
    7272      'reply_same_folder'  => isset($_POST['_reply_same_folder']) ? TRUE : FALSE, 
     73      'spellcheck_before_send' => isset($_POST['_spellcheck_before_send']) ? TRUE : FALSE, 
    7374      'show_sig'           => isset($_POST['_show_sig']) ? intval($_POST['_show_sig']) : 1, 
    7475      'top_posting'        => !empty($_POST['_top_posting']), 
Note: See TracChangeset for help on using the changeset viewer.