Changeset 6106


Ignore:
Timestamp:
05/04/12 17:05:17 (12 years ago)
Author:
marcieli
Message:

Ticket #2696 - Corrigido campo CC desabilitado e sem ação ao responder a todos uma mensagem.

Location:
trunk/expressoMail1_2/js
Files:
2 edited

Legend:

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

    r6104 r6106  
    34763476        return mySplit( term ).pop(); 
    34773477} 
     3478 
     3479function input_binds(input, ID){ 
     3480        var mySource = new Array(); 
     3481        var myArray = contacts.split(","); 
     3482        for(var i in myArray){ 
     3483                var teste = myArray[i].split(";"); 
     3484                if(teste.length > 1) 
     3485                        mySource.push({name : teste[0], email: teste[1], value : (teste[0] +" - "+teste[1])}); 
     3486                else 
     3487                        mySource.push({name : "", email: teste[0], value :teste[0]}); 
     3488        } 
     3489        input.bind( "keydown", function( event ) { 
     3490                if ( event.keyCode === $.ui.keyCode.TAB && $( this ).data( "autocomplete" ).menu.active ) { 
     3491                        event.preventDefault(); 
     3492                } 
     3493                if((event.keyCode) == 120){ 
     3494                        emQuickSearch($(this).val(), "."+$(this).parents("tr:first").attr('class').split("-")[0], ID, undefined, true); 
     3495                } 
     3496        }).autocomplete({ 
     3497                minLength: 0,                    
     3498                source: function( request, response ) { 
     3499                        response( $.ui.autocomplete.filter( 
     3500                                mySource, extractLast( request.term ) ) ); 
     3501                }, 
     3502                focus: function() { 
     3503                        return false; 
     3504                }, 
     3505                select: function( event, ui ) { 
     3506                        var terms = mySplit( this.value ); 
     3507                        terms.pop(); 
     3508                        terms.push( (ui.item.name != "" ? "\""+ui.item.name+"\" " : "") + (ui.item.email ? "<"+ui.item.email+">" : "")); 
     3509                        terms.push( "" ); 
     3510                        this.value = terms.join( ", " ); 
     3511                        return false; 
     3512                } 
     3513        }).data( "autocomplete" )._renderItem = function( ul, item ) { 
     3514                ul.css({"max-height" : "115px", "overflow-y" : "auto"}); 
     3515                if( $(ul).find("li").length > 10 ){ 
     3516                        return; 
     3517                } 
     3518                return $( "<li></li>" ) 
     3519                        .data( "item.autocomplete", item ) 
     3520                        .append( "<a>" + item.name + " - " + item.email + "</a>" ) 
     3521                        .appendTo( ul ); 
     3522        }; 
     3523        input.parents("tr:first").find("button").button().click(function(){ 
     3524                emQuickSearch($(this).parents("tr:first").find("textarea").val(), "."+$(this).parents("tr:first").attr('class').split("-")[0], ID, undefined, true); 
     3525        }); 
     3526} 
    34783527                 
    34793528function draw_new_message(border_ID){ 
     
    35443593        }  
    35453594         
    3546         var input_binds = function(input){ 
    3547                 var mySource = new Array(); 
    3548                 var myArray = contacts.split(","); 
    3549                 for(var i in myArray){ 
    3550                         var teste = myArray[i].split(";"); 
    3551                         if(teste.length > 1) 
    3552                                 mySource.push({name : teste[0], email: teste[1], value : (teste[0] +" - "+teste[1])}); 
    3553                         else 
    3554                                 mySource.push({name : "", email: teste[0], value :teste[0]}); 
    3555                 } 
    3556                 input.bind( "keydown", function( event ) { 
    3557                         if ( event.keyCode === $.ui.keyCode.TAB && $( this ).data( "autocomplete" ).menu.active ) { 
    3558                                 event.preventDefault(); 
    3559                         } 
    3560                         if((event.keyCode) == 120){ 
    3561                                 emQuickSearch($(this).val(), "."+$(this).parents("tr:first").attr('class').split("-")[0], ID, undefined, true); 
    3562                         } 
    3563                 }).autocomplete({ 
    3564                         minLength: 0,                    
    3565                         source: function( request, response ) { 
    3566                                 response( $.ui.autocomplete.filter( 
    3567                                         mySource, extractLast( request.term ) ) ); 
    3568                         }, 
    3569                         focus: function() { 
    3570                                 return false; 
    3571                         }, 
    3572                         select: function( event, ui ) { 
    3573                                 var terms = mySplit( this.value ); 
    3574                                 terms.pop(); 
    3575                                 terms.push( (ui.item.name != "" ? "\""+ui.item.name+"\" " : "") + (ui.item.email ? "<"+ui.item.email+">" : "")); 
    3576                                 terms.push( "" ); 
    3577                                 this.value = terms.join( ", " ); 
    3578                                 return false; 
    3579                         } 
    3580                 }).data( "autocomplete" )._renderItem = function( ul, item ) { 
    3581                         ul.css({"max-height" : "115px", "overflow-y" : "auto"}); 
    3582                         if( $(ul).find("li").length > 10 ){ 
    3583                                 return; 
    3584                         } 
    3585                         return $( "<li></li>" ) 
    3586                                 .data( "item.autocomplete", item ) 
    3587                                 .append( "<a>" + item.name + " - " + item.email + "</a>" ) 
    3588                                 .appendTo( ul ); 
    3589                 }; 
    3590                 input.parents("tr:first").find("button").button().click(function(){ 
    3591                         emQuickSearch($(this).parents("tr:first").find("textarea").val(), "."+$(this).parents("tr:first").attr('class').split("-")[0], ID, undefined, true); 
    3592                 }); 
    3593         } 
    35943595         
    3595         input_binds(content.find('[name="input_to"]').css({"max-height" : "115px", "overflow-y" : "auto"}).addClass("elastic").elastic().unbind('blur').focus());        
     3596        input_binds(content.find('[name="input_to"]').css({"max-height" : "115px", "overflow-y" : "auto"}).addClass("elastic").elastic().unbind('blur').focus(), ID);    
    35963597         
    35973598        //Botão TextoRico/TextoSimples 
  • trunk/expressoMail1_2/js/main.js

    r6085 r6106  
    17271727                                if(data.cc != ""){ 
    17281728                                        content.find('[name="input_cc"]').val(data.cc); 
     1729                                        input_binds(content.find('[name="input_cc"]'), new_border_ID); 
    17291730                                        content.find(".cc-tr").show(); 
    17301731                                        content.find(".cc-button").toggleClass("expressomail-button-icon-ative"); 
Note: See TracChangeset for help on using the changeset viewer.