Ignore:
Timestamp:
08/10/12 12:25:20 (12 years ago)
Author:
acoutinho
Message:

Ticket #2966 - Correcao de bugs e refactoring das novas funcionalidades

File:
1 edited

Legend:

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

    r6979 r6985  
    731731        dueTime: (!objEvent.due || objEvent.due == '' || objEvent.due == '0') ? '' : dateCalendar.formatDate(Timezone.getDateEvent(new Date( parseInt(objEvent.due)), objEvent.timezone, objEvent.calendar, objEvent.DayLigth, 'startTime'), User.preferences.hourFormat), 
    732732        allDay: !!parseInt( objEvent.allDay ), 
    733             historic: !!objEvent.historic ? decodeHistotic(objEvent) : [] , 
     733            historic: !!objEvent.historic ? decodeHistoric(objEvent) : [] , 
    734734        attachments: $.map(objEvent.attachments || [], function( attachment, i ){ 
    735735            var attach = DataLayer.get('schedulableToAttachment', attachment, false); 
     
    807807}); 
    808808 
    809 function decodeHistotic ( evt ) { 
     809function decodeHistoric ( evt ) { 
    810810    var historic = evt.historic; 
    811811    var decoded = []; 
     
    819819        'priority': 'Priorudade', 
    820820        'due' : 'Previsão de término' 
     821    } 
     822     
     823    var statusDecoded = { 
     824        1: 'Sem ações', 
     825        2: 'Em processo', 
     826        3: 'Finalzada', 
     827        4: 'Cancelada', 
    821828    } 
    822829 
     
    863870                    time: decodeDate(historic.time) 
    864871                } 
     872            case 'status': 
     873                    return{ 
     874                    user :$.type(historic.user) == 'object' ? historic.user : DataLayer.get('user', historic.user), 
     875                    attribute :attributeDecoded[historic.attribute], 
     876                    beforeValue : statusDecoded[historic.beforeValue], 
     877                    afterValue : statusDecoded[historic.afterValue], 
     878                    time: decodeDate(historic.time) 
     879                } 
    865880            break; 
    866881            default: 
     
    10361051                tasks[task.id].description = tasks[task.id].startDate + ' - ' + (!!task.summary ? task.summary : task.description); 
    10371052 
    1038                 historic.push({'task': (!!task.summary ? task.summary : task.description) , 'historic': decodeHistotic(task)}); 
     1053                historic.push({'task': (!!task.summary ? task.summary : task.description) , 'historic': decodeHistoric(task)}); 
    10391054            } 
    10401055 
Note: See TracChangeset for help on using the changeset viewer.