Changeset 8153


Ignore:
Timestamp:
05/14/13 10:20:09 (11 years ago)
Author:
thiago
Message:

Ticket #3449 - Inconsistência na utilização das flags.

Location:
trunk
Files:
2 edited

Legend:

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

    r7891 r8153  
    568568                                        $(td).click(function(event, ui){         
    569569                                                var messageClickedId = $(this).attr('id').match(/td_message_followup_search_([\d]+)/)[1]; 
     570 
     571                                                var loading = $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited") 
     572                                .find('img[alt=Carregando]'); 
     573 
     574                        //Verificar se está carregando a bandeira. 
     575                        //Caso esteja ele sai da função até que seja carregado.  
     576                                if( loading.length ) { 
     577                                        return false; 
     578                                } 
     579 
     580                                                var followupColor = $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited").css('backgroundColor'); 
     581 
    570582                                                 
    571583                                                var followupColor = $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited").css('backgroundColor'); 
     
    607619                                                                 
    608620                                                                $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited") 
    609                                                                 .css({"background-image":"url(../prototype/modules/mail/img/flagEditor.png)"}); 
     621                                                                .css({"background-image":"url(../prototype/modules/mail/img/flagEditor.png)"}) 
     622                                                                .find('img').remove();; 
    610623                                                                 
    611624                                                                if (fail) { 
     
    613626                                                                    var isCurrentFolder = current_folder == mailbox ? '#td_message_followup_' + messageClickedId + ', ' : '';    
    614627                                                                    $(isCurrentFolder + 'tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited").css("background", "#CCCCCC"); 
     628                                                                     
     629                                                                    $('#td_message_followup_search_' + messageClickedId).find(".flag-edited") 
     630                                                                    .append("<img src='../prototype/modules/mail/img/flagEditor.png'/>"); 
     631 
    615632                                                                    MsgsCallbackFollowupflag[fail](); 
    616633                                                                    return false; 
     
    619636                                                                if(current_folder == mailbox){ 
    620637                                                                        $('#td_message_followup_' + messageClickedId + ', ' +  
    621                                                                         'tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).attr('title', get_lang('Follow up')).find(".flag-edited").css("background", aux.followupflagged.backgroundColor);         
     638                                                                        'tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).attr('title', get_lang('Follow up')).find(".flag-edited").css("background", aux.followupflagged.backgroundColor); 
     639 
     640                                                                        $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).attr('title', get_lang('Follow up')).find(".flag-edited").css("background", aux.followupflagged.backgroundColor) 
     641                                                                        .append("<img src='../prototype/modules/mail/img/flagEditor.png'/>");    
    622642                                                                }else{                                                           
    623                                                                         $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).attr('title', get_lang('Follow up')).find(".flag-edited").css("background", aux.followupflagged.backgroundColor);               
     643                                                                        $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).attr('title', get_lang('Follow up')).find(".flag-edited").css("background", aux.followupflagged.backgroundColor) 
     644                                                                        .append("<img src='../prototype/modules/mail/img/flagEditor.png'/>");                    
    624645                                                                }                                                                
    625646                                                                updateCacheFollowupflag(messageClickedId, mailbox, true); 
     
    651672                                                                         
    652673                                                                        $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited") 
    653                                                                                 .css({"background-image":"url(../prototype/modules/mail/img/flagEditor.png)"}); 
     674                                                                                .css({"background-image":"url(../prototype/modules/mail/img/flagEditor.png)"}) 
     675                                                                                .append("<img src='../prototype/modules/mail/img/flagEditor.png'/>"); 
    654676                                                                } 
    655677                                                        }); 
     
    657679                                                } else { 
    658680                                                        $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited") 
    659                                                         .css({"background-image":"url(../prototype/modules/mail/img/flagEditor.png)"}); 
    660                                                         $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited").css("background", followupColor); 
    661                                                         $(this).parents('[role="'+messageClickedId+'_'+mailbox+'"]').attr('class', 'selected_msg').find(':checkbox').trigger('click'); 
     681                                                        .css({"background-image":"url(../prototype/modules/mail/img/flagEditor.png)"}).find('img').remove(); 
     682                                                         
     683                                                        $('tr[role="'+messageClickedId+'_'+mailbox+'"] #td_message_followup_search_' + messageClickedId).find(".flag-edited").css("background", followupColor) 
     684                                                        .append("<img src='../prototype/modules/mail/img/flagEditor.png'/>"); 
     685 
     686                                                        //Pega id do checkbox 
     687                                                        var id = $(this).parents('[role="'+messageClickedId+'_'+mailbox+'"]').attr('class', 'selected_msg').find(':checkbox').attr('id'); 
     688                                                         
     689                                                        //verifica se o checkbox já está selecionada 
     690                                                        if($('#' + id).attr('checked') != 'checked') 
     691                                                                $(this).parents('[role="'+messageClickedId+'_'+mailbox+'"]').attr('class', 'selected_msg').find(':checkbox').trigger('click'); 
     692                                                         
     693                                                        updateSelectedMsgs(true,messageClickedId); 
    662694                                                        configureFollowupflag(); 
    663695                                                } 
     
    676708                                        if (aux.labels) { 
    677709                                                //td1 = '<img src="../prototype/modules/mail/img/tag.png">'; 
    678                                                 $(td1).css({'background-image':'url(../prototype/modules/mail/img/mail-sprites.png)','background-position': '0 -1711px',"margin-left":"0",'margin-top':'3px','background-repeat':'no-repeat'}); 
     710                                                $(td).css({'background-image':'url(../prototype/modules/mail/img/mail-sprites.png)','margin-left': '0px', 'margin-top':'3px', 'background-position': '0px -1706px', 'background-repeat':'no-repeat no-repeat'}); 
    679711                                                updateLabelsColumn(aux)          
    680712                                        } else { 
  • trunk/prototype/modules/mail/js/followupflag.js

    r7794 r8153  
    7373                winElement.dialog("close"); 
    7474                $.each(selectedMessageIds, function(index, value){       
    75                         $('tr#' + value + ' .td-followup-flag').find('img').remove(); 
     75                        $('tr#' + value + ' .td-followup-flag')//.find('img').remove(); 
    7676                }); 
    7777                 
     
    286286                         
    287287                        $.each(selectedMessageIds, function(index, value){       
    288                                 $('tr#' + value + ' .td-followup-flag').find('img').remove(); 
     288                                $('tr#' + value + ' .td-followup-flag').find('img')//.remove(); 
    289289                        }); 
    290290                         
Note: See TracChangeset for help on using the changeset viewer.