Changeset 5626 for trunk/expressoMail1_2/js/draw_api.js
- Timestamp:
- 03/05/12 16:55:14 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/draw_api.js
r5625 r5626 4205 4205 attach.fullFileName = file.name; 4206 4206 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); 4209 4209 attach.fileSize = formatBytes(file.size); 4210 4210 if(maxAttachmentSise && file.size > maxAttachmentSise) 4211 4211 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 }else4219 fileUploadMSG.find(' .fileinput-button.new').removeClass('new');4220 4212 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({ 4222 4215 icons: { 4223 4216 primary: "ui-icon-close" … … 4230 4223 $(this).parent().remove(); 4231 4224 }); 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'); 4232 4233 4233 4234 })}, … … 4274 4275 var attach = {}; 4275 4276 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 4276 4280 attach.fileSize = formatBytes(onceOpenedMessages[folder_name][message_number].size); 4277 4281 var upload = $(DataLayer.render("../prototype/modules/mail/templates/attachment_add_itemlist.ejs", {file : attach})); 4278 4282 upload.find('.status-upload').remove(); 4279 4283 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+'\'/>'); 4282 4285 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); 4283 4299 } 4284 4300 … … 4287 4303 4288 4304 jQuery('#message-attach-dialog').dialog('close'); 4289 4290 //botao fechar4291 $('.attachments-list').find('.button.close').button({4292 icons: {4293 primary: "ui-icon-close"4294 },4295 text: false4296 }).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 });4302 4305 4303 4306 });
Note: See TracChangeset
for help on using the changeset viewer.