From 16bb11c16591721c87c68b620dd4fd91304b46a5 Mon Sep 17 00:00:00 2001 From: Eriksen Costa Paixão Date: Wed, 7 Jul 2010 10:48:31 +0000 Subject: [PATCH] Refactoring para coding standards --- ieducar/intranet/clsCalendario.inc.php | 1379 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ieducar/intranet/educar_calendario_ano_letivo_lst.php | 2 ++ ieducar/intranet/scripts/calendario.js | 401 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ieducar/intranet/styles/calendario.css | 340 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------ 4 files changed, 1120 insertions(+), 1002 deletions(-) diff --git a/ieducar/intranet/clsCalendario.inc.php b/ieducar/intranet/clsCalendario.inc.php index e47c726..bddc701 100644 --- a/ieducar/intranet/clsCalendario.inc.php +++ b/ieducar/intranet/clsCalendario.inc.php @@ -1,663 +1,720 @@ "#FADEAF", - "LARANJA_CLARO" => "#FADEAF", - - 1 => "#93BDC9", - "AZUL_ESCURO" => "#93BDC9", - - 2 => "#BCD39D", - "VERDE_ESCURO" => "#BCD39D", - - 3 => "#C7D5E0", - "AZUL_CLARO" => "#C7D5E0", - - 4 => "#E5D6DD", - "ROSA" => "#E5D6DD", - - 5 => "#E9D1AF", - "LARANJA_ESCURO" => "#E9D1AF", - - 6 => "#E9E6BB", - "AMARELO" => "#E9E6BB", - - 7 => "#C9D9CF", - "VERDE_CLARO" => "#C9D9CF", - - 8 => "#DDE3D9", - "CINZA" => "#DDE3D9", - ); - - - /** - * - * - * @var array - */ - var $array_icone= array('A' => array('nome' => 'Anotações', 'link' => '/intranet/imagens/i-educar/letra_a.gif') - - ,'' - ); - - - var $array_icone_dias = array(); - - - /** - * Array das cores da legenda - * - * @var array - */ - var $array_cor = array('#F7F7F7'); - - /** - * Array das legendas - * - * @var array - */ - var $array_legenda = array('Padrao'); - - /** - * Array da cor para os dias da semana - * - * @var array - */ - var $array_cor_dia_padrao = array(); - - /** - * Dias do mes - * - * @var array - */ - var $array_dias = array(); - - /** - * acao quando for clicado em cima do dia - * - * @var array - */ - var $all_days_onclick; - - /** - * acao quando for clicado em cima do dia - * - * @var array - */ - var $all_days_url; - - - /** - * acao quando for clicado em cima do dia - * - * @var array - */ - var $array_onclick_dias = array(); - - /** - * Adicioar um div flutuante quando posicionar o mouse sobre o dia - * - * @var unknown_type - */ - var $array_div_flutuante_dias = array(); - - function resetAll(){ - $this->array_div_flutuante_dias = array(); - $this->array_onclick_dias = array(); - $this->array_dias = array(); - $this->array_cor_dia_padrao = array(); - $this->array_legenda = array('Padrao'); - $this->array_cor = array('#F7F7F7'); - $this->largura_externa = 400; - - $this->largura_interna = 250; - - $this->padding = 5; - } - - function setLargura($int_largura){ - - $this->largura_externa = $int_largura; - - if($int_largura > 250) - $this->largura_interna = $this->largura_externa - 121; - else - $this->largura_interna = '40%'; - - $this->padding = (floor((($int_largura - 30) / 7 ) / 10) * 2); - - } - - function diaDescricao($arr_dias,$array_mensagem_dias){ - - if(is_array($arr_dias)){ - foreach ($arr_dias as $key => $dia) { - $this->array_div_flutuante_dias[$key] = $array_mensagem_dias[$key]; - } - - } - } - - function diaOnClick($arr_dias,$array_onclick_dias){ - - if(is_array($arr_dias)){ - foreach ($arr_dias as $key => $dia) { - $this->array_onclick_dias[$dia][] = $array_onclick_dias[$key]; - } - - } - - } - - function adicionarIconeDias($arr_dias,$id_icone){ - - if(is_array($arr_dias)){ - - foreach ($arr_dias as $key => $dia) { - if(key_exists($id_icone,$this->array_icone)) - $this->array_icone_dias[$dia] = $id_icone; - $this->array_icone[$id_icone]['utilizado'] = true; - } - - } - - } - - /** - - * * - * @param STRING $str_legenda - * @param STRING $str_cor - * #FADEAF - 0 - LARANJA_CLARO - * - * #93BDC9 - 1 - AZUL_ESCURO - * - * #BCD39D - 2 - VERDE_ESCURO - * - * #C7D5E0 - 3 - AZUL_CLARO - * - * #E5D6DD - 4 - ROSA - * - * #E9D1AF - 5 - LARANJA_ESCURO - * - * #E9E6BB - 6 - AMARELO - * - * #C9D9CF - 7 - VERDE_CLARO - * - * #DDE3D9 - 8 - CINZA - */ - - function adicionarLegenda($str_legenda, $str_cor){ - - //$this->array_cod_legenda[] = $str_cod_legenda; - $key = array_search($str_legenda,$this->array_legenda); - if(!empty($key)) - if($this->array_legenda[$key] == $str_legenda) - return; - $this->array_legenda[] = $str_legenda; - $str_cor = strtoupper($str_cor); - $this->array_cor[] = $this->COR["{$str_cor}"]; - - - } - /** - * *Legenda padrao - * @param STRING $str_legenda - * @param STRING $str_cor - * #FADEAF - 0 - LARANJA_CLARO - * - * #93BDC9 - 1 - AZUL_ESCURO - * - * #BCD39D - 2 - VERDE_ESCURO - * - * #C7D5E0 - 3 - AZUL_CLARO - * - * #E5D6DD - 4 - ROSA - * - * #E9D1AF - 5 - LARANJA_ESCURO - * - * #E9E6BB - 6 - AMARELO - * - * #C9D9CF - 7 - VERDE_CLARO - * - * #DDE3D9 - 8 - CINZA - */ - function setLegendaPadrao($str_legenda, $str_cor = "#F7F7F7"){ - - $this->array_legenda[0] = $str_legenda; - $this->array_cor[0] = $this->COR["{$str_cor}"]; - - } - - /** - - * *Atribui uma cor padrao para os dias(0 Dom - 6 Sab) da semana ex - todas as segundas 1 - * @param ARRAY $arr_dia_semana - * @param STRING $str_cor - * #FADEAF - 0 - LARANJA_CLARO - * - * #93BDC9 - 1 - AZUL_ESCURO - * - * #BCD39D - 2 - VERDE_ESCURO - * - * #C7D5E0 - 3 - AZUL_CLARO - * - * #E5D6DD - 4 - ROSA - * - * #E9D1AF - 5 - LARANJA_ESCURO - * - * #E9E6BB - 6 - AMARELO - * - * #C9D9CF - 7 - VERDE_CLARO - * - * #DDE3D9 - 8 - CINZA - */ - function setCorDiaSemana($arr_dia_semana, $str_cor){ - $str_cor = strtoupper($str_cor); - if(is_array($arr_dia_semana)) - foreach ($arr_dia_semana as $dia) - $this->array_cor_dia_padrao["{$dia}"] = $this->COR["{$str_cor}"]; - else - $this->array_cor_dia_padrao["{$arr_dia_semana}"] = $str_cor; - } - /** - * Adiciona os dias do mes com a sua legenda - * - * @param unknown_type $str_cod_legenda - * @param unknown_type $dias - */ - function adicionarArrayDias($str_cod_legenda,$dias){ - - $key = array_shift(array_keys($this->array_legenda, $str_cod_legenda)); - foreach ($dias as $dia) - { - $dia = (int)$dia; - $this->array_dias["{$dia}"] = $key; - } - - ksort($this->array_dias); - - } - - /** - * retorna o calendario - * - * @param unknown_type $mes - * @param unknown_type $ano - * @return unknown - */ - function getCalendario($mes,$ano,$nome,$mixVariaveisMantidas) { - - $array_color = $array_color; - $array_legenda = $array_legenda; - - if(isset($mixVariaveisMantidas["{$nome}_mes"]) && is_numeric($mixVariaveisMantidas["{$nome}_mes"])) - $mes = $mixVariaveisMantidas["{$nome}_mes"]; - - if(isset($mixVariaveisMantidas["{$nome}_ano"]) && is_numeric($mixVariaveisMantidas["{$nome}_ano"]) && $this->permite_trocar_ano == true) - $ano = $mixVariaveisMantidas["{$nome}_ano"]; - - // Array com todos os dias da semana - $diasDaSemana = array('DOM','SEG','TER','QUA','QUI','SEX','SAB'); - $diasDaSemana = array('DOM','SEG','TER','QUA','QUI','SEX','SAB'); - - $mesesDoAno = array( - "1" => "JANEIRO" - ,"2" => "FEVEREIRO" - ,"3" => "MARÇO" - ,"4" => "ABRIL" - ,"5" => "MAIO" - ,"6" => "JUNHO" - ,"7" => "JULHO" - ,"8" => "AGOSTO" - ,"9" => "SETEMBRO" - ,"10" => "OUTUBRO" - ,"11" => "NOVEMBRO" - ,"12" => "DEZEMBRO" - ); - - // Qual o primeiro dia do mes - $primeiroDiaDoMes = mktime(0,0,0,$mes,1,$ano); - - // Quantos dias tem o mes - $NumeroDiasMes = date('t',$primeiroDiaDoMes); - - // Retrieve some information about the first day of the - // month in question. - $dateComponents = getdate($primeiroDiaDoMes); - - // What is the name of the month in question? - $NomeMes = $mesesDoAno[$dateComponents['mon']]; - - // What is the index value (0-6) of the first day of the - // month in question. - $DiaSemana = $dateComponents['wday']; - - // Create the table tag opener and day headers - //GET - $linkFixo = $strUrl . "?"; - if( is_array( $mixVariaveisMantidas ) ) - { - foreach ( $mixVariaveisMantidas as $key => $value ) - { - if( $key != "{$nome}_mes" && $key != "{$nome}_ano") - { - $linkFixo .= "$key=$value&"; - } - } - } - else - { - if( is_string( $mixVariaveisMantidas ) ) - { - $linkFixo .= "$mixVariaveisMantidas&"; - } - } - // - $linkFixo = $linkFixo == "?" ? "" : $linkFixo; - - if($mes == 12) - { - if($this->permite_trocar_ano) - { - $mes_posterior_mes = 1; - $mes_anterior_mes = 11; - $ano_posterior_mes = $ano + 1; - $ano_anterior_mes = $ano; - - $mes_ano = $mes; - $ano_posterior_ano = $ano + 1; - $ano_anterior_ano = $ano - 1; - - //$ano++; - }else{ - $mes_posterior_mes = 1; - $mes_anterior_mes = 11; - $ano_posterior_mes = $ano; - $ano_anterior_mes = $ano; - } - }elseif ($mes == 1){ - if($this->permite_trocar_ano) - { - $mes_posterior_mes = 2; - $mes_anterior_mes = 12; - $ano_posterior_mes = $ano; - $ano_anterior_mes = $ano - 1; - - $mes_ano = $mes; - $ano_posterior_ano = $ano + 1; - $ano_anterior_ano = $ano - 1; - }else{ - $mes_posterior_mes = 2; - $mes_anterior_mes = 12; - $ano_posterior_mes = $ano; - $ano_anterior_mes = $ano; - } - } - else{ - if($this->permite_trocar_ano) - { - $mes_posterior_mes = $mes + 1; - $mes_anterior_mes = $mes - 1; - $ano_posterior_mes = $ano; - $ano_anterior_mes = $ano; - - $mes_ano = $mes; - $ano_posterior_ano = $ano + 1; - $ano_anterior_ano = $ano - 1; - }else{ - $mes_posterior_mes = $mes + 1; - $mes_anterior_mes = $mes - 1; - $ano_posterior_mes = $ano; - $ano_anterior_mes = $ano; - } - } - - - - $form = "
- - - - -
"; - - if($this->permite_trocar_ano == true) - { - $select = ""; - - $cab = "Mês Anterior{$select}Mês Posterior - Mês Anterior{$ano}Mês Posterior"; - }else - { - $cab = "Mês Anterior{$NomeMes} {$ano}href='#' onclick='acaoCalendario(\"{$nome}\",\"\",\"{$mes_posterior_mes}\",\"{$ano_anterior_mes}\")'>Mês Posterior"; - } - - - - $calendario = "
"; - $calendario .= ""; - $calendario .= ""; - - $calendario .= ""; - $calendario .= "
 $cab 
$form"; - $calendario .= ""; - - // Create the calendar headers - foreach($diasDaSemana as $day) { - if(end($diasDaSemana) == $day) - $calendario .= ""; - else - $calendario .= ""; - } - - $calendario .= ""; - $calendario .= "
$day$day
"; - $calendario .= "
"; - $calendario .= ""; - // Create the rest of the calendar - - // Initiate the day counter, starting with the 1st. - - $diaCorrente = 1; - - $calendario .= ""; - - // The variable $DiaSemana is used to - // ensure that the calendar - // display consists of exactly 7 columns. - - if ($DiaSemana > 0) { - $completar_dias = $DiaSemana; - $day = date ("d", mktime (0,0,0,$dateComponents["mon"],-$completar_dias+1,$dateComponents["year"])); - for($a = 0 ; $a < $completar_dias ; $a++) - { - $calendario .= ""; - $day++; - } - - } - while ($diaCorrente <= $NumeroDiasMes) { - - // Seventh column (Saturday) reached. Start a new row. - - if ($DiaSemana == 7) { - - $DiaSemana = 0; - $calendario .= ""; - - } - - $style_dia ="background-color:{$this->array_cor[0]};"; - - if($this->array_cor_dia_padrao[$DiaSemana]) - $style_dia ="background-color:{$this->array_cor_dia_padrao[$DiaSemana]};"; - - - if (key_exists($diaCorrente,$this->array_dias) /*&& $DiaSemana != 0 && $DiaSemana != 6*/) { - $key = $this->array_dias[$diaCorrente]; - $cor = $this->array_cor[$key]; - $style_dia ="background-color:{$cor};"; - } - - - $onclick = ""; - - if($this->all_days_onclick) - { - $onclick = "onclick=\"{$this->all_days_onclick}\""; - }elseif($this->all_days_url) - { - $onclick = "onclick=\"document.location='{$this->all_days_url}&dia={$diaCorrente}&mes={$mes}&ano={$ano}';\""; - } - - if (key_exists($diaCorrente,$this->array_onclick_dias)) - { - $onclick = "onclick=\"{$this->array_onclick_dias[$diaCorrente]};\""; - //break; - } - - $icone = ""; - if(key_exists($diaCorrente,$this->array_icone_dias)){ - $icone = ""; - } - - $message = ""; - $diaCorrente_ = strlen($diaCorrente) == 1 ? "0".$diaCorrente : $diaCorrente; - $NomeMes = strtolower($NomeMes); - - if (key_exists($diaCorrente,$this->array_div_flutuante_dias)) { - $message = "onmouseover=\"ShowContent('{$diaCorrente}','{$mes}','{$ano}','{$nome}'); return true;\""; - $mouseout = "onmouseout=\"HideContent(event,'{$diaCorrente}','{$mes}','{$ano}','{$nome}')\" "; - $mensagens .= ""; - - } - - $calendario .= ""; - - // Increment counters - - $diaCorrente++; - $DiaSemana++; - - } - - // Complete the row of the last week in month, if necessary - - if ($DiaSemana != 7) { - - $remainingDays = 7 - $DiaSemana; - - for($a = 1 ; $a <= $remainingDays ; $a++) - { - //dayLastMonth - $calendario .= ""; - - } - - } - - if($this->array_legenda) - { - - $calendario .= ""; - } - - if($this->array_icone_dias) - { - - $calendario .= ""; - } - $calendario .= "
{$day}
{$icone} $diaCorrente_{$a}
"; - $calendario .= " - "; - $cont = 0; - foreach ($this->array_legenda as $key => $legenda){ - $style = "style='background-color:{$this->array_cor["{$key}"]};'"; - $calendario .= ""; - $cont++; - if($cont == 3){ - $calendario .= ""; - $cont = 0; - } - } - $calendario .= "
 {$legenda}
"; - $calendario .="
"; - $calendario .= " - "; - $cont = 0; - - foreach ($this->array_icone as $key => $legenda){ - if($legenda['utilizado']) - { - $style = "style='background-color:{$this->array_cor["{$key}"]};'"; - $icone = ""; - $icone = ""; - $calendario .= ""; - $cont++; - if($cont == 3){ - $calendario .= ""; - $cont = 0; - } - } - } - $calendario .= "
$icone{$legenda['nome']}
"; - $calendario .="
"; - $calendario .= "
"; - $calendario .= $mensagens; - return $calendario; - - } - -}; -?> +/** + * i-Educar - Sistema de gestão escolar + * + * Copyright (C) 2006 Prefeitura Municipal de Itajaí + * + * + * Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo + * sob os termos da Licença Pública Geral GNU conforme publicada pela Free + * Software Foundation; tanto a versão 2 da Licença, como (a seu critério) + * qualquer versão posterior. + * + * Este programa é distribuí­do na expectativa de que seja útil, porém, SEM + * NENHUMA GARANTIA; nem mesmo a garantia implí­cita de COMERCIABILIDADE OU + * ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública Geral + * do GNU para mais detalhes. + * + * Você deve ter recebido uma cópia da Licença Pública Geral do GNU junto + * com este programa; se não, escreva para a Free Software Foundation, Inc., no + * endereço 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. + * + * @author Prefeitura Municipal de Itajaí + * @category i-Educar + * @license @@license@@ + * @package iEd_Include + * @since Arquivo disponível desde a versão 1.0.0 + * @version $Id$ + */ + +/** + * clsCalendario class. + * + * @author Prefeitura Municipal de Itajaí + * @category i-Educar + * @license @@license@@ + * @package iEd_Include + * @since Classe disponível desde a versão 1.0.0 + * @version @@package_version@@ + */ +class clsCalendario +{ + /** + * @var int + */ + var $permite_trocar_ano = 0; + + /** + * @var int + */ + var $largura_externa = 400; + + /** + * @var int + */ + var $largura_interna = 250; + + /** + * @var int + */ + var $padding = 5; + + /** + * @var array + */ + var $COR = array( + 0 => '#FADEAF', + 'LARANJA_CLARO' => '#FADEAF', + 1 => '#93BDC9', + 'AZUL_ESCURO' => '#93BDC9', + 2 => '#BCD39D', + 'VERDE_ESCURO' => '#BCD39D', + 3 => '#C7D5E0', + 'AZUL_CLARO' => '#C7D5E0', + 4 => '#E5D6DD', + 'ROSA' => '#E5D6DD', + 5 => '#E9D1AF', + 'LARANJA_ESCURO' => '#E9D1AF', + 6 => '#E9E6BB', + 'AMARELO' => '#E9E6BB', + 7 => '#C9D9CF', + 'VERDE_CLARO' => '#C9D9CF', + 8 => '#DDE3D9', + 'CINZA' => '#DDE3D9', + ); + + /** + * @var array + */ + var $array_icone = array( + 'A' => array( + 'nome' => 'Anotações', + 'link' => '/intranet/imagens/i-educar/letra_a.gif' + ), + '' + ); + + /** + * @var array + */ + var $array_icone_dias = array(); + + /** + * Cores da legenda. + * @var array + */ + var $array_cor = array('#F7F7F7'); + + /** + * Legendas. + * @var array + */ + var $array_legenda = array('Padrão'); + + /** + * Cor para os dias da semana. + * @var array + */ + var $array_cor_dia_padrao = array(); + + /** + * Dias do mês. + * @var array + */ + var $array_dias = array(); + + /** + * Javascript de um "dia". + * @var array + */ + var $all_days_onclick; + + /** + * URL de um "dia". + * @var array + */ + var $all_days_url; + + /** + * @var array + */ + var $array_onclick_dias = array(); + + /** + * Div flutuante para dias. + * @var array + */ + var $array_div_flutuante_dias = array(); + + function resetAll() + { + $this->array_div_flutuante_dias = array(); + $this->array_onclick_dias = array(); + $this->array_dias = array(); + $this->array_cor_dia_padrao = array(); + $this->array_legenda = array('Padrão'); + $this->array_cor = array('#F7F7F7'); + $this->largura_externa = 400; + $this->largura_interna = 250; + $this->padding = 5; + } + + /** + * @param int $int_largura + */ + function setLargura($int_largura) + { + $this->largura_externa = $int_largura; + + if ($int_largura > 250) { + $this->largura_interna = $this->largura_externa - 121; + } + else { + $this->largura_interna = '40%'; + } + + $this->padding = floor((($int_largura - 30) / 7 ) / 10) * 2; + } + + /** + * @param array $arr_dias + * @param array $array_mensagem_dias + */ + function diaDescricao($arr_dias, $array_mensagem_dias) + { + if (is_array($arr_dias)) { + foreach ($arr_dias as $key => $dia) { + $this->array_div_flutuante_dias[$key] = $array_mensagem_dias[$key]; + } + } + } + + /** + * @param array $arr_dias + * @param array $array_onclick_dias + */ + function diaOnClick($arr_dias, $array_onclick_dias) + { + if (is_array($arr_dias)) { + foreach ($arr_dias as $key => $dia) { + $this->array_onclick_dias[$dia][] = $array_onclick_dias[$key]; + } + } + } + + /** + * @param array $arr_dias + * @param string $id_icone + */ + function adicionarIconeDias($arr_dias, $id_icone) + { + if (is_array($arr_dias)) { + foreach ($arr_dias as $key => $dia) { + if (key_exists($id_icone,$this->array_icone)) { + $this->array_icone_dias[$dia] = $id_icone; + $this->array_icone[$id_icone]['utilizado'] = TRUE; + } + } + } + } + + /** + * @param string $str_legenda + * @param string $str_cor + */ + function adicionarLegenda($str_legenda, $str_cor) + { + $key = array_search($str_legenda, $this->array_legenda); + + if (!empty($key)) + if($this->array_legenda[$key] == $str_legenda) + return; + + $this->array_legenda[] = $str_legenda; + $str_cor = strtoupper($str_cor); + $this->array_cor[] = $this->COR[$str_cor]; + } + + /** + * @param string $str_legenda + * @param string $str_cor + */ + function setLegendaPadrao($str_legenda, $str_cor = '#F7F7F7') + { + $this->array_legenda[0] = $str_legenda; + $this->array_cor[0] = $this->COR[$str_cor]; + } + + /** + * @param array $arr_dia_semana + * @param string $str_cor + */ + function setCorDiaSemana($arr_dia_semana, $str_cor) + { + $str_cor = strtoupper($str_cor); + + if (is_array($arr_dia_semana)) + foreach ($arr_dia_semana as $dia) { + $this->array_cor_dia_padrao[$dia] = $this->COR[$str_cor]; + } + else { + $this->array_cor_dia_padrao["{$arr_dia_semana}"] = $str_cor; + } + } + + /** + * Adiciona os dias do mês com a sua legenda. + * @param string $str_cod_legenda + * @param int $dias + */ + function adicionarArrayDias($str_cod_legenda, $dias) + { + $key = array_shift(array_keys($this->array_legenda, $str_cod_legenda)); + + foreach ($dias as $dia) { + $dia = (int) $dia; + $this->array_dias[$dia] = $key; + } + + ksort($this->array_dias); + } + + /** + * Retorna o código HTML do calendário. + * + * Parte do código foi baseada em um tutorial antigo disponível + * no site da Zend. A URL original não existe mais mas, parte do + * código foi preservado por um blogueiro no endereço . + * Não existe informação de licenciamento relevante. + * + * @link http://miud.in/7NM Código fonte da geração de calendário + * @param int $mes + * @param int $ano + * @param string $nome + * @param mixed mixVariaveisMantidas + * @return string + * @todo Substituir código de geração de calendário por uma biblioteca + * com licença compatível com GPL2 + */ + function getCalendario($mes, $ano, $nome, $mixVariaveisMantidas) + { + $array_color = $array_color; + $array_legenda = $array_legenda; + + if ( + isset($mixVariaveisMantidas["{$nome}_mes"]) && + is_numeric($mixVariaveisMantidas["{$nome}_mes"]) + ) { + $mes = $mixVariaveisMantidas["{$nome}_mes"]; + } + + if( + isset($mixVariaveisMantidas["{$nome}_ano"]) && + is_numeric($mixVariaveisMantidas["{$nome}_ano"]) && + $this->permite_trocar_ano == true + ) { + $ano = $mixVariaveisMantidas["{$nome}_ano"]; + } + + // Array com todos os dias da semana + $diasDaSemana = array('DOM', 'SEG', 'TER', 'QUA', 'QUI', 'SEX', 'SAB'); + + $mesesDoAno = array( + '1' => 'JANEIRO', + '2' => 'FEVEREIRO', + '3' => 'MARÇO', + '4' => 'ABRIL', + '5' => 'MAIO', + '6' => 'JUNHO', + '7' => 'JULHO', + '8' => 'AGOSTO', + '9' => 'SETEMBRO', + '10' => 'OUTUBRO', + '11' => 'NOVEMBRO', + '12' => 'DEZEMBRO' + ); + + // Qual o primeiro dia do mes + $primeiroDiaDoMes = mktime(0, 0, 0, $mes, 1, $ano); + + // Quantos dias tem o mes + $NumeroDiasMes = date('t', $primeiroDiaDoMes); + + // Retrieve some information about the first day of the + // month in question. + $dateComponents = getdate($primeiroDiaDoMes); + + // What is the name of the month in question? + $NomeMes = $mesesDoAno[$dateComponents['mon']]; + + // What is the index value (0-6) of the first day of the + // month in question. + $DiaSemana = $dateComponents['wday']; + + // Create the table tag opener and day headers + // GET + $linkFixo = $strUrl . "?"; + if (is_array($mixVariaveisMantidas)) { + foreach ($mixVariaveisMantidas as $key => $value) { + if ($key != "{$nome}_mes" && $key != "{$nome}_ano") { + $linkFixo .= $key=$value . '&'; + } + } + } + else { + if (is_string($mixVariaveisMantidas)) { + $linkFixo .= "$mixVariaveisMantidas&"; + } + } + + $linkFixo = $linkFixo == '?' ? '' : $linkFixo; + + if ($mes == 12) { + if ($this->permite_trocar_ano) { + $mes_posterior_mes = 1; + $mes_anterior_mes = 11; + $ano_posterior_mes = $ano + 1; + $ano_anterior_mes = $ano; + + $mes_ano = $mes; + $ano_posterior_ano = $ano + 1; + $ano_anterior_ano = $ano - 1; + } + else { + $mes_posterior_mes = 1; + $mes_anterior_mes = 11; + $ano_posterior_mes = $ano; + $ano_anterior_mes = $ano; + } + } + elseif ($mes == 1) { + if ($this->permite_trocar_ano) { + $mes_posterior_mes = 2; + $mes_anterior_mes = 12; + $ano_posterior_mes = $ano; + $ano_anterior_mes = $ano - 1; + + $mes_ano = $mes; + $ano_posterior_ano = $ano + 1; + $ano_anterior_ano = $ano - 1; + } + else { + $mes_posterior_mes = 2; + $mes_anterior_mes = 12; + $ano_posterior_mes = $ano; + $ano_anterior_mes = $ano; + } + } + else { + if ($this->permite_trocar_ano) { + $mes_posterior_mes = $mes + 1; + $mes_anterior_mes = $mes - 1; + $ano_posterior_mes = $ano; + $ano_anterior_mes = $ano; + + $mes_ano = $mes; + $ano_posterior_ano = $ano + 1; + $ano_anterior_ano = $ano - 1; + } + else { + $mes_posterior_mes = $mes + 1; + $mes_anterior_mes = $mes - 1; + $ano_posterior_mes = $ano; + $ano_anterior_mes = $ano; + } + } + + $form = sprintf(' +
+ + + + +
', $linkFixo); + + if ($this->permite_trocar_ano == TRUE) { + $select = sprintf( + ''; + + $cab = array(); + $cab[] = sprintf(' + + Mês Anterior + + %s', + $nome, $mes_anterior_mes, $ano_anterior_mes, $select); + + $cab[] = sprintf(' + + Mês Posterior + ', + $nome, $mes_posterior_mes, $ano_posterior_mes); + + $cab[] = sprintf(' + + Mês Anterior + + %s + ', $nome, $mes_ano, $ano_anterior_ano, $ano); + + $cab[] = sprintf(' + + Mês Posterior + ', + $nome, $mes_ano, $ano_posterior_ano); + + $cab = implode("\n", $cab); + } + else { + $cab = array(); + + $cab[] = sprintf(' + + Mês Anterior + + %s  + %s', + $nome, $mes_anterior_mes, $ano_anterior_mes, $NomeMes, $ano + ); + + $cab[] = sprintf(' + + Mês Posterior + ', + $nome, $mes_posterior_mes, $ano_anterior_mes); + + $cab = implode("\n", $cab); + } + + $calendario = sprintf(' +
+ ', + $this->largura_externa + ); + + $calendario .= sprintf(' + + + + + ', + $cab + ); + + $calendario .= sprintf(''; + + $calendario .= ''; + $calendario .= '
 %s 
%s', $form); + $calendario .= ''; + + // Create the calendar headers + foreach($diasDaSemana as $day) { + if (end($diasDaSemana) == $day) { + $calendario .= sprintf('', $day); + } + else { + $calendario .= sprintf( + '', $day + ); + } + } + + $calendario .= ''; + $calendario .= '
%s%s
'; + $calendario .= '
'; + $calendario .= ''; + + // Create the rest of the calendar + // Initiate the day counter, starting with the 1st. + $diaCorrente = 1; + $calendario .= ''; + + // The variable $DiaSemana is used to + // ensure that the calendar + // display consists of exactly 7 columns. + if ($DiaSemana > 0) { + $completar_dias = $DiaSemana; + $ts = mktime(0, 0, 0, $dateComponents['mon'], -$completar_dias + 1, $dateComponents['year']); + $day = date('d', $ts); + + for ($a = 0; $a < $completar_dias; $a++) { + $calendario .= sprintf( + '', + $this->padding, $day + ); + + $day++; + } + } + + while ($diaCorrente <= $NumeroDiasMes) { + // Seventh column (Saturday) reached. Start a new row. + if ($DiaSemana == 7) { + $DiaSemana = 0; + $calendario .= ''; + } + + $style_dia = sprintf('background-color: %s;', $this->array_cor[0]); + + if ($this->array_cor_dia_padrao[$DiaSemana]) + $style_dia = sprintf('background-color: %s;', $this->array_cor_dia_padrao[$DiaSemana]); + + if (key_exists($diaCorrente,$this->array_dias)) { + $key = $this->array_dias[$diaCorrente]; + $cor = $this->array_cor[$key]; + $style_dia = sprintf('background-color: %s;', $cor); + } + + $onclick = ''; + + if ($this->all_days_onclick) { + $onclick = sprintf('onclick="%s"', $this->all_days_onclick); + } + elseif ($this->all_days_url) { + $onclick = sprintf( + 'onclick="document.location=\'%s&dia=%s&mes=%s&ano=%s\';"', + $this->all_days_url, $diaCorrente, $mes, $ano + ); + } + + if (key_exists($diaCorrente,$this->array_onclick_dias)) { + $onclick = sprintf('onclick="%s;"', $this->array_onclick_dias[$diaCorrente]); + } + + $icone = ''; + + if (key_exists($diaCorrente, $this->array_icone_dias)) { + $icone = sprintf( + '%s', + $this->array_icone[$this->array_icone_dias[$diaCorrente]]['link'], + $this->array_icone[$this->array_icone_dias[$diaCorrente]]['nome'] + ); + } + + $message = ''; + $diaCorrente_ = strlen($diaCorrente) == 1 ? '0' . $diaCorrente : $diaCorrente; + $NomeMes = strtolower($NomeMes); + + if (key_exists($diaCorrente,$this->array_div_flutuante_dias)) { + $message = "onmouseover=\"ShowContent('{$diaCorrente}','{$mes}','{$ano}','{$nome}'); return true;\""; + $mouseout = "onmouseout=\"HideContent(event,'{$diaCorrente}','{$mes}','{$ano}','{$nome}')\" "; + $mensagens .= " + "; + } + + $calendario .= sprintf(" + ", + $style_dia, $this->padding, $nome, $diaCorrente, $mes, $ano, $onclick, $message, + $icone, $diaCorrente_); + + // Increment counters + $diaCorrente++; + $DiaSemana++; + } + + // Complete the row of the last week in month, if necessary + if ($DiaSemana != 7) { + $remainingDays = 7 - $DiaSemana; + + for ($a = 1 ; $a <= $remainingDays ; $a++) { + //dayLastMonth + $calendario .= sprintf(' + ', + $this->padding, $a + ); + } + } + + if ($this->array_legenda) { + $calendario .= ''; + } + + if ($this->array_icone_dias) { + $calendario .= ''; + } + + $calendario .= '
%s
+ %s %s + %s
'; + $calendario .= ' + + '; + + $cont = 0; + + foreach ($this->array_legenda as $key => $legenda) { + $style = sprintf( + 'style="background-color: %s;"', $this->array_cor[$key] + ); + + $calendario .= sprintf( + '', $style, $legenda + ); + + $cont++; + + if ($cont == 3) { + $calendario .= ''; + $cont = 0; + } + } + + $calendario .= '
 %s
'; + $calendario .= '
'; + $calendario .= ' + '; + + $cont = 0; + + foreach ($this->array_icone as $key => $legenda) { + if ($legenda['utilizado']) { + $style = sprintf('style="background-color: %s;"', $this->array_cor[$key]); + $icone = ''; + + $icone = sprintf( + '%s', + $this->array_icone[$key]['link'], $this->array_icone[$key]['nome'] + ); + + $calendario .= sprintf( + '', + $style, $icone, $legenda['nome'] + ); + + $cont++; + + if ($cont == 3) { + $calendario .= ''; + $cont = 0; + } + } + } + + $calendario .= '
%s %s
'; + $calendario .= '
'; + $calendario .= '
'; + + $calendario .= $mensagens; + + return $calendario; + } +} \ No newline at end of file diff --git a/ieducar/intranet/educar_calendario_ano_letivo_lst.php b/ieducar/intranet/educar_calendario_ano_letivo_lst.php index 641836a..2819f3e 100644 --- a/ieducar/intranet/educar_calendario_ano_letivo_lst.php +++ b/ieducar/intranet/educar_calendario_ano_letivo_lst.php @@ -270,6 +270,7 @@ class indice extends clsConfig } } + // Monta a lista if (is_array($lista) && count($lista)) { foreach ($lista as $key => $registro) { @@ -300,6 +301,7 @@ class indice extends clsConfig $inicio_ano = explode('/', dataFromPgToBr($inicio_ano)); $fim_ano = explode('/', dataFromPgToBr($fim_ano)); + $obj_calendario = new clsCalendario(); $obj_calendario->setLargura(600); $obj_calendario->permite_trocar_ano = TRUE; diff --git a/ieducar/intranet/scripts/calendario.js b/ieducar/intranet/scripts/calendario.js index 8469db6..068a382 100755 --- a/ieducar/intranet/scripts/calendario.js +++ b/ieducar/intranet/scripts/calendario.js @@ -1,121 +1,150 @@ - -var isIE = (navigator.appName.indexOf("Microsoft")!= -1) ? 1:0 -if(!isIE) - window.addEventListener("resize", updateMessagePosition, false); -else - window.onresize = updateMessagePosition; -//body.onresize = updateMessagePosit//ion; - -function updateMessagePosition(){ - - if(!last_td) - return; - tamanhoTela(); - var subtract; - - if(findPosX(last_td) > winW/2){ - if(navigator.appName.indexOf("Microsoft") == 0 ){ - subtract = -317 + 45 +20; - }else{ - subtract = -317 + 45; - } - - }else{ - - subtract = 2; - - } - - last.style.left = (findPosX(last_td)+subtract) + "px"; - - last.style.top = (findPosY(last_td)+2) + "px"; - +/** + * i-Educar - Sistema de gestão escolar + * + * Copyright (C) 2006 Prefeitura Municipal de Itajaí + * + * + * Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo + * sob os termos da Licença Pública Geral GNU conforme publicada pela Free + * Software Foundation; tanto a versão 2 da Licença, como (a seu critério) + * qualquer versão posterior. + * + * Este programa é distribuí­do na expectativa de que seja útil, porém, SEM + * NENHUMA GARANTIA; nem mesmo a garantia implí­cita de COMERCIABILIDADE OU + * ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública Geral + * do GNU para mais detalhes. + * + * Você deve ter recebido uma cópia da Licença Pública Geral do GNU junto + * com este programa; se não, escreva para a Free Software Foundation, Inc., no + * endereço 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. + * + * Parte do código foi baseada em um tutorial antigo disponível + * no site da Zend. A URL original não existe mais mas, parte do + * código foi preservado por um blogueiro no endereço . + * Não existe informação de licenciamento relevante. Veja o arquivo + * intranet/clsCalendario.inc.php para mais informações. + * + * @author Prefeitura Municipal de Itajaí + * @category i-Educar + * @license @@license@@ + * @since Arquivo disponível desde a versão 1.0.0 + * @version $Id$ + */ + +var isIE = (navigator.appName.indexOf('Microsoft')!= -1) ? 1 : 0 + +if (! isIE) { + window.addEventListener('resize', updateMessagePosition, false); +} +else { + window.onresize = updateMessagePosition; } -if(document.createStyleSheet){ - document.createStyleSheet('styles/calendario.css'); +function updateMessagePosition() +{ + if (! last_td) { + return; + } - }else{ - var objHead = document.getElementsByTagName('head'); - var objCSS = objHead[0].appendChild(document.createElement('link')); - //objCSS = document.createElement('link'); - objCSS.rel = 'stylesheet'; - objCSS.href = 'styles/calendario.css'; - objCSS.type = 'text/css'; + tamanhoTela(); + var subtract; + if (findPosX(last_td) > winW / 2) { + if (navigator.appName.indexOf('Microsoft') == 0) { + subtract = -317 + 45 +20; + } + else { + subtract = -317 + 45; + } + } + else { + subtract = 2; + } - } + last.style.left = (findPosX(last_td) + subtract) + 'px'; + last.style.top = (findPosY(last_td) + 2) + 'px'; +} -function init(){ +if (document.createStyleSheet) { + document.createStyleSheet('styles/calendario.css'); +} +else { + var objHead = document.getElementsByTagName('head'); + var objCSS = objHead[0].appendChild(document.createElement('link')); - var div_calendario = document.getElementById('d_calendario'); + objCSS.rel = 'stylesheet'; + objCSS.href = 'styles/calendario.css'; + objCSS.type = 'text/css'; +} - if(!div_calendario) - return; - // Internet Explorer: - if (document.all) - div_calendario.onselectstart = function () {return false; }; +function init() +{ + var div_calendario = document.getElementById('d_calendario'); - // Netscape 4: - if (document.layers) { - document.captureEvents(Event.MOUSEDOWN); - div_calendario.onmousedown =function (evt) { return false; }; - } + if (! div_calendario) { + return; + } - // Netscape 6: - div_calendario.onmousedown = function () { return false; }; + // Internet Explorer: + if (document.all) { + div_calendario.onselectstart = function () { return false; }; + } + // Netscape 4: + if (document.layers) { + document.captureEvents(Event.MOUSEDOWN); + div_calendario.onmousedown = function (evt) { + return false; + }; + } + // Netscape 6: + div_calendario.onmousedown = function () { + return false; + }; } + window.onload = init; +var cX = 0; +var cY = 0; -var cX = 0; var cY = 0; var last; var last_td; var fechou = false; -//function UpdateCursorPosition(e){ cX = e.pageX; cY = e.pageY;} -//function UpdateCursorPositionDocAll(e){ cX = event.clientX; cY = event.clientY;} -//if(document.all) { document.onmousemove = UpdateCursorPositionDocAll; } -//else { document.onmousemove = UpdateCursorPosition; } - //var screen_width = screen.availWidth; -//alert(parent.innerWidth); - -function AssignPosition(d,m,y,nome) { - - var dd = document.getElementById(nome + '_td_dia_' + d + '' + m + '' + y); - var d = document.getElementById(nome + '_div_dia_' + d + '' + m + '' + y); - last_td = dd; - tamanhoTela(); - var subtract; - if(findPosX(dd) > winW/2){ - - if(navigator.appName.indexOf("Microsoft") == 0 ){ - subtract = -317 + 72 + 20; - }else{ - subtract = -317 + 72; - //45 - } +function AssignPosition(d,m,y,nome) +{ + var dd = document.getElementById(nome + '_td_dia_' + d + '' + m + '' + y); + var d = document.getElementById(nome + '_div_dia_' + d + '' + m + '' + y); - }else{ + last_td = dd; + tamanhoTela(); - subtract = 2; + var subtract; - } + if (findPosX(dd) > winW/2) { + if (navigator.appName.indexOf('Microsoft') == 0) { + subtract = -317 + 72 + 20; + } + else { + subtract = -317 + 72; + } + } + else { + subtract = 2; + } - d.style.left = (findPosX(dd)+subtract) + "px"; + d.style.left = (findPosX(dd) + subtract) + 'px'; - d.style.top = (findPosY(dd)+2) + "px"; + d.style.top = (findPosY(dd) + 2) + 'px'; } -function HideContent(event,d,m,y,nome) { - - - if(d.length < 1) { - - return; - } +function HideContent(event, d, m, y, nome) +{ + if (d.length < 1) { + return; + } if (window.event) { current = this; @@ -124,133 +153,135 @@ function HideContent(event,d,m,y,nome) { else { current = event.currentTarget; related = event.relatedTarget; - //alert(current + ' - ' + related ); } - var dv = document.getElementById(nome + '_div_dia_'+ d + '' + m + '' + y); - b = related; - while (b.parentNode){ - if ((b = b.parentNode) == dv && (b.tagName == 'DIV' || b.tagName == 'TD')) - return true; - } - - // document.getElementById(nome + '_div_dia_'+ d + '' + m + '' + y).style.display = "none"; - var nome_div = nome + '_div_dia_'+ d + '' + m + '' + y; + var dv = document.getElementById(nome + '_div_dia_'+ d + '' + m + '' + y); - //alert("esconder(document.getElementById("+nome+" + '_div_dia_'+" + d + "+ '' +" + m + "+ '' +" + y + "))"); - //return; - setTimeout("esconder("+ nome_div + ");",500); + b = related; - setInterval('fechou=false;',1000); -} + while (b.parentNode) { + if ((b = b.parentNode) == dv && (b.tagName == 'DIV' || b.tagName == 'TD')) { + return true; + } + } -function esconder(el){ - fechou = true; - el.style.display = "none"; + var nome_div = nome + '_div_dia_'+ d + '' + m + '' + y; + setTimeout('esconder(' + nome_div + ');', 500); + setInterval('fechou=false;', 1000); } -function ShowContent(d,m,y,nome) { - if(fechou) - return; - var dd = document.getElementById(nome + '_div_dia_' + d + '' + m + '' + y); - if(dd != last && last != null) - last.style.display = "none"; +function esconder(el) +{ + fechou = true; + el.style.display = 'none'; +} - if(d.length < 1) { - return; - } +function ShowContent(d, m, y, nome) +{ + if (fechou) { + return; + } - var dd = document.getElementById(nome + '_div_dia_' + d + '' + m + '' + y); + var dd = document.getElementById(nome + '_div_dia_' + d + '' + m + '' + y); - AssignPosition(d,m,y,nome); + if (dd != last && last != null) { + last.style.display = 'none'; + } - dd.style.display = ""; + if (d.length < 1) { + return; + } - last = dd; + var dd = document.getElementById(nome + '_div_dia_' + d + '' + m + '' + y); + AssignPosition(d, m, y, nome); + dd.style.display = ''; + last = dd; } -function ReverseContentDisplay(d,m,y,nome) { - - if(d.length < 1) { - return; - } +function ReverseContentDisplay(d, m, y, nome) +{ + if (d.length < 1) { + return; + } - var dd = document.getElementById(nome + '_div_dia_' + d + '' + m + '' + y); + var dd = document.getElementById(nome + '_div_dia_' + d + '' + m + '' + y); - AssignPosition(dd); + AssignPosition(dd); - if(dd.style.display == "none") { - dd.style.display = ""; - } - else { - dd.style.display = "none"; - } + if (dd.style.display == 'none') { + dd.style.display = ''; + } + else { + dd.style.display = 'none'; + } } - function findPosX(obj) { - var curleft = 0; - if (obj.offsetParent) - { - while (obj.offsetParent) - { - curleft += obj.offsetLeft - obj = obj.offsetParent; - } - } - else if (obj.x) - curleft += obj.x; - return curleft; + var curleft = 0; + + if (obj.offsetParent) { + while (obj.offsetParent) { + curleft += obj.offsetLeft + obj = obj.offsetParent; + } + } + else if (obj.x) { + curleft += obj.x; + } + + return curleft; } function findPosY(obj) { - var curtop = 0; - if (obj.offsetParent) - { - while (obj.offsetParent) - { - curtop += obj.offsetTop - obj = obj.offsetParent; - } - } - else if (obj.y) - curtop += obj.y; - return curtop; + var curtop = 0; + + if (obj.offsetParent) { + while (obj.offsetParent) { + curtop += obj.offsetTop + obj = obj.offsetParent; + } + } + else if (obj.y) { + curtop += obj.y; + } + + return curtop; } + var winW; var winH; + function tamanhoTela() { - if( typeof( window.innerWidth ) == 'number' ) - { - winW = window.innerWidth; - winH = window.innerHeight; - } - else if( document.documentElement && - ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) - { - /* IE 6+ in 'standards compliant mode' */ - winW = document.documentElement.clientWidth; - winH = document.documentElement.clientHeight; - } - else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) - { - /*IE 4 compatible*/ - winW = document.body.clientWidth; - winH = document.body.clientHeight; - } - + if (typeof(window.innerWidth ) == 'number') { + winW = window.innerWidth; + winH = window.innerHeight; + } + else if ( + document.documentElement && + (document.documentElement.clientWidth || document.documentElement.clientHeight) + ) { + /* IE 6+ in 'standards compliant mode' */ + winW = document.documentElement.clientWidth; + winH = document.documentElement.clientHeight; + } + else if (document.body && (document.body.clientWidth || document.body.clientHeight)) { + /*IE 4 compatible*/ + winW = document.body.clientWidth; + winH = document.body.clientHeight; + } } -function acaoCalendario(nome,dia,mes,ano){ +function acaoCalendario(nome, dia, mes, ano) +{ + document.getElementById('nome').value = nome; + document.getElementById('dia').value = dia; + document.getElementById('mes').value = mes; + document.form_calendario.ano.value = ano; - document.getElementById('nome').value = nome; - document.getElementById('dia').value = dia; - document.getElementById('mes').value = mes; - document.form_calendario.ano.value = ano; - document.form_calendario.submit(); + document.form_calendario.submit(); } \ No newline at end of file diff --git a/ieducar/intranet/styles/calendario.css b/ieducar/intranet/styles/calendario.css index 929df76..badd7d7 100755 --- a/ieducar/intranet/styles/calendario.css +++ b/ieducar/intranet/styles/calendario.css @@ -1,156 +1,184 @@ - .calendar - { - /* font-family:arial,helvetica;*/ - font-family: sans-serif, verdana, arial, "Times New Roman"; - font-size:11px; - color: white; - } - - .cal_esq - { - height: 38px; - background-image: url(/intranet/imagens/i-educar/cal_topo.gif); - background-repeat: no-repeat; - padding-left: 94px; - } - - .header - { - background-color: #A0AAB3; - border-color: #8A959B; - border-style: solid; - border-width: 1px; - color: #ffffff; - font-weight: bold; - font-family: sans-serif, verdana, arial, "Times New Roman"; - font-size: 12px; - height: 24px; - text-align:center; - } - - .day - { - font-size: 12px; - font-family: sans-serif, verdana, arial, "Times New Roman"; - font-weight: bold; - color: #5F5F5F; - border: 1px solid #8A959B; - text-align: left; - height: 25px; - width:50px; - cursor:hand; - cursor:pointer; - - } - - .linkedday - { - font-size: 12px; - font-weight: bold; - color: #5F5F5F; - border: 1px solid #8A959B; - text-align: left; - padding-left:5px; - height: 25px; - - } - - .mes - { - font-size: 14px; - font-family: sans-serif, verdana, arial, "Times New Roman"; - color: #8A959B; - text-align: left; - vertical-align: middle; - font-weight: bold; - padding: 7px 20px 0px 30px; - margin-top: 12px; - } - - .bordaM - { - - border-right: 1px solid #8A959B; - border-left: 1px solid #8A959B; - padding: 8px 8px 0px 8px; - } - - .bordaF - { - border-color: #8A959B; - border-style: solid; - border-width: 0px 1px 1px 1px; - } - - .cal_dir - { - background-image: url(/intranet/imagens/i-educar/cal_dir.gif); - background-repeat: no-repeat; - padding-right: 20px; - background-position: 0px 0px; - } - - .legenda{ - color:black; - font-size: 10px; - font-family: sans-serif, verdana, arial, "Times New Roman"; - border-width: 1px 0px 0px 0px; - border-color: #8A959B; - border-style: solid; - margin-top:3px; - padding-top:3px; - } - - .cor { - border-color: #000000; - border-style: dotted; - border-width: 1px 1px 1px 1px; - width:30px; - } - - .dayLastMonth - { - font-size: 12px; - font-weight: bold; - color: #5F5F5F; - border: 1px solid #8A959B; - text-align: left; - padding-left:5px; - height: 25px; - width:50px; - filter: alpha(opacity=20); - opacity: .2; - font-family: sans-serif, verdana, arial, "Times New Roman"; - } - - .div_info { - - position:absolute; - font-size: 12px; - border: 2px outset #8A959B; - background-color: white; - color:#000000; - font-weight:bold; - padding: 8px; - min-width: 100px; - min-height: 50px; - width: 300px; - overflow:block; - font-family: sans-serif, verdana, arial, "Times New Roman"; - -background-color: #FFFFFF; - filter:alpha(opacity=80); - -moz-opacity: 0.8; - opacity: 0.8; - - - } - - .div_info a { - color:#0000aa; - text-decoration: none; - } - .div_info a:hover { - color:#000055; - text-decoration: underline; - } +/** + * i-Educar - Sistema de gestão escolar + * + * Copyright (C) 2006 Prefeitura Municipal de Itajaí + * + * + * Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo + * sob os termos da Licença Pública Geral GNU conforme publicada pela Free + * Software Foundation; tanto a versão 2 da Licença, como (a seu critério) + * qualquer versão posterior. + * + * Este programa é distribuí­do na expectativa de que seja útil, porém, SEM + * NENHUMA GARANTIA; nem mesmo a garantia implí­cita de COMERCIABILIDADE OU + * ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública Geral + * do GNU para mais detalhes. + * + * Você deve ter recebido uma cópia da Licença Pública Geral do GNU junto + * com este programa; se não, escreva para a Free Software Foundation, Inc., no + * endereço 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. + * + * Parte do código foi baseada em um tutorial antigo disponível + * no site da Zend. A URL original não existe mais mas, parte do + * código foi preservado por um blogueiro no endereço . + * Não existe informação de licenciamento relevante. Veja o arquivo + * intranet/clsCalendario.inc.php para mais informações. + * + * @author Prefeitura Municipal de Itajaí + * @category i-Educar + * @license @@license@@ + * @since Arquivo disponível desde a versão 1.0.0 + * @version $Id$ + */ + +.calendar +{ + font-family: sans-serif, verdana, arial, "Times New Roman"; + font-size: 11px; + color: white; +} + +.cal_esq +{ + height: 38px; + background-image: url('/intranet/imagens/i-educar/cal_topo.gif'); + background-repeat: no-repeat; + padding-left: 94px; +} + +.header +{ + background-color: #A0AAB3; + border-color: #8A959B; + border-style: solid; + border-width: 1px; + color: #FFF; + font-weight: bold; + font-family: sans-serif, verdana, arial, "Times New Roman"; + font-size: 12px; + height: 24px; + text-align:center; +} + +.day +{ + font-size: 12px; + font-family: sans-serif, verdana, arial, "Times New Roman"; + font-weight: bold; + color: #5F5F5F; + border: 1px solid #8A959B; + text-align: left; + height: 25px; + width:50px; + cursor: hand; + cursor: pointer; +} + +.linkedday +{ + font-size: 12px; + font-weight: bold; + color: #5F5F5F; + border: 1px solid #8A959B; + text-align: left; + padding-left: 5px; + height: 25px; +} + +.mes +{ + font-size: 14px; + font-family: sans-serif, verdana, arial, "Times New Roman"; + color: #8A959B; + text-align: left; + vertical-align: middle; + font-weight: bold; + padding: 7px 20px 0px 30px; + margin-top: 12px; +} + +.bordaM +{ + border-right: 1px solid #8A959B; + border-left: 1px solid #8A959B; + padding: 8px 8px 0px 8px; +} + +.bordaF +{ + border-color: #8A959B; + border-style: solid; + border-width: 0px 1px 1px 1px; +} + +.cal_dir +{ + background-image: url('/intranet/imagens/i-educar/cal_dir.gif'); + background-repeat: no-repeat; + padding-right: 20px; + background-position: 0px 0px; +} + +.legenda +{ + color: black; + font-size: 10px; + font-family: sans-serif, verdana, arial, "Times New Roman"; + border-width: 1px 0px 0px 0px; + border-color: #8A959B; + border-style: solid; + margin-top: 3px; + padding-top: 3px; +} + +.cor { + border-color: #000000; + border-style: dotted; + border-width: 1px 1px 1px 1px; + width:30px; +} + +.dayLastMonth +{ + font-size: 12px; + font-weight: bold; + color: #5F5F5F; + border: 1px solid #8A959B; + text-align: left; + padding-left: 5px; + height: 25px; + width:50px; + filter: alpha(opacity=20); + opacity: .2; + font-family: sans-serif, verdana, arial, "Times New Roman"; +} + +.div_info +{ + position: absolute; + font-size: 12px; + border: 2px outset #8A959B; + background-color: white; + color: #000000; + font-weight: bold; + padding: 8px; + min-width: 100px; + min-height: 50px; + width: 300px; + overflow: block; + font-family: sans-serif, verdana, arial, "Times New Roman"; + background-color: #FFFFFF; + filter:alpha(opacity=80); + -moz-opacity: 0.8; + opacity: 0.8; +} + +.div_info a { + color: #0000aa; + text-decoration: none; +} + +.div_info a:hover { + color: #000055; + text-decoration: underline; +} \ No newline at end of file -- libgit2 0.21.2