Changeset 7925 for sandbox


Ignore:
Timestamp:
02/28/13 14:51:22 (11 years ago)
Author:
thiago
Message:

Ticket #3349 - Problema de repetição das mensagens na busca de anexo(fixed).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.5.1-expresso1/prototype/modules/attach_message/attach_message.js

    r7920 r7925  
    734734 
    735735                 
    736                 $.each(groupResult, function(i, result){ 
    737                     if(result != null){ 
    738                         $.each(result, function(i, each){ 
    739                             tmp.push(each); 
    740                         }); 
    741                     } 
     736                 $.each(groupResult, function(i, result){ 
     737                        if(result != null){ 
     738 
     739                                var existsMessage = true; 
     740 
     741                                $.each(result, function(i, each){ 
     742 
     743                                        $.each(tmp, function(i, ids){ 
     744 
     745                                            if(each.msg_number == ids.msg_number){ 
     746 
     747                                                    existsMessage = false; 
     748                                                    return false; 
     749 
     750                                            } 
     751 
     752                                        }); 
     753 
     754                                        if(existsMessage) tmp.push(each); 
     755                                }); 
     756 
     757                        } 
    742758                }); 
     759 
    743760 
    744761                if(tmp == null) 
Note: See TracChangeset for help on using the changeset viewer.