Changeset 5547 for trunk/prototype


Ignore:
Timestamp:
02/24/12 15:09:26 (12 years ago)
Author:
douglasz
Message:

Ticket #2486 - Atualizado o arquivo setup correções no salvamento de sinalizadores

Location:
trunk/prototype/modules/mail
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/modules/mail/css/label.css

    r5537 r5547  
    9595} 
    9696#MyMarckersList.list-label .status-list-labels{display:inline-block; position: absolute;} 
    97 #MyMarckersList.list-label ul {height: 60%; margin: 5px 0 0 6px; padding:0; list-style:none; } 
     97#MyMarckersList.list-label ul {height: auto; margin: 5px 0 0 6px; padding:0; list-style:none; } 
    9898#MyMarckersList.list-label.acc-list ul li{ border-radius:3px;  padding:2px 2px 3px 2px;} 
    9999#MyMarckersList.list-label li{ background: #FFF; margin:2px 2px 0 12px; border:1px solid #CCC; width: 150px; height:13px; } 
  • trunk/prototype/modules/mail/js/followupflag.js

    r5533 r5547  
    279279                        var messageNumber   = selectedMessageIds[i]; 
    280280                        //var followupflag = DataLayer.get('followupflag', followupflagId.toString()), 
    281                         var followupflagged = { 
     281                        var idFollowupflagged = winElement.find('.id-followup').val(); 
     282                        var followupflagged = DataLayer.merge({ 
    282283                                uid : User.me.id, 
    283284                                followupflagId : followupflagId,  
     
    288289                                isDone: isDone, 
    289290                                backgroundColor : backgroundColor 
    290                         } 
     291                        }, !!idFollowupflagged ? {id: idFollowupflagged} : {}); 
    291292                         
    292293                        if (alarmDate = winElement.find('[name="alarmDate"]').datepicker("getDate")) { 
     
    304305                        } 
    305306                         
     307                        var flagged = $('#td_message_followup_' + messageNumber + ', ' + '#td_message_followup_search_' + messageNumber).find(".flag-edited"); 
    306308                        if(isDone){ 
    307                                 $('#td_message_followup_' + messageNumber + ', ' +  
    308                                 '#td_message_followup_search_' + messageNumber).find(".flag-edited") 
    309                                 .find("img").attr("src", "../prototype/modules/mail/img/flagChecked.png") 
    310                                 .css("margin-left","-3px"); 
     309                                flagged.find("img").attr("src", "../prototype/modules/mail/img/flagChecked.png").css("margin-left","-3px"); 
     310                        }else{ 
     311                                flagged.find("img").attr("src", "../prototype/modules/mail/img/flagEditor.png").css("margin-left","0");                  
    311312                        } 
    312313                         
     
    316317                        DataLayer.put('followupflagged', followupflagged); 
    317318                } 
    318                 DataLayer.commit(); 
     319                DataLayer.commit(false, false, function(data){ 
     320                        followupflags = DataLayer.get('followupflagged',{criteria:{order: 'id'}}, true);                 
     321                        var id = followupflags[followupflags.length - 1].id; 
     322                        winElement.find('.id-followup').val(id); 
     323                });              
    319324                 
    320325                //onceOpenedHeadersMessages[current_folder][followupflagged.messageNumber]['followupflagged']['followupflag'] = {}; 
     
    335340                        var messageNumber   = selectedMessageIds[i]; 
    336341                        var flag_id = onceOpenedHeadersMessages[current_folder][messageNumber]['followupflagged'].id; 
     342                        var flagged = $('#td_message_followup_' + messageNumber + ', ' + '#td_message_followup_search_' + messageNumber).find(".flag-edited"); 
    337343                        DataLayer.remove('followupflagged', flag_id); 
    338                         $('#td_message_followup_' + messageNumber + ', ' +  
    339                           '#td_message_followup_search_' + messageNumber).find(".flag-edited").css("background", '#CCC'); 
    340                         $('#td_message_followup_' + messageNumber + ', ' +  
    341                                 '#td_message_followup_search_' + messageNumber).find(".flag-edited") 
    342                                 .find("img").attr("src", "../prototype/modules/mail/img/flagEditor.png").css("margin-left","0");; 
     344                        flagged.css("background", '#cccccc'); 
     345                        flagged.find("img").attr("src", "../prototype/modules/mail/img/flagEditor.png").css("margin-left","0"); 
    343346                } 
    344347                DataLayer.commit(); 
  • trunk/prototype/modules/mail/js/label.js

    r5537 r5547  
     1function configureLabel(event, ui){ 
     2        var idmarkernow = $(this).find('[name="labelItemId"]').val(); 
     3        winElement.find('.edit-label').val(idmarkernow); 
     4        winElement.find('.input-nome').val($(this).find("span").text()); 
     5         
     6        var colorpicker = winElement.find('.lebals-colorpicker'); 
     7        colorpicker.find('input[name="backgroundColor"]').val(rgb2hex($(this).css("backgroundColor"))) 
     8        .css("background-color", $(this).css("backgroundColor")).focus().end() 
     9        .find('input[name="fontColor"]').val(rgb2hex($(this).css("color"))).css("background-color", $(this).css("color")).focus().end() 
     10        .find('input[name="borderColor"]').val(rgb2hex($(this).css("border-left-color"))).css("background-color", $(this).css("border-left-color")).focus().end() 
     11        .find('.preview-label-outer').css({ 
     12                'background-color':$(this).css("backgroundColor"), 
     13                'color':$(this).css("color"), 
     14                'border-color':$(this).css("border-left-color") 
     15        })               
     16        winElement.find(".preview-label-inner").text($(this).text()); 
     17} 
    118function editLabel(){    
    219        var conteudoSpan = $(this).parent().find(".text-list").text(); 
     
    4360  ("0" + parseInt(rgb[3],10).toString(16)).slice(-2); 
    4461} 
    45 function configureLabel(event, ui){ 
    46         var idmarkernow = $(this).find('[name="labelItemId"]').val(); 
    47         winElement.find('.edit-label').val(idmarkernow); 
    48         winElement.find('.input-nome').val($(this).find("span").text()); 
    49          
    50         var colorpicker = winElement.find('.lebals-colorpicker'); 
    51         colorpicker.find('input[name="backgroundColor"]').val(rgb2hex($(this).css("backgroundColor"))) 
    52         .css("background-color", $(this).css("backgroundColor")).focus().end() 
    53         .find('input[name="fontColor"]').val(rgb2hex($(this).css("color"))).css("background-color", $(this).css("color")).focus().end() 
    54         .find('input[name="borderColor"]').val(rgb2hex($(this).css("border-left-color"))).css("background-color", $(this).css("border-left-color")).focus().end() 
    55         .find('.preview-label-outer').css({ 
    56                 'background-color':$(this).css("backgroundColor"), 
    57                 'color':$(this).css("color"), 
    58                 'border-color':$(this).css("border-left-color") 
    59         })               
    60         winElement.find(".preview-label-inner").text($(this).text()); 
    61 } 
     62 
    6263function confirmDelete(id){ 
    6364        $.Zebra_Dialog('<strong>Deseja excluir esse marcador?</strong>', { 
     
    112113        }                
    113114} 
    114 function new_label(nameLabel){ 
     115function new_label(nameLabel, isNew){ 
    115116        var labelCreated = { 
    116117                uid: User.me.id, 
    117118                name : nameLabel, 
    118                 backgroundColor : winElement.find("input[name='backgroundColor']").val(), 
    119                 fontColor : winElement.find("input[name='fontColor']").val(), 
    120                 borderColor : winElement.find("input[name='borderColor']").val() 
     119                backgroundColor : !!isNew ? '#ebebeb' : winElement.find("input[name='backgroundColor']").val(), 
     120                fontColor : !!isNew ? '#000000' : winElement.find("input[name='fontColor']").val(), 
     121                borderColor :!!isNew ? '#000000' : winElement.find("input[name='borderColor']").val() 
    121122        } 
    122123        DataLayer.put('label', labelCreated); 
     
    132133                        name : labels[labels.length- 1].name, 
    133134                        uid: User.me.id, 
    134                         bgColor : winElement.find("input[name='backgroundColor']").val(), 
    135                         fontColor : winElement.find("input[name='fontColor']").val(), 
    136                         borderColor : winElement.find("input[name='borderColor']").val() 
     135                        bgColor : !!isNew ? '#ebebeb' : winElement.find("input[name='backgroundColor']").val(), 
     136                        fontColor : !!isNew ? '#000000' : winElement.find("input[name='fontColor']").val(), 
     137                        borderColor : !!isNew ? '#000000' : winElement.find("input[name='borderColor']").val() 
    137138                }; 
    138139 
     
    197198 
    198199        winElement = data.window; 
    199  
    200         /* var configureLabel = function(event, ui){ 
    201                 var idmarkernow = $(this).find('[name="labelItemId"]').val(); 
    202                 winElement.find('.edit-label').val(idmarkernow); 
    203                 winElement.find('.input-nome').val($(this).find("span").text()); 
    204                  
    205                 var colorpicker = winElement.find('.lebals-colorpicker'); 
    206                 colorpicker.find('input[name="backgroundColor"]').val(rgb2hex($(this).css("backgroundColor"))) 
    207                 .css("background-color", $(this).css("backgroundColor")).focus().end() 
    208                 .find('input[name="fontColor"]').val(rgb2hex($(this).css("color"))).css("background-color", $(this).css("color")).focus().end() 
    209                 .find('input[name="borderColor"]').val(rgb2hex($(this).css("border-left-color"))).css("background-color", $(this).css("border-left-color")).focus().end() 
    210                 .find('.preview-label-outer').css({ 
    211                         'background-color':$(this).css("backgroundColor"), 
    212                         'color':$(this).css("color"), 
    213                         'border-color':$(this).css("border-left-color") 
    214                 })               
    215                 winElement.find(".preview-label-inner").text($(this).text()); 
    216         } */ 
     200         
    217201        //TODO Mudar quando API abstrair atualizações no cache 
    218202        DataLayer.remove('label',false); 
     
    320304                var nameLabel = winElement.find(".insert-label").val(); 
    321305                if(nameLabel.length >= 2){ 
    322                         new_label(nameLabel); 
     306                        new_label(nameLabel, true); 
    323307                        $.Watermark.ShowAll(); 
    324308                        winElement.find(".insert-label").val(""); 
     
    421405                        var nameLabel = winElement.find(".input-nome").val(); 
    422406                        if(nameLabel.length >= 2){ 
    423                                 new_label(nameLabel);                            
     407                                new_label(nameLabel, false);                             
    424408                                winElement.find(".insert-label").val(""); 
    425409                                $.Watermark.ShowAll();                           
  • trunk/prototype/modules/mail/templates/followupflag_configure.ejs

    r5545 r5547  
    4747                <legend><%= get_lang("Basic")%></legend> 
    4848                <div class="followupflag-configure"> 
     49                        <input type="hidden" class="id-followup" value="" name="followupFlag"> 
    4950                        <label class="label-name"><%= get_lang("Flag as")%>:</label>  
    5051                        <select name="name"> 
Note: See TracChangeset for help on using the changeset viewer.