Ignore:
Timestamp:
08/09/12 12:25:44 (12 years ago)
Author:
acoutinho
Message:

Ticket #2966 - Correcoes de bugs e melhorias / suporte a historico em atividades

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.4.2-expresso1/prototype/modules/calendar/js/task.helpers.js

    r6959 r6974  
    431431    UI.dialogs.addTask.find(".input-group .h1").Watermark("Tarefa sem título"); 
    432432    if (User.preferences.hourFormat.length == 5) { 
    433         UI.dialogs.addTask.find(".end-time, .start-time").mask("99:99", { 
     433        UI.dialogs.addTask.find(".end-time, .start-time, .time-previsao").mask("99:99", { 
    434434            completed: function () { 
    435435                updateMap(); 
     
    653653            'type': 'question', 
    654654            'overlay_opacity': '0.5', 
    655             'buttons': ['Sim', 'Não'], 
     655            'buttons': ['Sim', 'Não'], 
    656656            'onClose': function (clicked) { 
    657657                if (clicked == 'Sim') { 
     
    683683    }); 
    684684    var maxSizeFile = 2000000; 
    685     $('#fileupload').fileupload({ 
     685    $('#fileuploadtask').fileupload({ 
    686686        sequentialUploads: true, 
    687687        add: function (e, data) { 
     
    697697                if (file.size > maxSizeFile) attach.error = 'Tamanho de arquivo nao permitido!!' 
    698698 
    699                 $('.attachments-list').append(DataLayer.render(path + 'templates/attachment_add_itemlist.ejs', { 
     699                $('div.new-task-win .attachments-list').append(DataLayer.render(path + 'templates/attachment_add_itemlist.ejs', { 
    700700                    file: attach 
    701701                })); 
    702702 
    703703                if (file.size < maxSizeFile) { 
    704                     $('.fileinput-button.new').append(data.fileInput[0]).removeClass('new'); 
    705                     $('.attachments-list').find('[type=file]').addClass('hidden'); 
    706  
    707                 } else $('.fileinput-button.new').removeClass('new'); 
    708  
    709  
    710                 $('.attachments-list').find('.button.close').button({ 
     704                    $('div.new-task-win .fileinput-button.new').append(data.fileInput[0]).removeClass('new'); 
     705                    $('div.new-task-win .attachments-list').find('[type=file]').addClass('hidden'); 
     706 
     707                } else $('div.new-task-win .fileinput-button.new').removeClass('new'); 
     708 
     709 
     710                $('div.new-task-win .attachments-list').find('.button.close').button({ 
    711711                    icons: { 
    712712                        primary: "ui-icon-close" 
     
    715715                }).click(function () { 
    716716                    var idAttach = $(this).parent().find('input[name="fileId[]"]').val(); 
    717                     $('.attachment-list').find('input[value="' + idAttach + '"]') 
     717                    $('div.new-task-win .attachment-list').find('input[value="' + idAttach + '"]') 
    718718                    $(this).parent().remove(); 
    719719                }); 
     
    722722        }, 
    723723        done: function (e, data) { 
    724             var currentUpload = $('.progress.after-upload:first').removeClass('after-upload').addClass('on-complete').hide(); 
     724            var currentUpload = $('div.new-task-win .progress.after-upload:first').removeClass('after-upload').addClass('on-complete').hide(); 
    725725 
    726726            if ( !! data.result && data.result != "[]") { 
    727727                var newAttach = (attch = jQuery.parseJSON(data.result)) ? attch : jQuery.parseJSON(data.result[0].activeElement.childNodes[0].data); 
    728                 $('.attachment-list').append('<input tyepe="hidden" name="attachment[]" value="' + newAttach['attachment'][0][0].id + '"/>'); 
     728                $('div.new-task-win .attachment-list').append('<input tyepe="hidden" name="attachment[]" value="' + newAttach['attachment'][0][0].id + '"/>'); 
    729729                currentUpload.removeClass('on-complete').parents('p').append('<input type="hidden" name="fileId[]" value="' + newAttach['attachment'][0][0].id + '"/>').find('.status-upload').addClass('ui-icon ui-icon-check'); 
    730730            } else currentUpload.removeClass('on-complete').parents('p').find('.status-upload').addClass('ui-icon ui-icon-cancel'); 
    731731        } 
    732732    }); 
    733     $('.attachments-list .button').button(); 
    734  
    735     if ( !! window.FormData) $('#fileupload').bind('fileuploadstart', function () { 
     733    $('div.new-task-win .attachments-list .button').button(); 
     734 
     735    if ( !! window.FormData) $('#fileuploadtask').bind('fileuploadstart', function () { 
    736736        var widget = $(this), 
    737             progressElement = $('#fileupload-progress').fadeIn(), 
     737            progressElement = $('#fileupload-progress-task').fadeIn(), 
    738738            interval = 500, 
    739739            total = 0, 
Note: See TracChangeset for help on using the changeset viewer.