Changeset 961


Ignore:
Timestamp:
06/08/09 11:12:33 (12 years ago)
Author:
amuller
Message:

Ticket #88 - Melhorias no módulo calendário novo

Location:
trunk/expressoCalendar
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoCalendar/index.php

    r696 r961  
    4444 
    4545$template_1 = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); 
    46 $template_1->set_file(Array('expressoCalendar' => 'index.tpl')); 
     46$template_1->set_var("viewType",$_GET['viewType']); 
     47$template_1->set_var("timeStamp",$_GET['datetime']); 
    4748$template_1->set_var('cat_options',$optionCategories); 
    4849$template_1->set_var('cal_options',$optionCals); 
     50$template_1->set_file(Array('expressoCalendar' => 'index.tpl')); 
    4951$template_1->set_block('expressoCalendar','index'); 
    5052$template_1->pfp('out','index'); 
     
    6466."<script language='JavaScript' type='text/javascript' src='js/drag_area.js'></script>" 
    6567."<script language='JavaScript' type='text/javascript' src='js/MOFX.js'></script>" 
    66 ."<script language='JavaScript' type='text/javascript' src='js/common_functions.js'></script>"; 
     68."<script language='JavaScript' type='text/javascript' src='js/common_functions.js'></script>" 
     69."<script language='JavaScript' type='text/javascript'>calendar.getView('div_main');</script>"; 
     70 
    6771 
    6872$GLOBALS['phpgw']->common->phpgw_exit(); 
  • trunk/expressoCalendar/js/calendar_functions.js

    r920 r961  
    7979Calendar.prototype.getView = function(idEl, type, viewTime) 
    8080{ 
    81         if (typeof(type) == 'undefined') 
    82                 return false; 
    83         if (typeof(viewTime) == 'undefined') 
     81        if (typeof(type) == 'undefined'){ 
     82                type = document.getElementById('calViewType').value; 
     83                if (type.length < 1) 
     84                        return false; 
     85                } 
     86        if (typeof(viewTime) == 'undefined'){ 
     87                if (document.getElementById('calDateTime').value.length > 0) 
     88                        calendar.currentTime.setTime(document.getElementById('calDateTime').value*1000); 
    8489                viewTime = calendar.currentTime.getTime(); 
     90        } 
     91 
    8592        if (type == 'Year'){ 
    8693                var handler = function (data) { 
     
    128135                                document.getElementById("l_date").innerHTML += calendar.parseDate(id2timeStamp(document.getElementById('day').firstChild.id)); 
    129136                        if (viewType == "Month") 
    130                                 document.getElementById("l_date").innerHTML += calendar.parseMonth(id2timeStamp(document.getElementById('day').firstChild.id)); 
     137                                document.getElementById("l_date").innerHTML +=  
     138                                "<a href='"+window.location+ 
     139                                "?viewType=Month"+ 
     140                                "&datetime="+parseInt(id2timeStamp(document.getElementById('day').firstChild.id)/1000)+ 
     141                                "'>"+calendar.parseMonth(id2timeStamp(document.getElementById('day').firstChild.id))+"</a>"; 
    131142                        document.getElementById("l_date").innerHTML += "<a href=\"javascript:calendar.getView('div_main','"+viewType+"',this.nextView);\">&nbsp;\>\></a>"; 
    132143 
     
    335346                eventDiv.style.width = "60px"; 
    336347                eventDiv.style.height = "30px"; 
    337                 eventDiv.onmouseover = function () { if (this.childNodes[2].length > 12) { this.style.width = "120px"; this.style.height = "auto"; }  this.style.zIndex = 2; }; 
     348                eventDiv.onmouseover = function () { if (this.childNodes[2].length > 20) { this.style.width = "120px"; this.style.height = "auto"; }  this.style.zIndex = 2; }; 
    338349                eventDiv.onmouseout = function () { this.style.height = "30px"; this.style.width = "60px"; this.style.zIndex = 1; }; 
    339350                eventDiv.onclick = function () { calendar.getView('div_main','Day',eventDiv.childNodes[1].id); }; 
     
    375386        } 
    376387} 
    377  
    378  
  • trunk/expressoCalendar/templates/default/index.tpl

    r920 r961  
    11<!-- BEGIN index --> 
     2<input type="hidden" value="{viewType}" id="calViewType"> 
     3<input type="hidden" value="{timeStamp}" id="calDateTime"> 
    24<table id="calendar_head_table" class="calendar_head_table" border="0" width="100%" cols="3" cellpadding="0" cellspacing="0"> 
    35<tbody> 
Note: See TracChangeset for help on using the changeset viewer.