Changeset 1204


Ignore:
Timestamp:
07/28/09 11:20:54 (12 years ago)
Author:
amuller
Message:

Ticket #88 - Adaptação pro expresso2.0

Location:
trunk/expressoCalendar
Files:
6 edited

Legend:

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

    r920 r1204  
    103103        function insertEvent ($datetime, $edatetime, $title, $description, $location) 
    104104        { 
    105                 //Discover the event id 
    106                 $query = "SELECT max(cal_id) FROM phpgw_cal"; 
    107                 if (!$this->db->query($query)) 
    108                         return false; 
    109  
    110                 while($this->db->next_record()) 
    111                         $id = $this->db->row(); 
    112  
    113105                // Performing SQL insert query 
    114                 $query = "INSERT INTO phpgw_cal VALUES (".($id['max']+1).", '".$_SESSION['calendar']['user']['email']."', ".$this->user_id.", null, null, ".$datetime.", ".time().",".$edatetime.", 2, 'E', 0, '".$title."', '".$description."', '".$location."', 0, null)"; 
     106                //FIXME LOCK the table sequence is desirable 
     107                $query = "INSERT INTO phpgw_cal VALUES (default, '".$_SESSION['calendar']['user']['email']."', ".$this->user_id.", null, null, ".$datetime.", ".time().",".$edatetime.", default, 'E', default, '".$title."', '".$description."', '".$location."', default, default)"; 
    115108                if ($this->db->query($query)){ 
    116                         $query = "INSERT INTO phpgw_cal_user VALUES (".($id['max']+1).", ".$this->user_id.", 'A', 'u')"; 
     109                        $query = "INSERT INTO phpgw_cal_user VALUES (currval('seq_phpgw_cal'::regclass), ".$this->user_id.", 'A', 'u')"; 
    117110                        if ($this->db->query($query)){ 
    118111                                $return = "true "; 
  • trunk/expressoCalendar/inc/controller.php

    r632 r1204  
    11<?php 
     2        if(!isset($GLOBALS['phpgw_info'])){ 
     3                $GLOBALS['phpgw_info']['flags'] = array( 
     4                 'currentapp' => 'expressoCalendar', 
     5                 'nonavbar'   => true, 
     6                 'noheader'   => true 
     7                ); 
     8        } 
     9        require_once '../../header.session.inc.php'; 
     10 
    211   //   Explode action from cExecuteForm function 
    312   $cExecuteFormReturn = false; 
  • trunk/expressoCalendar/inc/load_lang.php

    r919 r1204  
    11<? 
     2        if(!isset($GLOBALS['phpgw_info'])){ 
     3                $GLOBALS['phpgw_info']['flags'] = array( 
     4                 'currentapp' => 'expressoCalendar', 
     5                 'nonavbar'   => true, 
     6                 'noheader'   => true 
     7                ); 
     8        } 
     9        require_once '../../header.session.inc.php'; 
     10 
    211// Load the lang of the module. 
    312        if(!$_SESSION['phpgw_info']['expressoCalendar']['lang'])  
  • trunk/expressoCalendar/js/calendar_functions.js

    r961 r1204  
    305305                for (var hour = parseInt(start_,10); hour < parseInt(end_,10);(hour%100 == 30)?hour+=70:hour+=30) 
    306306                        screenTable[weekDay][hour] = currentPos; 
    307                 eventDiv.style.left  = 90+(205*(currentPos-1)) + "px" ; 
     307                eventDiv.style.left  = 260+(205*(currentPos-1)) + "px" ; 
    308308                eventDiv.onmouseover = function(){ createButtons(eventDiv); }; 
    309309                eventDiv.onmouseout = function(){ removeButtons(eventDiv); }; 
  • trunk/expressoCalendar/js/globals.js

    r656 r1204  
    33        document.getElementById('dayLinkView').title = get_lang('Daily View'); 
    44        document.getElementById('dayLinkView').alt = get_lang('Daily View'); 
     5        document.getElementById('daySpanView').innerHTML = get_lang('Daily View'); 
    56        document.getElementById('weekLinkView').title = get_lang('Weekly View'); 
    67        document.getElementById('weekLinkView').alt = get_lang('Weekly View'); 
     8        document.getElementById('weekSpanView').innerHTML = get_lang('Weekly View'); 
    79        document.getElementById('monthLinkView').title = get_lang('Monthly View'); 
    810        document.getElementById('monthLinkView').alt = get_lang('Monthly View'); 
     11        document.getElementById('monthSpanView').innerHTML = get_lang('Monthly View'); 
    912        document.getElementById('yearLinkView').title = get_lang('Year View'); 
    1013        document.getElementById('yearLinkView').alt = get_lang('Year View'); 
     14        document.getElementById('yearSpanView').innerHTML = get_lang('Year View'); 
    1115} 
    1216var calUid = document.getElementById('cal_id').value; 
  • trunk/expressoCalendar/templates/default/index.tpl

    r961 r1204  
    22<input type="hidden" value="{viewType}" id="calViewType"> 
    33<input type="hidden" value="{timeStamp}" id="calDateTime"> 
    4 <table id="calendar_head_table" class="calendar_head_table" border="0" width="100%" cols="3" cellpadding="0" cellspacing="0"> 
     4<table style="width:100%;"> 
    55<tbody> 
    66<tr> 
     7<td class="image-menu" style="height:100%; width:162px;"> 
     8<table id="calendar_head_table" class="menu-degrade" style="height:100%; width:100%; overflow:auto"> 
     9<tbody id="content_folders"> 
     10<tr> 
    711<td> 
    8 <select id="cat_id" onchange="calendar.cat=this.value; calendar.getView('div_main',viewType);"> 
    9 {cat_options} 
    10 </select> 
    11 </td> 
    12 <td> 
    13 <select id="cal_id" onchange="calendar.uid=this.value; calendar.getView('div_main',viewType);"> 
    14 {cal_options} 
    15 </select> 
    16 </td> 
    17 <td align="right"> 
    18 <label id="l_date"></label> 
     12        <select id="cat_id" onchange="calendar.cat=this.value; calendar.getView('div_main',viewType);"> 
     13        {cat_options} 
     14        </select> 
    1915</td> 
    2016</tr> 
    2117<tr> 
    2218<td> 
    23 <a href="javascript:void(0)" onclick="calendar.getView('div_main','Day')"> 
    24 <img id="dayLinkView" src="templates/default/images/today.png"></img></a> 
    25 <a href="javascript:void(0)" onclick="calendar.getView('div_main','Week')"> 
    26 <img id="weekLinkView" src="templates/default/images/week.png"></img></a> 
    27 <a href="javascript:void(0)" onclick="calendar.getView('div_main','Month')"> 
    28 <img id="monthLinkView" src="templates/default/images/month.png"></img></a> 
    29 <a href="javascript:void(0)" onclick="calendar.getView('div_main','Year')"> 
    30 <img id="yearLinkView" src="templates/default/images/year.png"></img></a> 
     19        <select id="cal_id" onchange="calendar.uid=this.value; calendar.getView('div_main',viewType);"> 
     20        {cal_options} 
     21        </select> 
     22</td> 
     23</tr> 
     24<tr> 
     25<td> 
     26        <a href="javascript:void(0)" onclick="calendar.getView('div_main','Day')"> 
     27        <img id="dayLinkView" src="templates/default/images/today.png"></img></a> 
     28        <span id="daySpanView" class="boxHeaderText"></span> 
     29</td> 
     30</tr> 
     31<tr> 
     32<td> 
     33        <a href="javascript:void(0)" onclick="calendar.getView('div_main','Week')"> 
     34        <img id="weekLinkView" src="templates/default/images/week.png"></img></a> 
     35        <span id="weekSpanView" class="boxHeaderText"></span> 
     36</td> 
     37</tr> 
     38<tr> 
     39<td> 
     40        <a href="javascript:void(0)" onclick="calendar.getView('div_main','Month')"> 
     41        <img id="monthLinkView" src="templates/default/images/month.png"></img></a> 
     42        <span id="monthSpanView" class="boxHeaderText"></span> 
     43 
     44</td> 
     45</tr> 
     46<tr> 
     47<td> 
     48        <a href="javascript:void(0)" onclick="calendar.getView('div_main','Year')"> 
     49        <img id="yearLinkView" src="templates/default/images/year.png"></img></a> 
     50        <span id="yearSpanView" class="boxHeaderText"></span> 
     51 
    3152</td> 
    3253</tr> 
    3354</tbody> 
    3455</table> 
    35 <div style="width:100%;height:auto" id="div_main"></div> 
     56</td> 
     57<td> 
     58        <label id="l_date"></label> 
     59 
     60<div style="width:100%;height:450" id="div_main"></div> 
     61</td> 
     62</tr> 
     63</tbody> 
     64</table> 
     65 
    3666<!-- END index --> 
Note: See TracChangeset for help on using the changeset viewer.