Changeset 6648 for trunk


Ignore:
Timestamp:
06/26/12 17:49:02 (12 years ago)
Author:
angelo
Message:

Ticket #2909 - Redimensionamento dinamico da janela auto-completar destinatario

File:
1 edited

Legend:

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

    r6642 r6648  
    40844084                        if($(ul).find("li").length < 50){ 
    40854085                                var autocomplete = $(this)[0].element; 
    4086                                 ul.css({"min-width":"500px", "width":"50%", "max-height" : "180px", "overflow-y" : "auto", "min-height": "30px"}); 
     4086                                //cálculo dinâmico da largura da lista 
     4087                                var width = (item.label ? item.label.length : (item.value ? item.value.length : (item.email ? item.email.length : 20 ))); 
     4088                                width = width*5 + (is_ie ? 170 : 200) + 16; 
     4089                                if (width < $(ul).width()) 
     4090                                        width = $(ul).width(); 
     4091                                ul.css({"min-width":width,"max-height" : "180px", "overflow-y" : "auto", "min-height": "30px"}); 
    40874092                                var listContacts = DataLayer.render("../prototype/modules/mail/templates/listContacts.ejs", item); 
    40884093                                return $(listContacts).data( "item.autocomplete", item ).appendTo( ul ).find("span:last").button({ 
Note: See TracChangeset for help on using the changeset viewer.