Ignore:
Timestamp:
05/25/12 18:17:54 (12 years ago)
Author:
niltonneto
Message:

Ticket #2507 - Implementação modificada para compatibilizar com API do Expresso 2.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/webservice/restclient/index.html

    r6316 r6323  
    199199                                                $('#attachment_id').prop('disabled',false); 
    200200                                                var attachments = a_response.result.messages[0].msgAttachments; 
     201                                                var idxFile = 0; 
    201202                                                for (var j in attachments){ 
    202                                                         $("#attachment_id").append("<option value='"+attachments[j].pid+"'>"+attachments[j].name+"</option>"); 
     203                                                        var value = {   ID: attachments[j].pid, 
     204                                                                                        index: idxFile, 
     205                                                                                        name:attachments[j].name, 
     206                                                                                        encoding:attachments[j].encoding 
     207                                                                                }; 
     208                                                        $("#attachment_id").append("<option value='"+$.toJSON(value)+"'>"+attachments[j].name+"</option>"); 
     209                                                        idxFile++; 
    203210                                                } 
    204211                                        } 
     
    382389                var form = document.createElement("form");               
    383390                $(form).attr({"action":_server+"Mail/Attachment","method":"POST"});              
    384  
     391                var attachment = JSON.parse($('#attachment_id').val());          
    385392                var _params = { 
    386393                                auth:  getCookie('auth') != null ? getCookie('auth') : "", 
    387394                                folderID:  $('#folder_id').val(), 
    388395                                msgID:  $('#message_id').val(), 
    389                                 attachmentID: $('#attachment_id').val() 
     396                                attachmentID: attachment.ID, 
     397                                attachmentName: attachment.name, 
     398                                attachmentIndex: attachment.index, 
     399                                attachmentEncoding: attachment.encoding 
    390400                        }; 
    391401 
Note: See TracChangeset for help on using the changeset viewer.