Changeset 4030
- Timestamp:
- 04/14/11 14:34:02 (13 years ago)
- Location:
- branches/2.2.0.1/calendar
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php
r4010 r4030 4358 4358 ); 4359 4359 $p->set_var($var); 4360 $events = $this->bo->cached_events[$date]; 4361 foreach($events as $event) 4360 $eventsCached = $this->bo->cached_events[$date]; 4361 4362 if($_GET['d'] == '1') 4362 4363 { 4363 if ($this->bo->rejected_no_show($event)) 4364 4365 for($i_events = 0; $i_events < count($eventsCached) ; $i_events++) 4366 { 4367 if ($eventsCached[$i_events]['users_status'] == 'R') 4368 { 4369 continue; // user does not want to see rejected events 4370 } 4371 $events[] = $eventsCached[$i_events]; 4372 } 4373 /*echo "<pre>"; 4374 print_r($events1); 4375 4376 echo "</pre>"; 4377 exit();*/ 4378 4379 $newEvents = Array(); 4380 $eventAux = Array 4381 ( 4382 'owner' => '', 4383 'id' => '', 4384 'type' => '', 4385 'public' => '', 4386 'category' => '', 4387 'title' => '', 4388 'description' => '', 4389 'alter_by' => '', 4390 'observations' => '', 4391 'attachment' => '', 4392 'ex_participants' => '', 4393 'uid' => '', 4394 'location' => '', 4395 'reference' => '', 4396 'start' => Array 4397 ( 4398 'year' => '', 4399 'month' => '', 4400 'mday' => '', 4401 'hour' => '', 4402 'min' => '', 4403 'sec' => '', 4404 'alarm' => '', 4405 ), 4406 4407 'modtime' => Array 4408 ( 4409 ), 4410 4411 'end' => Array 4412 ( 4413 'year' => '', 4414 'month' => '', 4415 'mday' => '', 4416 'hour' => '', 4417 'min' => '', 4418 'sec' => '', 4419 'alarm' => '', 4420 ), 4421 4422 'priority' => '', 4423 'users_status' => '', 4424 'participants' => Array 4425 ( 4426 ), 4427 4428 'alarm' => Array 4429 ( 4430 ), 4431 4432 ); 4433 4434 $delta = 60; //em segundos 4435 for($i_events = 0; $i_events < count($events) ; $i_events++) 4436 { 4437 4438 $newEvents[] = $events[$i_events]; 4439 4440 $hf_current = mktime($events[$i_events]['end']['hour'], 0, 0, $month, $day, $year); 4441 $hi_prox = mktime($events[$i_events+1]['start']['hour'], 0, 0, $month, $day, $year); 4442 4443 if($events[$i_events]['end']['min'] > 0) 4444 { 4445 $hf_current += 60*$delta; 4446 } 4447 4448 while($hi_prox > $hf_current) 4449 { 4450 4451 $aux1 = date('Y:m:d:H:i:s',$hf_current); 4452 $aux2 = explode(':',$aux1); 4453 $eventAux['start']['year'] = $aux2[0]; 4454 $eventAux['start']['month'] = $aux2[1]; 4455 $eventAux['start']['mday'] = $aux2[2]; 4456 $eventAux['start']['hour'] = $aux2[3]; 4457 $eventAux['start']['min'] = $aux2[4]; 4458 $eventAux['start']['sec'] = $aux2[5]; 4459 4460 //$aux3 = date('Y:m:d:H:i:s',$hf_current); 4461 //$aux4 = explode(':',$aux3); 4462 $eventAux['end']['year'] = $aux2[0]; 4463 $eventAux['end']['month'] = $aux2[1]; 4464 $eventAux['end']['mday'] = $aux2[2]; 4465 $eventAux['end']['hour'] = $aux2[3]; 4466 $eventAux['end']['min'] = $aux2[4]; 4467 $eventAux['end']['sec'] = $aux2[5]; 4468 4469 $eventAux['owner'] = $GLOBALS['phpgw_info']['user']['account_id']; 4470 $eventAux['title'] = "\n\n\n"; 4471 $eventAux['description'] = ''; 4472 $eventAux['observations'] = ''; 4473 $eventAux['location'] = ''; 4474 4475 $newEvents[] = $eventAux; 4476 $hf_current += 60*$delta; 4477 4478 } 4479 } 4480 4481 foreach($newEvents as $event) 4482 { 4483 $p->set_var('day_events',$this->link_to_month_entry($event,$month,$day,$year)); 4484 $p->parse('events','event',True); 4485 $p->set_var('day_events',''); 4486 } 4487 } 4488 else 4489 { 4490 foreach($eventsCached as $event) 4491 { 4492 if ($this->bo->rejected_no_show($event) || $event['users_status'] == 'R') 4364 4493 { 4365 4494 continue; // user does not want to see rejected events … … 4368 4497 $p->parse('events','event',True); 4369 4498 $p->set_var('day_events',''); 4499 } 4370 4500 } 4501 4502 /*echo "<pre>"; 4503 print_r($newEvents); 4504 4505 echo "</pre>"; 4506 exit();*/ 4371 4507 } 4372 4508 $p->parse('daily_events','day_event',True); … … 4374 4510 $p->set_var('daily_events',''); 4375 4511 $p->set_var('events',''); 4512 4376 4513 } 4377 4514 $p->parse('column_header','month_column',True); … … 4390 4527 } 4391 4528 4392 /* $this->bo->store_to_cache(4393 Array(4394 'syear' => $year,4395 'smonth'=> $month,4396 'sday' => 14397 )4398 );4399 */4400 4529 $day_ini = $_GET['day_ini'];// dia do inicio da impressao; o padrao e o dia atual; 4401 4530 $num_dias = $_GET['num_dias'];// quantidade de dias a partir do dia inicial; … … 4939 5068 $p->set_var('hora_final',$result_events_json['hora_final']); 4940 5069 $p->set_var('hora_inicial',$result_events_json['hora_inicial']); 4941 $p->set_var('hour_size_px',$result_events_json['hour_size_px']) 5070 $p->set_var('hour_size_px',$result_events_json['hour_size_px']); 4942 5071 4943 5072 $p->set_var('events_json',json_encode($result_events_json['events_to_show_json'])?json_encode($result_events_json['events_to_show_json']):'null'); … … 5025 5154 $hora_final = $account_prefs['calendar']['workdayends']; //18; 5026 5155 5027 $hour_size_px = $account_prefs['calendar']['interval'] ? $account_prefs['calendar']['interval'] : 42 5156 $hour_size_px = $account_prefs['calendar']['interval'] ? $account_prefs['calendar']['interval'] : 42; 5028 5157 5029 5158 $events_to_show_json = array(); … … 5135 5264 'hora_final' => $hora_final, 5136 5265 'hour_size_px' => $hour_size_px, 5137 'date_events_json' => $date_events_json 5266 'date_events_json' => $date_events_json, 5138 5267 'events_to_show_json' => $events_to_show_json 5139 5268 ); -
branches/2.2.0.1/calendar/templates/default/app_print.css
r4001 r4030 8 8 color: #000066; 9 9 background-color: #F7F7F7; 10 /*border: 1px solid #CCCCCC;*/11 10 margin: 0px; 12 11 padding: 0px; 13 /*height: 100%;*/14 12 width: 98%; 15 13 position:absolute;
Note: See TracChangeset
for help on using the changeset viewer.