Changeset 429


Ignore:
Timestamp:
09/15/08 14:49:45 (16 years ago)
Author:
niltonneto
Message:

Alterações feitas por Alexandre Muller.
Email: amuller@…

Location:
trunk/calendar_new
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/calendar_new/inc/class.uicalendar.inc.php

    r420 r429  
    107107                        $retorno .= "</workday>"; 
    108108                } 
    109                 $currentWeekDay = date('w', mktime()); 
     109                $currentWeekDay = date('w', $dayViewTime); 
    110110 
    111111                for($i = $this->workweekstarts; $i <= $this->workweekends; $i++){ 
    112                         $retorno.= "<workweek><dayid>".date("Ydm", time() - (($currentWeekDay-$i)*60*60*24))."</dayid><dayofweek>".$this->daysofweek[$i]."</dayofweek></workweek>"; 
     112                        $retorno.= "<workweek><dayid>".date("Ydm", $dayViewTime - (($currentWeekDay-$i)*60*60*24))."</dayid><dayofweek>".$this->daysofweek[$i]."</dayofweek></workweek>"; 
    113113                 } 
    114114 
     
    136136                for ($i=1;$i<=date('t');$i+=7){ 
    137137                        $retorno.= "<workWeek>"; 
    138                         $retorno.= "<workday><id>".date('Y').$i.date('m')."0000</id></workday>"; 
    139                         $retorno.= "<workday><id>".date('Y').($i+1).date('m')."0000</id></workday>"; 
    140                         $retorno.= "<workday><id>".date('Y').($i+2).date('m')."0000</id></workday>"; 
    141                         $retorno.= "<workday><id>".date('Y').($i+3).date('m')."0000</id></workday>"; 
    142                         $retorno.= "<workday><id>".date('Y').($i+4).date('m')."0000</id></workday>"; 
    143                         $retorno.= "<workday><id>".date('Y').($i+5).date('m')."0000</id></workday>"; 
    144                         $retorno.= "<workday><id>".(date('Y').$i+6).date('m')."0000</id></workday>"; 
     138                        $retorno.= "<workday><id>".date('Y').($i<10?"0":"").$i.date('m')."0000</id></workday>"; 
     139                        $retorno.= "<workday><id>".date('Y').($i<9?"0":"").($i+1).date('m')."0000</id></workday>"; 
     140                        $retorno.= "<workday><id>".date('Y').($i<8?"0":"").($i+2).date('m')."0000</id></workday>"; 
     141                        $retorno.= "<workday><id>".date('Y').($i<7?"0":"").($i+3).date('m')."0000</id></workday>"; 
     142                        $retorno.= "<workday><id>".date('Y').($i<6?"0":"").($i+4).date('m')."0000</id></workday>"; 
     143                        $retorno.= "<workday><id>".date('Y').($i<5?"0":"").($i+5).date('m')."0000</id></workday>"; 
     144                        $retorno.= "<workday><id>".(date('Y').($i<4?"0":"").$i+6).date('m')."0000</id></workday>"; 
    145145                        $retorno.= "</workWeek>"; 
    146146                } 
  • trunk/calendar_new/js/calendar_functions.js

    r420 r429  
    7474 
    7575                        if (viewType == "Week"){ 
    76                                 this.previousView = document.getElementById('day').firstChild.id; 
    77                                 this.nextView = document.getElementById('day').firstChild.id; 
    78                                 var dayInt = parseInt(this.nextView.substr(4,2),10)+7; 
    79                                 this.nextView = this.nextView.substr(0,4)+(dayInt+7)+this.nextView.substr(6,2); 
     76                                var previousWeek = new Date; 
     77                                previousWeek.setTime(id2timeStamp(document.getElementById('day').firstChild.id)-(60*60*24*7*1000)); 
     78                                this.previousView = previousWeek.getYear()+1900+""+(previousWeek.getDate()<10?"0":"")+previousWeek.getDate()+""+(previousWeek.getMonth()+1<10?"0":"")+(previousWeek.getMonth()+1);       
     79                                var nextWeek = new Date; 
     80                                nextWeek.setTime(id2timeStamp(document.getElementById('day').firstChild.id)); 
     81                                nextWeek.setDate(nextWeek.getDate()+7);  
     82                                this.nextView = nextWeek.getYear()+1900+""+(nextWeek.getDate()<10?"0":"")+nextWeek.getDate()+""+(nextWeek.getMonth()+1<10?"0":"")+(nextWeek.getMonth()+1); 
    8083                                } 
    8184                        if (viewType == "Day"){ 
    82                                 this.nextView = document.getElementById('day').firstChild.id; 
    83                                 this.previousView = document.getElementById('day').firstChild.id; 
    84                                 var dayInt = parseInt(this.nextView.substr(4,2),10); 
    85                                 this.nextView = this.nextView.substr(0,4)+(dayInt+1)+this.nextView.substr(6,2); 
    86                                 var dayInt = parseInt(this.previousView.substr(4,2),10);    
    87                                 this.previousView = this.previousView.substr(0,4)+(dayInt-1)+this.previousView.substr(6,2); 
     85                                var previousDay = new Date; 
     86                                previousDay.setTime(id2timeStamp(document.getElementById('day').firstChild.id)-(60*60*24*1000)); 
     87                                this.previousView = previousDay.getYear()+1900+""+(previousDay.getDate()<10?"0":"")+previousDay.getDate()+""+(previousDay.getMonth()+1<10?"0":"")+(previousDay.getMonth()+1); 
     88                                var nextDay = new Date; 
     89                                nextDay.setTime(id2timeStamp(document.getElementById('day').firstChild.id)+(60*60*24*1000)); 
     90                                this.nextView = nextDay.getYear()+1900+""+(nextDay.getDate()<10?"0":"")+nextDay.getDate()+""+(nextDay.getMonth()+1<10?"0":"")+(nextDay.getMonth()+1); 
    8891                        } 
    8992                        document.getElementById("l_date").innerHTML =  "<a href=\"javascript:calendar.getView('div_main','"+viewType+"','&time='+this.previousView);\">\<\<&nbsp;</a>"; 
  • trunk/calendar_new/js/drag_area.js

    r420 r429  
    8181         
    8282        if(_button != 2 && _button != 3) { 
    83                 if (this.resizing == 0){ 
    84                         if((parseInt(id) > 0) && (id.length == 12)) 
     83                if((parseInt(id) > 0) && (id.length == 12)) 
     84                        if (this.resizing == 0){ 
    8585                                calendar.dialog(); 
    8686                }else{ 
  • trunk/calendar_new/templates/default/main.css

    r420 r429  
    2929/*       height: 15px;*/ 
    3030         color: darkblue; 
    31          text-align:center; 
     31         text-align:left; 
    3232         font-size: 0.8em; 
    3333         font-family:arial, verdana; 
  • trunk/calendar_new/xsl/viewDay.xsl

    r420 r429  
    77</div> 
    88<div width="100%" class="title" align="left" ><label id="l_date"></label><br/><br/> 
    9 <table class="table_common" height="50%" width="800" cellpadding="0" cellspacing="0"> 
     9<table class="table_common" height="50%" width="100%" cellpadding="0" cellspacing="0"> 
    1010<xsl:for-each select="workday"> 
    1111        <tr> 
  • trunk/calendar_new/xsl/viewMonth.xsl

    r420 r429  
    44<xsl:variable name="today" select="today" /> 
    55<div id="day"> 
    6         <div id="{$today}"></div> 
     6        <div id="{$today}"></div> 
    77</div> 
    88<div width="100%" class="title" align="left" ><label id="l_date"></label><br/><br/> 
    9 <table class="table_common" width="100%" cellpadding="0" cellspacing="0" border="0"> 
    10         <tr class="td_common" height="100%" width="1%"> 
     9        <table class="table_common" width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"> 
     10                <tbody> 
     11                        <tr class="td_common" width="1%"> 
    1112 
    12                         <table class="table_common" height="100%" width="100%" cellpadding="0" cellspacing="0"> 
    13                                 <tr id="tr_week"> 
    14                                         <xsl:for-each select="dayofweek"> 
    15                                                 <xsl:variable name="dayName" select="dayname" /> 
    16                                                 <td id="weekHeader_{$dayName}" class="td_header" height="1%"> 
    17                                                         <xsl:value-of select='$dayName' /> 
    18                                                 </td> 
    19                                         </xsl:for-each> 
    20                                 </tr> 
    21                                 <xsl:for-each select="/retorno/workWeek"> 
     13                                <table class="table_common" height="100%" width="100%" cellpadding="0" cellspacing="0"> 
     14                                        <tr id="tr_week"> 
     15                                                <xsl:for-each select="dayofweek"> 
     16                                                        <xsl:variable name="dayName" select="dayname" /> 
     17                                                        <td id="weekHeader_{$dayName}" class="td_header" height="1%"> 
     18                                                                <xsl:value-of select='$dayName' /> 
     19                                                        </td> 
     20                                                </xsl:for-each> 
     21                                        </tr> 
     22                                        <xsl:for-each select="/retorno/workWeek"> 
    2223                                                <tr> 
    2324                                                        <xsl:for-each select="workday"> 
    2425                                                                <xsl:variable name="day" select="id" /> 
    2526                                                                <td class="td_day" id="{$day}"> 
     27                                                                        <xsl:value-of select='substring($day,5,2)' /> 
    2628                                                                </td> 
    2729                                                        </xsl:for-each> 
    2830                                                </tr> 
    29                                 </xsl:for-each> 
     31                                        </xsl:for-each> 
    3032 
    31                         </table>         
    32         </tr> 
    33 </table>         
     33                                </table>         
     34                        </tr> 
     35                </tbody> 
     36        </table>         
    3437</div> 
    3538<div id="returnEvents"> 
Note: See TracChangeset for help on using the changeset viewer.