Finalized GoogieSpell integration
| | |
| | | // false causes deleted messages to be permanantly removed if there is no Trash folder |
| | | $rcmail_config['flag_for_deletion'] = TRUE; |
| | | |
| | | // Make use of the built-in spell checker. It is based on GoogieSpell |
| | | // which means that the message content will be sent to Google in order to check spelling |
| | | $rcmail_config['enable_spellcheck'] = TRUE; |
| | | |
| | | // path to a text file which will be added to each sent message |
| | | // paths are relative to the RoundCube root folder |
| | | $rcmail_config['generic_message_footer'] = ''; |
| | |
| | | } |
| | | |
| | | if (this.env.action=='compose') |
| | | { |
| | | this.enable_command('add-attachment', 'send-attachment', 'send', true); |
| | | if (this.env.spellcheck) |
| | | this.enable_command('spellcheck', true); |
| | | } |
| | | |
| | | if (this.env.messagecount) |
| | | this.enable_command('select-all', 'select-none', 'sort', 'expunge', true); |
| | |
| | | location.href = url; |
| | | break; |
| | | |
| | | case 'spellcheck': |
| | | if (this.env.spellcheck && this.env.spellcheck.spellCheck) |
| | | this.env.spellcheck.spellCheck(this.env.spellcheck.check_link); |
| | | break; |
| | | |
| | | case 'send': |
| | | if (!this.gui_objects.messageform) |
| | | break; |
| | |
| | | } |
| | | |
| | | GoogieSpell.prototype.removeIndicator = function(elm) { |
| | | AJS.removeElement(this.indicator); |
| | | // modified by roundcube |
| | | if (window.rcube_webmail_client) |
| | | rcube_webmail_client.set_busy(false); |
| | | //AJS.removeElement(this.indicator); |
| | | } |
| | | |
| | | GoogieSpell.prototype.appendIndicator = function(elm) { |
| | | // modified by roundcube |
| | | if (window.rcube_webmail_client) |
| | | rcube_webmail_client.set_busy(true, 'checking'); |
| | | /* |
| | | var img = AJS.IMG({'src': this.img_dir + 'indicator.gif', 'style': 'margin-right: 5px;'}); |
| | | img.style.width = "16px"; |
| | | img.style.height = "16px"; |
| | | this.indicator = img; |
| | | img.style.textDecoration = "none"; |
| | | AJS.insertBefore(img, elm); |
| | | */ |
| | | } |
| | | |
| | | /**** |
| | |
| | | me.spellCheck(span_chck); |
| | | } |
| | | AJS.appendChildNodes(this.spell_container, span_chck, " ", this.switch_lan_pic); |
| | | // modified by roundcube |
| | | this.check_link = span_chck; |
| | | } |
| | | |
| | | GoogieSpell.prototype.setLanguages = function(lang_dict) { |
| | |
| | | $labels['charset'] = 'Zeichensatz'; |
| | | $labels['returnreceipt'] = 'Empfangsbestätigung'; |
| | | |
| | | $labels['checkspelling'] = 'Rechtschreibung prüfen'; |
| | | $labels['resumeediting'] = 'Bearbeitung fortzetzen'; |
| | | $labels['revertto'] = 'Zurück zu'; |
| | | |
| | | $labels['attachments'] = 'Anhänge'; |
| | | $labels['upload'] = 'Hochladen'; |
| | | $labels['close'] = 'Schliessen'; |
| | |
| | | |
| | | $messages['nosearchname'] = 'Bitte geben Sie einen Namen oder eine E-Mail-Adresse ein'; |
| | | |
| | | $messages['searchsuccessful'] = '$nr Nachrichten gefunden'; |
| | | |
| | | $messages['searchnomatch'] = 'Keine Treffer'; |
| | | |
| | | $messages['searching'] = 'Suche...'; |
| | | |
| | | $messages['checking'] = 'Prüfe...'; |
| | | |
| | | $messages['nospellerrors'] = 'Keine Rechtschreibfehler gefunden'; |
| | | |
| | | |
| | | ?> |
| | |
| | | $labels['charset'] = 'Zeichensatz'; |
| | | $labels['returnreceipt'] = 'Empfangsbestätigung'; |
| | | |
| | | $labels['checkspelling'] = 'Rechtschreibung prüfen'; |
| | | $labels['resumeediting'] = 'Bearbeitung fortzetzen'; |
| | | $labels['revertto'] = 'Zurück zu'; |
| | | |
| | | $labels['attachments'] = 'Anhänge'; |
| | | $labels['upload'] = 'Hochladen'; |
| | | $labels['close'] = 'Schließen'; |
| | |
| | | |
| | | $messages['nosearchname'] = 'Bitte geben Sie einen Namen oder eine E-Mail-Adresse ein'; |
| | | |
| | | $messages['searchsuccessful'] = '$nr Nachrichten gefunden'; |
| | | |
| | | $messages['searchnomatch'] = 'Keine Treffer'; |
| | | |
| | | $messages['searching'] = 'Suche...'; |
| | | |
| | | $messages['checking'] = 'Prüfe...'; |
| | | |
| | | $messages['nospellerrors'] = 'Keine Rechtschreibfehler gefunden'; |
| | | |
| | | ?> |
| | |
| | | $labels['charset'] = 'Charset'; |
| | | $labels['returnreceipt'] = 'Return receipt'; |
| | | |
| | | $labels['checkspelling'] = 'Check spelling'; |
| | | $labels['resumeediting'] = 'Resume editing'; |
| | | $labels['revertto'] = 'Revert to'; |
| | | |
| | | $labels['attachments'] = 'Attachments'; |
| | | $labels['upload'] = 'Upload'; |
| | | $labels['close'] = 'Close'; |
| | |
| | | |
| | | $messages['searching'] = 'Searching...'; |
| | | |
| | | $messages['checking'] = 'Checking...'; |
| | | |
| | | $messages['nospellerrors'] = 'No spelling errors found'; |
| | | |
| | | |
| | | ?> |
| | |
| | | |
| | | function rcmail_compose_body($attrib) |
| | | { |
| | | global $CONFIG, $OUTPUT, $REPLY_MESSAGE, $FORWARD_MESSAGE; |
| | | global $CONFIG, $OUTPUT, $REPLY_MESSAGE, $FORWARD_MESSAGE, $JS_OBJECT_NAME; |
| | | |
| | | list($form_start, $form_end) = get_form_tags($attrib); |
| | | unset($attrib['form']); |
| | |
| | | $out .= $form_end ? "\n$form_end" : ''; |
| | | |
| | | // include GoogieSpell |
| | | if (!empty($CONFIG['enable_spellcheck'])) |
| | | { |
| | | $OUTPUT->include_script('googiespell.js'); |
| | | |
| | | $OUTPUT->add_script(sprintf("var googie1 = new GoogieSpell('\$__skin_path/images/googiespell/','%s&_action=spell&lang=');\n". |
| | | "googie1.decorateTextarea('%s');", |
| | | $OUTPUT->add_script(sprintf("var googie = new GoogieSpell('\$__skin_path/images/googiespell/','%s&_action=spell&lang=');\n". |
| | | "googie.lang_chck_spell = \"%s\";\n". |
| | | "googie.lang_rsm_edt = \"%s\";\n". |
| | | "googie.lang_close = \"%s\";\n". |
| | | "googie.lang_revert = \"%s\";\n". |
| | | "googie.lang_no_error_found = \"%s\";\n". |
| | | "googie.decorateTextarea('%s');\n". |
| | | "%s.set_env('spellcheck', googie);", |
| | | $GLOBALS['COMM_PATH'], |
| | | $attrib['id']), 'foot'); |
| | | rep_specialchars_output(rcube_label('checkspelling')), |
| | | rep_specialchars_output(rcube_label('resumeediting')), |
| | | rep_specialchars_output(rcube_label('close')), |
| | | rep_specialchars_output(rcube_label('revertto')), |
| | | rep_specialchars_output(rcube_label('nospellerrors')), |
| | | $attrib['id'], |
| | | $JS_OBJECT_NAME), 'foot'); |
| | | |
| | | rcube_add_label('checking'); |
| | | } |
| | | |
| | | return $out; |
| | | } |
| | |
| | | } |
| | | |
| | | .googie_list_close { |
| | | font-size: 11px; |
| | | color: #b91414; |
| | | } |
| | | |
| | | .googie_list_onhover .googie_list_close { |
| | | color: #FFFFFF; |
| | | } |
| | | |
| | | .googie_list_revert { |
| | | font-size: 11px; |
| | | color: #b91479; |
| | | } |
| | | |
| | |
| | | |
| | | .googie_check_spelling_ok { |
| | | color: green; |
| | | font-size: 11px; |
| | | text-decoration: underline; |
| | | cursor: pointer; |
| | | } |
| | |
| | | #priority-selector |
| | | { |
| | | position: absolute; |
| | | left: 180px; |
| | | left: 220px; |
| | | top: 10px; |
| | | } |
| | | |
| | | #receipt-selector |
| | | { |
| | | position: absolute; |
| | | left: 350px; |
| | | left: 390px; |
| | | top: 10px; |
| | | } |
| | | |
| | |
| | | <roundcube:button command="list" image="/images/buttons/back_act.png" width="32" height="32" title="backtolist" /> |
| | | <roundcube:button command="send" imageAct="/images/buttons/send_act.png" imagePas="/images/buttons/send_pas.png" width="32" height="32" title="sendmessage" /> |
| | | <!--<roundcube:button command="contacts" imageAct="/images/buttons/contacts_act.png" imagePas="/images/buttons/contacts_pas.png" width="32" height="32" title="addressbook" />--> |
| | | <roundcube:button command="spellcheck" imageAct="/images/buttons/spellcheck_act.png" imagePas="/images/buttons/spellcheck_pas.png" width="32" height="32" title="checkspelling" /> |
| | | <roundcube:button command="add-attachment" imageAct="/images/buttons/attach_act.png" imagePas="/images/buttons/attach_pas.png" width="32" height="32" title="addattachment" /> |
| | | |
| | | <div id="priority-selector"> |