Changeset 5892


Ignore:
Timestamp:
04/09/12 10:11:11 (12 years ago)
Author:
marcieli
Message:

Ticket #2593 - Corrigido bug gerado ao editar nome do marcador.

Location:
trunk/prototype
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/config/label.ini

    r5881 r5892  
    77[before.delete] 
    88clearAllLabeledsOfLabel = modules/mail/interceptors/Helpers.php 
     9 
     10[before.update] 
     11verifyNameLabel = modules/mail/interceptors/Helpers.php 
    912 
    1013[before.create] 
  • trunk/prototype/modules/mail/js/label.js

    r5890 r5892  
    3030                        event.preventDefault(); 
    3131                        var nameLabel = $(".label-list").find(".edit-value-list").val(); 
    32                         $(span).html($(".label-list").find(".edit-value-list").val()) 
    33                         .parent().find('.edit').css("display","").parents("li").click(configureLabel).trigger("click"); 
     32                        $(span).parent().find('.edit').css("display",""); 
    3433                        save_editLabel(nameLabel, data.applyToSelectedMessages); 
    3534                         
     
    113112                                borderColor : winElement.find("input[name='borderColor']").val() 
    114113                        } 
    115                         $(".label-list-container .label-list li").each(function(){ 
    116                                 var regex_match_2 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/); 
    117                                  
    118                                  if(regex_match_2 && regex_match_2[1] && regex_match_2[1] == labelEdited.id){ 
    119                                    $(this).html("<input type='hidden' name='labelItemId' class='id-item-list' value='"+labelEdited.id+"'>"+"<span class='text-list'>"+labelEdited.name+"</span><div class='button close tiny' style='float: right'></div><div class='button edit tiny' style='float: right'></div>").css({ 
    120                                         "background" : labelEdited.backgroundColor, 
    121                                         "color" : labelEdited.fontColor,  
    122                                         "border-color" : labelEdited.borderColor         
    123                                    }); 
    124                                  }       
    125                         }); 
    126                          
    127                         $("#MyMarckersList .label-list li").each(function(){ 
    128                                 var regex_match_2 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/); 
    129                                  
    130                                 if(regex_match_2 && regex_match_2[1] && regex_match_2[1] == labelEdited.id){ 
    131                                         $(this).html("<input type='hidden' name='labelItemId' class='id-item-list' value='"+labelEdited.id+"'>"+"<span>"+labelEdited.name+"</span>"); 
    132                                         $(this).find(".square-color").css('background', labelEdited.backgroundColor); 
    133                                 }        
    134                         }); 
     114 
    135115                        DataLayer.put('label', labelEdited.id, labelEdited); 
    136116                        DataLayer.commit(false, false, function(data){ 
     
    141121                                        } 
    142122                                        if(!hasLabel){ 
     123                                                $(".label-list-container .label-list li").each(function(){ 
     124                                                        var regex_match_2 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/); 
     125                                                         
     126                                                         if(regex_match_2 && regex_match_2[1] && regex_match_2[1] == labelEdited.id){ 
     127                                                           $(this).html("<input type='hidden' name='labelItemId' class='id-item-list' value='"+labelEdited.id+"'>"+"<span class='text-list'>"+labelEdited.name+"</span><div class='button close tiny' style='float: right'></div><div class='button edit tiny' style='float: right'></div>").css({ 
     128                                                                "background" : labelEdited.backgroundColor, 
     129                                                                "color" : labelEdited.fontColor,  
     130                                                                "border-color" : labelEdited.borderColor         
     131                                                           }); 
     132                                                           $(this).trigger('click'); 
     133                                                         }       
     134                                                }); 
     135                                                 
     136                                                $("#MyMarckersList .label-list li").each(function(){ 
     137                                                        var regex_match_2 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/); 
     138                                                         
     139                                                        if(regex_match_2 && regex_match_2[1] && regex_match_2[1] == labelEdited.id){ 
     140                                                                $(this).html("<input type='hidden' name='labelItemId' class='id-item-list' value='"+labelEdited.id+"'>"+"<span>"+labelEdited.name+"</span>"); 
     141                                                                $(this).find(".square-color").css('background', labelEdited.backgroundColor); 
     142                                                        }        
     143                                                }); 
     144                                         
    143145                                                winElement.find(".insert-label").val(""); 
    144146                                                $.Watermark.ShowAll(); 
     
    153155                                                draw_tree_labels(); 
    154156                                                updateMessageLabels(labelEdited.id); 
    155                                                  
     157                                 
    156158                                                /** 
    157159                                                * Atualiza menu remove o menu presente em cada mensagem listada em uma pasta  
     
    163165                                                $(".add-label-button").empty() 
    164166                                                .addClass("ui-icon ui-icon-plus"); 
     167                                                winElement.find('.input-nome').val("").focus; 
    165168                                                alert('Problema ao salvar marcador.'); 
    166169                                        } 
     
    170173                        var nameLabel = winElement.find(".input-nome").val(); 
    171174                        new_label(nameLabel, false, apply);                              
    172                         winElement.find(".insert-label").val(""); 
    173175                        $.Watermark.ShowAll();           
    174176                        $(".save-label").button("disable");      
Note: See TracChangeset for help on using the changeset viewer.