Changeset 5702 for trunk/library


Ignore:
Timestamp:
03/12/12 11:34:43 (12 years ago)
Author:
cristiano
Message:

Ticket #2497 - Mensagem de erro em falha no upload, alerta de arquivos em upload ao enviar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/library/ckeditor/plugins/expresso/plugin.js

    r5604 r5702  
    169169                        if(!!data.result && data.result != "[]"){ 
    170170                                var newAttach = jQuery.parseJSON(data.result); 
    171                                 fileUploadMSG.find('.in-progress:first').parents('p').append('<input type="hidden" name="fileId[]" value="'+newAttach['mailAttachment'][0][0].id+'"/>'); 
    172                                 addAttachment(ID,newAttach['mailAttachment'][0][0].id); 
    173                                 var content_body  = RichTextEditor.getData('body_'+ID); 
    174                                 var rex = new RegExp('<img id="'+newImageId+'" src="" [^\/>]*\/>', 'i');  
    175                                 var newImg = '<img src="../prototype/getArchive.php?mailAttachment='+newAttach['mailAttachment'][0][0].id+'" />';  
    176                                 content_body = content_body.replace(rex,newImg);  
    177                                 RichTextEditor.setData('body_'+ID,content_body);  
     171                                if(newAttach.rollback === false) 
     172                                { 
     173                                    fileUploadMSG.find('.in-progress:first').parents('p').append('<input type="hidden" name="fileId[]" value="'+newAttach['mailAttachment'][0][0].id+'"/>'); 
     174                                    addAttachment(ID,newAttach['mailAttachment'][0][0].id); 
     175                                    var content_body  = RichTextEditor.getData('body_'+ID); 
     176                                    var rex = new RegExp('<img id="'+newImageId+'" src="" [^\/>]*\/>', 'i');  
     177                                    var newImg = '<img src="../prototype/getArchive.php?mailAttachment='+newAttach['mailAttachment'][0][0].id+'" />';  
     178                                    content_body = content_body.replace(rex,newImg);  
     179                                    RichTextEditor.setData('body_'+ID,content_body);  
     180                                } 
     181                                else 
     182                                    fileUploadMSG.find('.in-progress:first').parents('p').find('.status-upload').append('Erro ao fazer upload!').addClass('message-attach-error');    
    178183       
    179184                        }else { 
    180                                 fileUploadMSG.find(' .progress.on-complete:first').removeClass('on-complete').parents('p').find('.status-upload').addClass('ui-icon ui-icon-cancel'); 
     185                                    fileUploadMSG.find('.in-progress:first').parents('p').find('.status-upload').append('Erro ao fazer upload!').addClass('message-attach-error');    
    181186                        } 
    182187                        fileUploadMSG.find('.in-progress:first').remove(); 
Note: See TracChangeset for help on using the changeset viewer.