Changeset 3976


Ignore:
Timestamp:
04/11/11 15:57:01 (13 years ago)
Author:
rafaelraymundo
Message:

Ticket #1607 - Incluir um campo Observações na Agenda

Location:
branches/2.2.0.1/calendar
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.0.1/calendar/inc/class.bocalendar.inc.php

    r3973 r3976  
    11201120                                $event['title'] = stripslashes($event['title']); 
    11211121                                $event['description'] = stripslashes($event['description']); 
     1122                                $event['observations'] = stripslashes($event['observations']); 
    11221123                                $event['ex_participants'] = stripslashes($event['ex_participants']); 
    11231124                                $datetime_check = $this->validate_update($event); 
     
    11871188                                $this->so->set_title($l_cal['title']); 
    11881189                                $this->so->set_description($l_cal['description']); 
     1190                                $this->so->set_observations($l_cal['observations']); 
    11891191                                $this->so->set_attachment($l_cal['attachment']); 
    11901192                                $this->so->set_ex_participants($l_cal['ex_participants']); 
     
    39633965                        ); 
    39643966 
     3967                        $var['observations'] = Array( 
     3968                                'field' => $this->translate('Observations'), 
     3969                                'data'  => $event['observations'] 
     3970                        ); 
     3971                         
    39653972                        $var['attachment'] = Array( 
    39663973                                'field' => $this->translate('Attachment'), 
  • branches/2.2.0.1/calendar/inc/class.bocustom_fields.inc.php

    r3968 r3976  
    3232                        'alarm'       => 'Alarm', 
    3333                        'recure_type' => 'Repetition', 
     34                        'observations' => 'Observations', 
    3435                        'alter_by'   =>  'Alter by', 
    3536                        'attachment' => 'attachment' 
  • branches/2.2.0.1/calendar/inc/class.socalendar.inc.php

    r3966 r3976  
    369369                        $this->cal->set_description($description); 
    370370                } 
     371 
     372                function set_observations($observations='') 
     373                { 
     374                    $this->cal->set_observations($observations); 
     375                } 
     376 
    371377                function set_attachment($attachment='') 
    372378                { 
    373379                        $this->cal->set_attachment($attachment); 
    374380                } 
     381 
    375382                function set_ex_participants($ex_participants='') 
    376383                { 
  • branches/2.2.0.1/calendar/inc/class.socalendar__.inc.php

    r3968 r3976  
    102102                } 
    103103 
     104                function set_observations($observations='') 
     105                { 
     106                    $this->add_attribute('observations',$observations); 
     107                } 
     108 
    104109                function set_alter_by($alter_by='') 
    105110                { 
  • branches/2.2.0.1/calendar/inc/class.socalendar_sql.inc.php

    r3968 r3976  
    569569                                $this->set_title(stripslashes($GLOBALS['phpgw']->strip_html($this->stream->f('title')))); 
    570570                                $this->set_description(stripslashes($GLOBALS['phpgw']->strip_html($this->stream->f('description')))); 
     571                                $this->set_observations(stripslashes($GLOBALS['phpgw']->strip_html($this->stream->f('observations')))); 
    571572                                $this->set_alter_by(stripslashes($GLOBALS['phpgw']->strip_html($this->stream->f('alter_by')))); 
    572573                                $this->set_attachment(stripslashes($GLOBALS['phpgw']->strip_html($this->stream->f('attachment')))); 
     
    978979                                        . "title='".$this->stream->db_addslashes($event['title'])."', " 
    979980                                        . "description='".$this->stream->db_addslashes($event['description'])."', " 
     981                                        . "observations='".$this->stream->db_addslashes($event['observations'])."', " 
    980982                                        . "attachment='".$this->stream->db_addslashes(serialize($event['attachment']))."', " 
    981983                                        . "alter_by='".$this->stream->db_addslashes($GLOBALS['phpgw_info']['user']['fullname'])."', " 
  • branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php

    r3966 r3976  
    49884988                                'tr_color' => $this->theme['th_bg'], 
    49894989                                'field' => lang('Title'), 
    4990                                 'data'  => '<input name="cal[title]" size="45" maxlength="80" value="'.$event['title'].'">' 
     4990                                'data'  => '<input name="cal[title]" size="103" maxlength="300" value="'.$event['title'].'">' 
    49914991                        ); 
    49924992 
     
    49944994                        $var['description'] = Array( 
    49954995                                'field' => lang('Full Description'), 
    4996                                 'data'  => '<textarea name="cal[description]" rows="5" cols="40" wrap="virtual" maxlength="2048">'.$event['description'].'</textarea>' 
     4996                                'data'  => '<textarea name="cal[description]" rows="5" cols="88" wrap="virtual" maxlength="2048">'.$event['description'].'</textarea>' 
    49974997                        ); 
    49984998 
     
    54225422//                      $this->output_template_array($p,'row','list',Array('data' => '<script src="simple_show_hide.js" type="text/javascript"></script>')); 
    54235423 
     5424// Observations 
     5425                        $var['observations'] = Array( 
     5426                                'field' => lang('Observations'), 
     5427                                'data'  => '<textarea name="cal[observations]" rows="5" cols="88" wrap="virtual" maxlength="2048">'.$event['observations'].'</textarea>' 
     5428                        ); 
     5429 
    54245430                        if ($event['attachment'] == '' || $event['attachment'] == 'ERROR' || is_array($event['attachment'])) 
    54255431                            $data =  '<a onClick="javascript:addAttach()" href="#divFiles" >Anexos: adicionar+</a><div id="divFiles"</div>'; 
  • branches/2.2.0.1/calendar/setup/tables_current.inc.php

    r3972 r3976  
    2727                                'title' => array('type' => 'varchar','precision' => '80','nullable' => False,'default' => '1'), 
    2828                                'description' => array('type' => 'text','nullable' => True), 
     29                                'observations' => array('type' => 'text','nullable' => True), 
    2930                                'attachment' => array('type' => 'text','nullable' => True), 
    3031                                'location' => array('type' => 'varchar','precision' => '255','nullable' => True), 
  • branches/2.2.0.1/calendar/setup/tables_update.inc.php

    r3973 r3976  
    8383        function calendar_upgrade2_2_000() 
    8484        { 
     85            $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN observations text"); 
    8586            $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN alter_by varchar(160)"); 
    8687            $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN attachment text"); 
Note: See TracChangeset for help on using the changeset viewer.