Ignore:
Timestamp:
03/05/12 16:55:14 (12 years ago)
Author:
cristiano
Message:

Ticket #2497 - Nova estrategia para o salvamento automatico de rascunhos

File:
1 edited

Legend:

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

    r5625 r5626  
    42054205                                attach.fullFileName = file.name; 
    42064206                                attach.fileName = file.name; 
    4207                                 if(file.name.length > 10) 
    4208                                         attach.fileName = file.name.substr(0, 18) + "..." + file.name.substr(file.name.length-9, file.name.length); 
     4207                                if(file.name.length > 50) 
     4208                                        attach.fileName = file.name.substr(0, 32) + " ... " + file.name.substr(file.name.length-9, file.name.length); 
    42094209                                attach.fileSize = formatBytes(file.size); 
    42104210                                if(maxAttachmentSise && file.size > maxAttachmentSise) 
    42114211                                        attach.error = 'Tamanho de arquivo nao permitido!!' 
    4212                                                                  
    4213                                 fileUploadMSG.find('.attachments-list').append(DataLayer.render("../prototype/modules/mail/templates/attachment_add_itemlist.ejs", {file : attach})); 
    4214  
    4215                                 if(!maxAttachmentSise || file.size < maxAttachmentSise){ 
    4216                                         fileUploadMSG.find('.fileinput-button.new').append(data.fileInput[0]).removeClass('new'); 
    4217                                         fileUploadMSG.find('.attachments-list').find('[type=file]').addClass('hidden');  
    4218                                 }else 
    4219                                         fileUploadMSG.find(' .fileinput-button.new').removeClass('new'); 
    42204212                                 
    4221                                 fileUploadMSG.find(' .attachments-list').find('.button.close').button({ 
     4213                                var upload = $(DataLayer.render("../prototype/modules/mail/templates/attachment_add_itemlist.ejs", {file : attach}));                            
     4214                                upload.find('.button.close').button({ 
    42224215                                        icons: { 
    42234216                                                primary: "ui-icon-close" 
     
    42304223                                        $(this).parent().remove(); 
    42314224                                }); 
     4225                                 
     4226                                fileUploadMSG.find('.attachments-list').append(upload); 
     4227 
     4228                                if(!maxAttachmentSise || file.size < maxAttachmentSise){ 
     4229                                        fileUploadMSG.find('.fileinput-button.new').append(data.fileInput[0]).removeClass('new'); 
     4230                                        fileUploadMSG.find('.attachments-list').find('[type=file]').addClass('hidden');  
     4231                                }else 
     4232                                        fileUploadMSG.find(' .fileinput-button.new').removeClass('new'); 
    42324233 
    42334234                })}, 
     
    42744275                                                        var attach = {}; 
    42754276                                                        attach.fileName = att.name 
     4277                                                        if(attach.fileName.length > 45) 
     4278                                                                attach.fileName = attach.fileName.substr(0, 32) + " ... " + attach.fileName.substr(attach.fileName.length-9, attach.fileName.length); 
     4279 
    42764280                                                        attach.fileSize = formatBytes(onceOpenedMessages[folder_name][message_number].size); 
    42774281                                                        var upload = $(DataLayer.render("../prototype/modules/mail/templates/attachment_add_itemlist.ejs", {file : attach})); 
    42784282                                                        upload.find('.status-upload').remove(); 
    42794283                                                        upload.find('.in-progress').remove();  
    4280                                                         upload.find('p').append('<input type="hidden" name="fileId[]" value=\''+idATT+'\'/>'); 
    4281                                                         fileUploadMSG.find('.attachments-list').append(upload); 
     4284                                                        upload.append('<input type="hidden" name="fileId[]" value=\''+idATT+'\'/>'); 
    42824285                                                         
     4286                                                        upload.find('.button.close').button({ 
     4287                                                            icons: { 
     4288                                                                            primary: "ui-icon-close" 
     4289                                                                    }, 
     4290                                                                    text: false 
     4291                                                            }).click(function(){ 
     4292                                                                    var idAttach = $(this).parent().find('input[name="fileId[]"]').val(); 
     4293                                                                    fileUploadMSG.find(' .attachments-list').find('input[value="'+idAttach+'"]'); 
     4294                                                                    delAttachment(ID,idAttach);  
     4295                                                                    $(this).parent().remove(); 
     4296                                                        });      
     4297                                                         
     4298                                                        fileUploadMSG.find('.attachments-list').append(upload);    
    42834299                                                } 
    42844300 
     
    42874303                                 
    42884304                                jQuery('#message-attach-dialog').dialog('close'); 
    4289                                  
    4290                                 //botao fechar 
    4291                                 $('.attachments-list').find('.button.close').button({ 
    4292                                         icons: { 
    4293                                                 primary: "ui-icon-close" 
    4294                                         }, 
    4295                                         text: false 
    4296                                 }).click(function(){ 
    4297                                         var idAttach = $(this).parent().find('input[name="fileId[]"]').val(); 
    4298                                         fileUploadMSG.find(' .attachments-list').find('input[value="'+idAttach+'"]'); 
    4299                                         delAttachment(ID,idAttach);  
    4300                                         $(this).parent().remove(); 
    4301                                 });      
    43024305                                 
    43034306                        }); 
Note: See TracChangeset for help on using the changeset viewer.