Changeset 7705


Ignore:
Timestamp:
01/04/13 18:43:27 (7 years ago)
Author:
cristiano
Message:

Ticket #3264 - Inserir validação alerta de esquecimento de inserção de anexo

File:
1 edited

Legend:

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

    r7697 r7705  
    32903290 * Se houver, retorna a primeira ocorrência encontrada de words, caso contrário retorna false. 
    32913291 */ 
    3292 function verifyBodyWords(body, words) { 
    3293         for(i = 0; i < words.length; i++) { 
     3292function verifyBodyWords(body, words) 
     3293{ 
     3294    var forwStartPT = body.search(/\<div\>\n*\s*---------- Mensagem encaminhada ----------/); 
     3295    if(forwStartPT >= 0) 
     3296        body = body.substr(0,forwStartPT); 
     3297 
     3298    var forwStartEN = body.search(/\<div\>\n*\s*---------- Forwarded message ----------/); 
     3299    if(forwStartEN >= 0) 
     3300        body = body.substr(0,forwStartEN); 
     3301 
     3302    var forwStartES = body.search(/\<div\>\n*\s*---------- Mensaje reenviada ----------/); 
     3303    if(forwStartES >= 0) 
     3304        body = body.substr(0,forwStartES); 
     3305 
     3306    var replyStartPT = body.search(/\<div\>\n*\s*Em (\d{1,2})\/(\d{1,2})\/(\d{4}) \&agrave\;s (\d{1,2}):(\d{1,2}) horas, (.)+ escreveu:/); 
     3307    if(replyStartPT >= 0) 
     3308        body = body.substr(0,replyStartPT); 
     3309 
     3310    var replyStartEN = body.search(/\<div\>\n*\s*At (\d{1,2})\/(\d{1,2})\/(\d{4}), (\d{1,2}):(\d{1,2}) hours, (.)+ wrote:/); 
     3311    if(replyStartEN >= 0) 
     3312        body = body.substr(0,replyStartEN); 
     3313 
     3314    var replyStartES = body.search(/\<div\>\n*\s*En (\d{1,2})\/(\d{1,2})\/(\d{4}) las (\d{1,2}):(\d{1,2}) horas, (.)+ escribi\&oacute\;:/); 
     3315    if(replyStartES >= 0) 
     3316        body = body.substr(0,replyStartES); 
     3317 
     3318    for(i = 0; i < words.length; i++) { 
    32943319                if(body.search(words[i]) != -1) { 
    32953320                        return words[i];  
    32963321                } 
    32973322        } 
     3323 
    32983324        return false; 
    32993325} 
Note: See TracChangeset for help on using the changeset viewer.