Changeset 5515


Ignore:
Timestamp:
02/15/12 10:21:28 (12 years ago)
Author:
acoutinho
Message:

Ticket #2434 - Correcoes e melhorias na visualizacao de anexos e participantes

Location:
trunk/prototype/modules/calendar
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/modules/calendar/css/layout.css

    r5514 r5515  
    271271*/ 
    272272 
    273 .attendee-options{ position: absolute; top: 0; left: 300px; background-color: white; z-index: 100; width: 90px; background-color: #FFF; padding: 0 5px 0 3px; text-align: right;} 
     273.attendee-options{ position: absolute; top: 0; left: 287px; background-color: white; z-index: 100; width: 90px; background-color: #FFF; padding: 0 20px 0 3px; text-align: right;} 
    274274.attendees-list .not-attendee { height:16px; } 
    275275 
     
    538538.archive-nome{width: 73px;} 
    539539.archive-nome label{display: block; position: absolute; left: 136px; top: 194px;} 
    540 .archive-size{min-width:100px; max-width:100px;} 
     540.archive-size{min-width:70px; max-width:75px;} 
    541541 
    542542 
  • trunk/prototype/modules/calendar/js/calendar.codecs.js

    r5514 r5515  
    508508                                        var attach = DataLayer.get('schedulableToAttachment', attachment, false); 
    509509                                        attach.name = attach.name.length < 10 ?  attach.name : ( attach.name.substr(0, 6) + attach.name.substr( attach.name.length-4, attach.name.length)); 
    510                                          
     510                                        attach.size = formatBytes(attach.size); 
    511511                                        return attach; 
    512512                                }),                                              
  • trunk/prototype/modules/calendar/js/helpers.js

    r5514 r5515  
     1function 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 
    114function validDateEvent(){ 
    215        var start_date = $(".new-event-win.active .start-date").val(); 
     
    241254                                checked = true; 
    242255                                $(this).parents('li').find('.button.edit').click(); 
    243                                 //$('.qtip-active .button.save .ui-button-text').html('Aplicar a todos') 
    244256                        } 
    245                          
    246                         checked = true; 
    247                         $(this).parents('li').find('.button.edit').click(); 
    248257                }).removeClass('new'); 
    249258         
     
    890899                                if(file.name.length > 10) 
    891900                                        attach.fileName = file.name.substr(0, 6) + file.name.substr(file.name.length-4, file.name.length); 
    892                                 attach.fileSize = file.size; 
     901                                attach.fileSize = formatBytes(file.size); 
    893902                                if(file.size > 30000000) 
    894903                                        attach.error = 'Tamanho de arquivo nao permitido!!' 
     
    941950                } 
    942951        }); 
    943                 $('.attachments-list .button').button(); 
    944                  
    945                  
    946                  
     952        $('.attachments-list .button').button(); 
     953                         
    947954        $('#fileupload').bind('fileuploadstart', function () { 
    948955                var widget = $(this), 
     
    972979                ('0' + date.getUTCSeconds()).slice(-2); 
    973980        }, 
    974         formatBytes = function (bytes) { 
     981       /* formatBytes = function (bytes) { 
    975982            if (bytes >= 1000000000) { 
    976983                return (bytes / 1000000000).toFixed(2) + ' GB'; 
     
    983990            } 
    984991            return bytes + ' B'; 
    985         }, 
     992        },*/ 
    986993        formatPercentage = function (floatValue) { 
    987994            return (floatValue * 100).toFixed(2) + ' %'; 
  • trunk/prototype/modules/calendar/templates/attachment_add_itemlist.ejs

    r5514 r5515  
    55                 
    66                <label class="lbl-archive-size">Tamanho:</label> 
    7                 <span class="archive-size"><%=data.file.fileSize%> kb</span> 
     7                <span class="archive-size"><%=data.file.fileSize%></span> 
    88                <button type="button" class="button close tiny upload delete-upload" title="Deletar">Deletar</button> 
    99                <span class="status-upload"></span> 
  • trunk/prototype/modules/calendar/templates/event_add.ejs

    r5514 r5515  
    181181                                                         
    182182                                                        <label class="lbl-archive-size">Tamanho:</label> 
    183                                                         <span class="archive-size"><%=data.event.attachments[i].size%> kb</span> 
     183                                                        <span class="archive-size"><%=data.event.attachments[i].size%></span> 
    184184                                                        <a href="../prototype/getArchive.php?attachment=<%=data.event.attachments[i].id%>" class="button tiny upload downlaod-archive">Download</a> 
    185185                                                        <%if(data.event.acl.organization || data.event.acl.write){%> 
     
    198198         
    199199    </form> 
    200  
    201         </fieldset> 
    202  
    203         </fieldset> 
    204 --> 
    205     </form> 
     200        </fieldset> 
    206201        <form action="../prototype/modules/calendar/export.php" method="GET" class="form-export content"> 
    207202                <input type="hidden" class="id-event" name="event" value="<%= data.event.id %>"/> 
Note: See TracChangeset for help on using the changeset viewer.