Changeset 6698 for trunk


Ignore:
Timestamp:
07/03/12 08:47:47 (12 years ago)
Author:
marcosw
Message:

Ticket #2927 - Confirmação e remoção de tags no texto simples

Location:
trunk/expressoMail1_2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/js/draw_api.js

    r6678 r6698  
    42364236        //Botão TextoRico/TextoSimples 
    42374237        content.find(".new-msg-head-right-buttons").find(".button").button().filter(".rich-button").click(function(){ 
    4238                 //RichTextEditor.loadEditor2(ID); 
    4239                 RichTextEditor.setPlain(check_input(content.find('[name="textplain_rt_checkbox"]')), ID); 
    4240                 change_text($(this).find(".ui-button-text"), get_lang("Rich Text"), get_lang("Simple Text")); 
     4238                /*Se o texto do botão for "Texto simples" exibirá a mensagem antes de alterar para texto simples*/ 
     4239                if($(".rich-button").find("span").text() == get_lang("Simple Text")){ 
     4240                        $.Zebra_Dialog(get_lang("Convert this message into plain text can make parts of it are removed. Continue?"), { 
     4241                    'type':     'warning', 
     4242                    'overlay_opacity': '0.5', 
     4243                    'buttons':  ['OK','Cancelar'], 
     4244                    'width' : 380, 
     4245                    'onClose':  function(clicked) { 
     4246                        if(clicked == 'OK'){ 
     4247                                RichTextEditor.setPlain(check_input(content.find('[name="textplain_rt_checkbox"]')), ID); 
     4248                                $(".rich-button").find("span").text(get_lang("Rich Text")); 
     4249                        }  
     4250                    } 
     4251                        }) 
     4252                } 
     4253                /*Se o texto do botão for "Texto rico" simplesmente altera para texto rico*/ 
     4254                else{ 
     4255                        RichTextEditor.setPlain(check_input(content.find('[name="textplain_rt_checkbox"]')), ID); 
     4256                        $(".rich-button").find("span").text(get_lang("Simple Text")); 
     4257                } 
    42414258        }) 
    42424259         
  • trunk/expressoMail1_2/js/rich_text_editor.js

    r6483 r6698  
    213213      RichTextEditor.plain[id] = active; 
    214214          var content = $("#content_id_"+id); 
     215          var div = $("<div>").attr("display", "none"); 
    215216      if(active === true) 
    216217      { 
     
    219220            height -= 330; 
    220221            $('#body_'+id).height(height); 
     222            div.html($('#body_'+id).val()); 
     223            /*Remove as tags html, tabulações e quebras de linha quando for utilizado o editor de texto simples*/ 
     224            div.html($.trim(div.text().replace(/[\t]+/g, '').replace(/[\n]+/g, '\n'))); 
     225            /*Insere o texto sem formatação no textarea*/ 
     226            $('#body_'+id).val(div.text()); 
     227             
    221228            $('#body_'+id).keydown(function(event) { 
    222229                away = false; 
     
    228235                        $("[name=textplain_rt_checkbox_"+id+"]").button({ disabled: false }); 
    229236      }    
    230       else 
     237      else{ 
    231238          RichTextEditor.active('body_'+id, id); 
     239          /*Insere somente quebras de linha para que o texto convertido não fique todo em uma linha só*/ 
     240          div.html($('#body_'+id).val().replace(/[\n]+/g, '<br>')); 
     241          $('#body_'+id).val(div.html()); 
     242      } 
    232243} 
    233244 
  • trunk/expressoMail1_2/setup/phpgw_pt-br.lang

    r6679 r6698  
    9595Contact added successfully.     expressoMail1_2 pt-br   Contato adicionado com sucesso. 
    9696Connection failed with %1 Server. Try later.    expressoMail1_2 pt-br   Ocorreu uma falha de comunicação com o servidor de %1. Tente mais tarde. 
     97Convert this message into plain text can make parts of it are removed. Continue?        expressoMail1_2 pt-br   Converter esta mensagem para texto sem formatação pode fazer com que partes dela sejam removidas. Deseja continuar? 
    9798Couldn't verify if certificate was revoked.(CD-01)      expressoMail1_2 pt-br   A lista de certificados revogados não foi encontrada.(CD-01) 
    9899Couldn't verify if certificate was revoked.(CD-02)      expressoMail1_2 pt-br   Não foi possível verificar se o certificado está revogado.(CD-02) 
Note: See TracChangeset for help on using the changeset viewer.