Ignore:
Timestamp:
01/27/12 19:25:06 (12 years ago)
Author:
acoutinho
Message:

Ticket #2434 - Correção de bugs e melhorias

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/modules/calendar/js/init.js

    r5427 r5442  
    5656                        {        
    5757                                $tabs.tabs("select", "#calendar"); 
    58                                 $('#calendar').fullCalendar('gotoDate',$(this).siblings('span').html(), Date.getMonthNumberFromName($(this).html() == 'Março' ? 'Mar' : $(this).html()),'01'); 
     58                                var toDate = $('.block-vertical-toolbox .mini-calendar').datepicker("getDate").toString('yyyy-MM-dd').split('-'); 
     59                                $('#calendar').fullCalendar('gotoDate', toDate[0], parseInt(toDate[1]-1), toDate[2] ); 
    5960                                $('#calendar').fullCalendar( 'changeView', 'agendaDay' ); 
    6061                        }                        
     
    6667                $('.ui-datepicker-title .ui-datepicker-month').live('click',function(){ 
    6768                        $tabs.tabs("select", "#calendar"); 
    68                         $('#calendar').fullCalendar('gotoDate',$(this).html(), '0', '01'); 
     69                        $('#calendar').fullCalendar('gotoDate',$(this).siblings('span').html(), Date.getMonthNumberFromName($(this).html() == 'Março' ? 'Mar' : $(this).html()),'01'); 
    6970                        $('#calendar').fullCalendar( 'changeView', 'month'); 
    7071                }); 
     
    7273                $('.ui-datepicker-title .ui-datepicker-year').live('click',function(){ 
    7374                        $tabs.tabs("select", "#calendar"); 
    74                         var currentDate = $.fullCalendar.formatDate($('#calendar').fullCalendar('getDate'), "yyyy-MM-dd").split('-'); 
    75                         $('#calendar').fullCalendar('gotoDate',$('.ui-datepicker-title .ui-datepicker-year').html(), Date.getMonthNumberFromName($('.ui-datepicker-title .ui-datepicker-month').html()), currentDate[2]); 
     75                        $('#calendar').fullCalendar('gotoDate',$(this).html(), '0', '01'); 
    7676                        $('.fc-button-year').click(); 
    7777                }); 
Note: See TracChangeset for help on using the changeset viewer.