Changeset 5515 for trunk/prototype/modules/calendar/js/helpers.js
- Timestamp:
- 02/15/12 10:21:28 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/calendar/js/helpers.js
r5514 r5515 1 function formatBytes(bytes) { 2 if (bytes >= 1000000000) { 3 return (bytes / 1000000000).toFixed(2) + ' GB'; 4 } 5 if (bytes >= 1000000) { 6 return (bytes / 1000000).toFixed(2) + ' MB'; 7 } 8 if (bytes >= 1000) { 9 return (bytes / 1000).toFixed(2) + ' KB'; 10 } 11 return bytes + ' B'; 12 }; 13 1 14 function validDateEvent(){ 2 15 var start_date = $(".new-event-win.active .start-date").val(); … … 241 254 checked = true; 242 255 $(this).parents('li').find('.button.edit').click(); 243 //$('.qtip-active .button.save .ui-button-text').html('Aplicar a todos')244 256 } 245 246 checked = true;247 $(this).parents('li').find('.button.edit').click();248 257 }).removeClass('new'); 249 258 … … 890 899 if(file.name.length > 10) 891 900 attach.fileName = file.name.substr(0, 6) + file.name.substr(file.name.length-4, file.name.length); 892 attach.fileSize = f ile.size;901 attach.fileSize = formatBytes(file.size); 893 902 if(file.size > 30000000) 894 903 attach.error = 'Tamanho de arquivo nao permitido!!' … … 941 950 } 942 951 }); 943 $('.attachments-list .button').button(); 944 945 946 952 $('.attachments-list .button').button(); 953 947 954 $('#fileupload').bind('fileuploadstart', function () { 948 955 var widget = $(this), … … 972 979 ('0' + date.getUTCSeconds()).slice(-2); 973 980 }, 974 formatBytes = function (bytes) {981 /* formatBytes = function (bytes) { 975 982 if (bytes >= 1000000000) { 976 983 return (bytes / 1000000000).toFixed(2) + ' GB'; … … 983 990 } 984 991 return bytes + ' B'; 985 }, 992 },*/ 986 993 formatPercentage = function (floatValue) { 987 994 return (floatValue * 100).toFixed(2) + ' %';
Note: See TracChangeset
for help on using the changeset viewer.