Ignore:
Timestamp:
05/31/12 18:24:52 (12 years ago)
Author:
acoutinho
Message:

Ticket #2821 - Inconsistências na interface de anexos e na remoção de anexos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/modules/calendar/js/helpers.js

    r6359 r6369  
    13311331    text: 'Excluir' 
    13321332}).click(function () { 
    1333     $('.row.fileupload-buttonbar .attachments-list p').remove(); 
    1334                                  
    1335     var ids = []; 
    1336     $.each($('.attachment-list input'), function (i, input) { 
    1337         ids.push(input.value); 
    1338     }); 
    1339     if(ids.length > 0){ 
    1340         DataLayer.remove('attachment', { 
    1341             filter: ['IN', 'id', ids] 
    1342             }); 
    1343         $('.attachment-list input').remove(); 
    1344     } 
     1333    $.Zebra_Dialog('Tem certeza que deseja excluir todos anexos?', { 
     1334        'type':     'question', 
     1335        'overlay_opacity': '0.5', 
     1336        'buttons':  ['Sim', 'Não'], 
     1337        'onClose':  function(clicked) { 
     1338            if(clicked == 'Sim'){ 
     1339                 
     1340                var ids = []; 
     1341                $.each($('.attachment-list input'), function (i, input) { 
     1342                     DataLayer.remove('schedulableToAttachment', { 
     1343                        filter: ['=', 'id', ''+input.value] 
     1344                        }); 
     1345                }); 
     1346                $('.attachment-list input').remove(); 
     1347                $('.row.fileupload-buttonbar .attachments-list p').remove(); 
     1348            } 
     1349        }}); 
    13451350}).end() 
    13461351.filter('.close').button({ 
     
    13501355    text: false 
    13511356}).click(function () { 
    1352     DataLayer.remove('attachment', $(this).parents('p').find('input[name="fileId[]"]').val()); 
     1357    DataLayer.remove('schedulableToAttachment', $(this).parents('p').find('input[name="fileId[]"]').val()); 
    13531358    $(this).parents('p').remove(); 
    13541359}).end() 
Note: See TracChangeset for help on using the changeset viewer.