- Timestamp:
- 09/11/11 09:16:08 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/MAExpressoPattern.js
r5049 r5085 71 71 72 72 MAPattern.prototype.toExpressoAttachmentsHeader = function(data){ 73 if((typeof(data) != 'undefined') && (data.length > 0)){73 if((typeof(data) != 'undefined') && (data.length > 2)){ 74 74 var Attdata = eval("(" + data + ")"); 75 75 if(typeof(Attdata.attachment) != 'undefined'){ … … 185 185 186 186 MAPattern.prototype.toExpressoHeader = function(data){ 187 var tplHeader = 'a: 16:{'187 var tplHeader = 'a:26:{' 188 188 + 's:11:"ContentType";' 189 189 + 's:' + data.getContentType().length + ':"' + data.getContentType() + '";' … … 382 382 var objTag = eval('(' + tagData + ')'); 383 383 var tplHMail = ""; 384 384 385 if(objTag.tag){ 385 386 //More than 1 attachment - because length will be 'undefined' if just one exists 386 387 if(objTag.tag.length >= 0){ … … 423 424 tplHMail += 's:7:"Flagged";s:1:" ";'; 424 425 } 426 } 425 427 426 428 //No header to tag … … 442 444 var srlData = ""; 443 445 444 //There are attacments, map them446 //There are attacments, map all them 445 447 if(typeof(objAtt.attachment) != 'undefined'){ 446 448 srlData = 's:12:"array_attach";a:' + objAtt.attachment.length + ':{'; 447 449 for(var m=0; m<objAtt.attachment.length; m++){ 448 //TODO "download" parametr at webservice => var urllink = 'http://10.200.242.186:4333/part/'+objAtt.attachment[m]["@id"]+'/download';449 //var urllink = 'http://10.200.242.186:4333/part/'+objAtt.attachment[m]["@id"];450 //var urllink = mail_archive_protocol+'://'+mail_archive_host+':'+mail_archive_port+'/part/'+objAtt.attachment[m]["@id"];451 450 var urllink = mail_archive_protocol+'://'+mail_archive_host+':'+mail_archive_port+'/part/download/'+objAtt.attachment[m]["@id"]; 452 451 srlData += 's:1:"' + m + '";' … … 468 467 MAPattern.prototype.toExpressoMailURLExportFile = function(path, file){ 469 468 var srlData = 's:15:"url_export_file";'; 470 //var urllink = 'http://10.200.242.186:4333/mail/'+path+'/'+file+'/download';471 //var urllink = 'http://10.200.242.186:4333/mail/'+path+'/'+file;472 469 var urllink = mail_archive_protocol+'://'+mail_archive_host+':'+mail_archive_port+'/mail/'+path+'/'+file; 473 470 srlData += 's:' + urllink.length + ':"' + urllink + '";' … … 578 575 retorno['msg_folder'] = "local_"+rs.field(7); //Now it's a local folder 579 576 retorno['msg_number'] = rs.field(0)+plus_id; //the message number is the rowid 580 **/ 577 **/ 578 } 579 580 MAPattern.prototype.tagConfig = function(taglist, arcidmsg){ 581 if(taglist != null){ 582 var tagdata = ""; 583 584 //Draft folder, are "draft" 585 if(expresso_mail_archive.folder_destination == 'drafts'){ 586 tagdata += '<add value="draft"/>'; 587 } 588 589 //Trash folder, are "deleted"" 590 if(expresso_mail_archive.folder_destination == 'trash'){ 591 tagdata += '<add value="deleted"/>'; 592 } 593 594 for(var x in taglist[0]){ 595 if((taglist[0][x] != '') && (taglist[0][x] != ' ') && (taglist[0][x] != null) && (x != 'msgid')) 596 tagdata += '<add value="'+x+'"/>'; 597 } 598 599 if(tagdata != ""){ 600 601 var tobject = '<tag>' 602 + '<message id="'+arcidmsg+'">' 603 + tagdata 604 + '</message>' 605 + '</tag>'; 606 return(tobject); 607 } 608 return(null); 609 } 610 return(null); 581 611 } 582 612 -->
Note: See TracChangeset
for help on using the changeset viewer.