Ignore:
Timestamp:
03/02/12 19:52:21 (12 years ago)
Author:
acoutinho
Message:

Ticket #2434 - Remocao do importe de arquivos da agenda na inicializacao do modulo expressoMail e correcoes de bugs

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

Legend:

Unmodified
Added
Removed
  • trunk/prototype/modules/calendar/interceptors/DBMapping.php

    r5592 r5615  
    1010        $params['type_id'] = EVENT_ID; 
    1111         
    12                 $params['startTime'] =  strtotime( $params['startTime'] . ' ' .$params['timezone']).'000'; 
    13          
    14                 $params['endTime'] =   strtotime( $params['endTime'] . ' ' .$params['timezone']).'000'; 
     12         
     13                if(!is_numeric($params['startTime']) ) 
     14                        $params['startTime'] =  strtotime( $params['startTime'] . ' ' .$params['timezone']).'000'; 
    1515                 
    16                 if($params['allDay']) 
    17                         $params['endTime'] =  $params['endTime']  + 86400000; 
    18  
     16                if (!is_numeric($params['endTime'])){ 
     17                        $params['endTime'] =   strtotime( $params['endTime'] . ' ' .$params['timezone']).'000'; 
     18                         
     19                        if($params['allDay']) 
     20                                $params['endTime'] =  $params['endTime']  + 86400000; 
     21                } 
    1922    //        if( !isset( $new['repeat'] )) 
    2023    //            $new['range_end'] = '7287926400'; // 12/12/2200 
  • trunk/prototype/modules/calendar/interceptors/Helpers.php

    r5437 r5615  
    55    public static function futureEvent( $startTime , $rangeEnd ) 
    66    { 
    7         //Verifica data    
    8         list( $y1  , $m1 , $d1) = explode( '-' , $rangeEnd );  
     7        //Verifica data   
     8                $range = new DateTime( '@'.(int)($rangeEnd / 1000) , new DateTimeZone('UTC') ); 
     9        list( $y1  , $m1 , $d1) = explode( '-' , $range->format('y-m-d'));  
    910                 
    1011        $rangeEndMicrotime = gmmktime(0, 0, 0, $m1 , $d1, $y1);  
  • trunk/prototype/modules/calendar/js/calendar.codecs.js

    r5608 r5615  
    294294}); 
    295295 
     296//TODO - Voltar quando tratado put de varios items de um mesmo conceito, 
     297/* 
    296298DataLayer.listen( "calendarSignature", function( status ){ 
    297299 
     
    307309    } 
    308310}); 
     311*/ 
    309312 
    310313DataLayer.listen( "modulePreference", function( status ){ 
     
    360363                                        location: form.location 
    361364                                }, 
    362                                 isOwner: 1, 
     365                        //      isOwner: 1, 
    363366                                fontColor: Encoder.htmlEncode(form.fontColor.substring(1)), 
    364367                                backgroundColor: Encoder.htmlEncode(form.backgroundColor.substring(1)), 
  • trunk/prototype/modules/calendar/js/calendar.shared.js

    r5592 r5615  
    317317                                        DataLayer.put('calendarSignature', DataLayer.merge({calendar: calendarId, isOwner: 0, user: User.me.id, fontColor: '120d0d', backgroundColor: (!!type ? 'fbec88' : '8c8c8c'), borderColor: (!!type ? 'fad24e' : '120d0d')}, !!idPermission ? {id: idPermission} : {} )); 
    318318                                }); 
    319                                  
     319 
     320                        DataLayer.commit( false, false, function( received ){ 
     321                                        delete Calendar.currentViewKey; 
     322                                        Calendar.load(); 
     323                                        refresh_calendars(); 
     324                        }); 
     325         
    320326                        UI.dialogs.sharedCalendar.dialog("close"); 
    321327                 
  • trunk/prototype/modules/calendar/js/helpers.js

    r5592 r5615  
    13271327                                template_content.find('form').submit(); 
    13281328                                $tabs.tabs( "remove", "#configure_tab"); 
     1329                                DataLayer.commit( false, false, function( received ){ 
     1330                                        delete Calendar.currentViewKey; 
     1331                                        Calendar.load(); 
     1332                                        refresh_calendars(); 
     1333                                }); 
     1334                                 
    13291335                        }).end().filter('.cancel').click(function(evt){ 
    13301336                                $tabs.tabs( "remove", "#configure_tab"); 
     
    14221428                                if(idCalendar == User.preferences.defaultCalendar) 
    14231429                                        DataLayer.remove( 'modulePreference', User.preferenceIds['defaultCalendar']); 
     1430                                         
     1431                                         
     1432                                DataLayer.commit( false, false, function( received ){ 
     1433                                        delete Calendar.currentViewKey; 
     1434                                        Calendar.load(); 
     1435                                        refresh_calendars(); 
     1436                                }); 
    14241437                        } 
    14251438                                $('.positionHelper').css('display', 'none'); 
     
    15271540                                        borderColor: colorsSuggestions[selected]['border'].substring(1) 
    15281541                                }); 
     1542                                 
     1543                                DataLayer.commit( false, false, function( received ){ 
     1544                                        delete Calendar.currentViewKey; 
     1545                                        Calendar.load(); 
     1546                                        refresh_calendars(); 
     1547                                }); 
     1548                                 
    15291549                                meu_container.find(".button.new").qtip('destroy'); 
    15301550                        }); 
     
    19531973                delete newSchedulable.dtstamp; 
    19541974                delete schedulable.calendar; 
    1955                  
    1956                 schedulable.calendar = calendar;         
     1975                delete schedulable.DayLigth; 
     1976                delete schedulable.rangeStart 
     1977                delete schedulable.rangeEnd; 
     1978                delete schedulable.lastUpdate; 
     1979                delete schedulable.repeat; 
     1980         
     1981                schedulable.calendar = DataLayer.copy(calendar);         
    19571982         
    19581983                newSchedulable.endTime = new Date(parseInt(newSchedulable.endTime) - (newSchedulable.allDay ? 86400000 : 0)).toString('yyyy-MM-dd hh:mm:00'); 
     
    19601985                 
    19611986                var participants = DataLayer.copy(schedulable.participants); 
     1987                 
    19621988                delete schedulable.participants; 
    19631989                 
     
    19701996         
    19711997                        delete participant.id; 
     1998                        delete participant.schedulable; 
     1999                        delete participant.delegatedFrom; 
    19722000                         
    19732001                        return participant ; 
    19742002        }); 
    19752003         
    1976          
    1977          
    1978                 DataLayer.put('schedulable', newSchedulable); 
    1979  
     2004                DataLayer.put('schedulable', newSchedulable);            
    19802005        } 
    19812006         
Note: See TracChangeset for help on using the changeset viewer.