Changeset 656


Ignore:
Timestamp:
02/02/09 08:07:49 (15 years ago)
Author:
niltonneto
Message:

Implementações do desenvolvedor. amuller@…

Location:
trunk/expressoCalendar
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoCalendar/inc/class.bocalendar.inc.php

    r632 r656  
    3030        function requestDayCal ($dayTime) { 
    3131                $day = getdate($dayTime); 
    32                 $query = ("SELECT * FROM phpgw_cal where (owner = '".$this->user_id."') and ((datetime > ".mktime(0,0,0,$day['mon'],$day['mday'],$day['year'])." and datetime < ".(mktime(0,0,0,$day['mon'],($day['mday']+1),$day['year'])).") or (edatetime > ".mktime(0,0,0,$day['mon'],$day['mday'],$day['year'])." and edatetime < ".(mktime(0,0,0,($day['mon']+1),$day['mday'],$day['year']))."))"); 
     32                $query = ("SELECT * FROM phpgw_cal where (owner = '".$this->user_id."') and ((datetime > ".mktime(0,0,0,$day['mon'],$day['mday'],$day['year'])." and datetime < ".(mktime(0,0,0,$day['mon'],($day['mday']+1),$day['year'])).") or (edatetime > ".mktime(0,0,0,$day['mon'],$day['mday'],$day['year'])." and edatetime < ".(mktime(0,0,0,$day['mon'],$day['mday']+1,$day['year']))."))"); 
    3333                if (!$this->db->query($query)) 
    3434                        return false; 
  • trunk/expressoCalendar/inc/class.uicalendar.inc.php

    r632 r656  
    9494        function getViewDay () { 
    9595                $dayViewTime = isset ($_REQUEST["time"]) ?  strtotime(substr($_REQUEST["time"],0,4)."-".substr($_REQUEST["time"],6,2)."-".substr($_REQUEST["time"],4,2)) : strtotime(date('Y-m-d', time())); 
     96                if (isset ($_REQUEST["uid"])) 
     97                        $this->db_obj->user_id = $_REQUEST["uid"]; 
    9698 
    9799                $retorno = "<today>".date('Ydm',$dayViewTime)."</today>"; 
     
    125127                $dayViewTime -= (date('N', $dayViewTime)%7)*86400; 
    126128                $retorno = "<today>".date('Ydm', $dayViewTime)."</today>"; 
     129                if (isset ($_REQUEST["uid"])) 
     130                        $this->db_obj->user_id = $_REQUEST["uid"]; 
     131 
    127132 
    128133                $fromBo = $this->db_obj->requestWeekCal($dayViewTime); 
     
    169174        function getViewMonth () { 
    170175                $monthViewTime = isset ($_REQUEST["time"]) ?  strtotime(substr($_REQUEST["time"],0,4)."-".substr($_REQUEST["time"],6,2)."-".substr($_REQUEST["time"],4,2)) : strtotime(date('Y-m-d', time())); 
     176                if (isset ($_REQUEST["uid"])) 
     177                        $this->db_obj->user_id = $_REQUEST["uid"]; 
    171178 
    172179                $todayTime = strtotime(date('Y-m', $monthViewTime)."-01"); 
  • trunk/expressoCalendar/index.php

    r632 r656  
    3333        $GLOBALS['phpgw']->categories = CreateObject('phpgwapi.categories'); 
    3434        $bo = CreateObject('calendar.bocalendar'); 
    35         $cat = $bo->cat; 
     35        $cat = &$bo->cat; 
     36        $cat->app_name = 'calendar'; // The categories still the same from egroupwareCalendar 
    3637        $optionCategories = $cat->formated_list('select','all',$bo->cat_id,'True'); 
    3738        foreach ($bo->list_cals() as $cal_) 
    38                 $optionCals .= '<option value="' . $cal_['grantor'] . '">'.$cal_['name'].'</option>' . "\n"; 
    39  
     39                if (! strstr($cal_['value'],'g_')) 
     40                        $optionCals .= '<option value="' . $cal_['grantor'] . '">'.$cal_['name'].'</option>' . "\n"; 
    4041} 
    4142 
  • trunk/expressoCalendar/js/calendar_functions.js

    r632 r656  
    99        this.nextView; 
    1010        this.previousView; 
     11        this.uid = calUid; 
    1112} 
    1213 
     
    121122        viewType = type; 
    122123        screenTable = new Array(); 
    123         XMLTools.request('$this.uicalendar.getView'+type+(data?data:''), 'GET', handler_getView);   
     124        XMLTools.request('$this.uicalendar.getView'+type+(data?data:'')+'&uid='+this.uid, 'GET', handler_getView);   
    124125}; 
    125126 
     127Calendar.prototype.resetView = function() 
     128{ 
     129        document.getElementById("div_main").innerHTML = ""; 
     130} 
    126131 
    127132Calendar.prototype.parseView = function(data,type) 
  • trunk/expressoCalendar/js/globals.js

    r632 r656  
    1010        document.getElementById('yearLinkView').alt = get_lang('Year View'); 
    1111} 
    12  
     12var calUid = document.getElementById('cal_id').value; 
  • trunk/expressoCalendar/templates/default/index.tpl

    r632 r656  
    44<tr> 
    55<td> 
    6 <select name="cat_id"> 
     6<select id="cat_id"> 
    77{cat_options} 
    88</select> 
    99</td> 
    1010<td> 
    11 <select name="cal_id"> 
     11<select id="cal_id" onchange="calendar.uid=this.value; calendar.getView('div_main',viewType);"> 
    1212{cal_options} 
    1313</select> 
  • trunk/expressoCalendar/xsl/viewDay.xsl

    r632 r656  
    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="100%" cellpadding="0" cellspacing="0"> 
     9        <table class="table_common" width="100%" cellpadding="0" cellspacing="0" border="0"> 
     10<tbody> 
    1011<xsl:for-each select="workday"> 
    1112        <tr> 
     
    1718        </tr> 
    1819</xsl:for-each> 
     20</tbody> 
    1921</table> 
    2022</div> 
Note: See TracChangeset for help on using the changeset viewer.