Ignore:
Timestamp:
03/14/12 15:15:03 (12 years ago)
Author:
acoutinho
Message:

Ticket #2434 - Correcao no nome de arquivos anexados sem extensao

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/modules/calendar/js/calendar.codecs.js

    r5715 r5720  
    584584                                attachments: $.map(objEvent.attachments || [], function( attachment, i ){ 
    585585                                        var attach = DataLayer.get('schedulableToAttachment', attachment, false); 
    586                                         attach.name = attach.name.length < 10 ?  attach.name : ( attach.name.substr(0, 6) + attach.name.substr( attach.name.length-4, attach.name.length)); 
     586                                        var ext = attach.name.split('.'); 
     587                                        attach.name = attach.name.length < 10 ?  attach.name : ( ext.length == 1 ? attach.name.substr(0, 10) : (attach.name.substr(0, 6) + '.' +  ext[ext.length -1])); 
    587588                                        attach.size = formatBytes(attach.size); 
    588589                                        return attach; 
Note: See TracChangeset for help on using the changeset viewer.