Ignore:
Timestamp:
07/25/12 16:02:01 (12 years ago)
Author:
gustavo
Message:

Ticket #2954 - Corrigidos alguns bugs de anexos e selecao de mensagens

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.4.2-expresso2/library/ckeditor/plugins/expresso/plugin.js

    r6776 r6875  
    125125                }, 
    126126                add: function (e, data) { 
    127       
     127            var iterator = idattachbycontent; 
    128128                        if(!maxAttachmentSize || data.files[0].size < maxAttachmentSize || is_ie) { 
    129129                                setTimeout(function() { 
    130130                                        $('#attDisposition'+ID).val('embedded'); 
    131                                         data.submit(); 
    132                                 }, 5000); 
     131                                        jqXHR[iterator] = data.submit(); 
     132                                }, 100); 
    133133                        } 
    134134            fileUploadMSG.find(' .attachments-list').show(); 
     
    166166                        fileUploadMSG.find(' .attachments-list').hide(); 
    167167                    } 
     168                    if(jqXHR){ 
     169                        jqXHR[iterator].abort(); 
     170                    } 
    168171                                }); 
    169172                                 
    170             fileUploadMSG.find('.attachments-list').append(upload); 
    171             fileUploadMSG.find('.attachments-list .att-box:last').qtip({ 
    172                 content: DataLayer.render("../prototype/modules/mail/templates/attachment_add_itemlist_tooltip.ejs", {attach : attach}), 
    173                 position: { 
    174                     corner: { 
    175                         tooltip: 'bottomMiddle', 
    176                         target: 'topMiddle' 
    177                     }, 
    178                     adjust: { 
    179                        resize: true, 
    180                        scroll: true 
    181                     } 
    182                 }, 
    183                 show: { 
    184                     when: 'mouseover', // Don't specify a show event 
    185                     ready: false // Show the tooltip when ready 
    186                 }, 
    187                 hide: 'mouseout', // Don't specify a hide event 
    188                 style: { 
    189                     border: { 
    190                         width: 1, 
    191                         radius: 5 
    192                     }, 
    193                     padding: 3,  
    194                     textAlign: 'left', 
    195                     tip: true, // Give it a speech bubble tip with automatic corner detection 
    196                     name: (typeof(attach.error) == 'boolean' ? 'light' : 'red') // Style it according to the preset 'cream' style 
    197                 } 
    198             }); 
    199                         if(!maxAttachmentSize || file.size < maxAttachmentSize){ 
    200                                 if(data.fileInput){ 
    201                                         fileUploadMSG.find('.fileinput-button.new').append(data.fileInput[0]).removeClass('new'); 
    202                                         fileUploadMSG.find('.attachments-list').find('[type=file]').addClass('hidden');  
    203                                 } 
    204                         }else 
    205                                 fileUploadMSG.find(' .fileinput-button.new').removeClass('new'); 
    206                                                                  
     173                fileUploadMSG.find('.attachments-list').append(upload); 
     174                fileUploadMSG.find('.attachments-list .att-box:last').qtip({ 
     175                    content: DataLayer.render("../prototype/modules/mail/templates/attachment_add_itemlist_tooltip.ejs", {attach : attach}), 
     176                    position: { 
     177                        corner: { 
     178                            tooltip: 'bottomMiddle', 
     179                            target: 'topMiddle' 
     180                        }, 
     181                        adjust: { 
     182                           resize: true, 
     183                           scroll: true 
     184                        } 
     185                    }, 
     186                    show: { 
     187                        when: 'mouseover', // Don't specify a show event 
     188                        ready: false // Show the tooltip when ready 
     189                    }, 
     190                    hide: 'mouseout', // Don't specify a hide event 
     191                    style: { 
     192                        border: { 
     193                            width: 1, 
     194                            radius: 5 
     195                        }, 
     196                        padding: 3,  
     197                        textAlign: 'left', 
     198                        tip: true, // Give it a speech bubble tip with automatic corner detection 
     199                        name: (typeof(attach.error) == 'boolean' ? 'light' : 'red') // Style it according to the preset 'cream' style 
     200                    } 
     201                }); 
     202                        if(!maxAttachmentSize || file.size < maxAttachmentSize){ 
     203                                if(data.fileInput){ 
     204                                        fileUploadMSG.find('.fileinput-button.new').append(data.fileInput[0]).removeClass('new'); 
     205                                        fileUploadMSG.find('.attachments-list').find('[type=file]').addClass('hidden');  
     206                                } 
     207                        }else{ 
     208                                fileUploadMSG.find(' .fileinput-button.new').removeClass('new'); 
     209                        }                                        
    207210                CKEDITOR.instances['body_'+ID].insertHtml('<img src=""/>'); 
    208  
     211                idattachbycontent++;  
    209212                        }); 
    210213                 
    211214            CKEDITOR.dialog.getCurrent().hide();         
    212                          
     215                        
    213216                }, 
    214217                done: function(e, data){ 
Note: See TracChangeset for help on using the changeset viewer.