- Timestamp:
- 08/09/12 12:25:44 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.4.2-expresso1/prototype/modules/calendar/js/task.helpers.js
r6959 r6974 431 431 UI.dialogs.addTask.find(".input-group .h1").Watermark("Tarefa sem título"); 432 432 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", { 434 434 completed: function () { 435 435 updateMap(); … … 653 653 'type': 'question', 654 654 'overlay_opacity': '0.5', 655 'buttons': ['Sim', 'N ão'],655 'buttons': ['Sim', 'Não'], 656 656 'onClose': function (clicked) { 657 657 if (clicked == 'Sim') { … … 683 683 }); 684 684 var maxSizeFile = 2000000; 685 $('#fileupload ').fileupload({685 $('#fileuploadtask').fileupload({ 686 686 sequentialUploads: true, 687 687 add: function (e, data) { … … 697 697 if (file.size > maxSizeFile) attach.error = 'Tamanho de arquivo nao permitido!!' 698 698 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', { 700 700 file: attach 701 701 })); 702 702 703 703 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({ 711 711 icons: { 712 712 primary: "ui-icon-close" … … 715 715 }).click(function () { 716 716 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 + '"]') 718 718 $(this).parent().remove(); 719 719 }); … … 722 722 }, 723 723 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(); 725 725 726 726 if ( !! data.result && data.result != "[]") { 727 727 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 + '"/>'); 729 729 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'); 730 730 } else currentUpload.removeClass('on-complete').parents('p').find('.status-upload').addClass('ui-icon ui-icon-cancel'); 731 731 } 732 732 }); 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 () { 736 736 var widget = $(this), 737 progressElement = $('#fileupload-progress ').fadeIn(),737 progressElement = $('#fileupload-progress-task').fadeIn(), 738 738 interval = 500, 739 739 total = 0,
Note: See TracChangeset
for help on using the changeset viewer.