From cdaa655cbc54e8028437cae846255d1b514a2da4 Mon Sep 17 00:00:00 2001 From: harpiain@gmail.com Date: Sat, 21 Jun 2008 16:52:00 +0000 Subject: [PATCH] - Acrescentadas classes no cacic.css - melhorias no programa para manutenção da tabela "configuracao_padrao" e das demais configurações do sistema --- admin/configuracao_common.class.php | 20 ++++++++++++++++++++ admin/configuracao_common_01.tmpl.php | 12 +++++++++++- admin/configuracao_padrao.class.php | 26 ++++++++++++++++++++++++++ admin/configuracao_padrao_01.tmpl.php | 36 +++++++++++++++++++++--------------- imgs/btnleft.png | Bin 0 -> 407 bytes imgs/btnright.png | Bin 0 -> 448 bytes imgs/cacic_logo1.png | Bin 2540 -> 0 bytes imgs/cacic_logo2.png | Bin 4706 -> 0 bytes imgs/cacic_logo_antes.png | Bin 4013 -> 0 bytes imgs/cacic_para_mer.png | Bin 2538 -> 0 bytes imgs/carregando.gif | Bin 0 -> 1542 bytes imgs/checkagain.png | Bin 0 -> 599 bytes imgs/checked.png | Bin 0 -> 630 bytes imgs/error.png | Bin 0 -> 883 bytes imgs/first.png | Bin 0 -> 835 bytes imgs/last.png | Bin 0 -> 838 bytes imgs/logo_cacic_vetorizado.gif | Bin 9808 -> 0 bytes imgs/next.png | Bin 0 -> 558 bytes imgs/next_.png | Bin 0 -> 482 bytes imgs/prev.png | Bin 0 -> 564 bytes imgs/prev_.png | Bin 0 -> 478 bytes imgs/sign_add.png | Bin 0 -> 1088 bytes imgs/sign_minus.png | Bin 0 -> 625 bytes imgs/warning.png | Bin 0 -> 701 bytes include/cacic.css | 164 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------ 25 files changed, 218 insertions(+), 40 deletions(-) create mode 100755 imgs/btnleft.png create mode 100755 imgs/btnright.png delete mode 100755 imgs/cacic_logo1.png delete mode 100755 imgs/cacic_logo2.png delete mode 100755 imgs/cacic_logo_antes.png delete mode 100755 imgs/cacic_para_mer.png create mode 100755 imgs/carregando.gif create mode 100755 imgs/checkagain.png create mode 100755 imgs/checked.png create mode 100755 imgs/error.png create mode 100755 imgs/first.png create mode 100755 imgs/last.png delete mode 100755 imgs/logo_cacic_vetorizado.gif create mode 100755 imgs/next.png create mode 100755 imgs/next_.png create mode 100755 imgs/prev.png create mode 100755 imgs/prev_.png create mode 100755 imgs/sign_add.png create mode 100755 imgs/sign_minus.png create mode 100755 imgs/warning.png diff --git a/admin/configuracao_common.class.php b/admin/configuracao_common.class.php index d4e5509..2344418 100755 --- a/admin/configuracao_common.class.php +++ b/admin/configuracao_common.class.php @@ -93,10 +93,12 @@ if( ! @include("pat/patTemplate.php") ) $this->addVar('CommonSetup_head', 'CACIC_LANG_CHARSET', CACIC_LANG_CHARSET ); $this->addVar('CommonSetup_head', 'CACIC_THEME', CACIC_THEME ); $this->addVar('CommonSetup_head', 'CACIC_URL', CACIC_URL ); + $this->addVar('CommonSetup_messages', 'MESSAGES', $this->oTranslator->_('Mensagens') ); } /** * Armazena na "sessao" os dados de configuração comuns + * @access protected */ function setup() { global $configuracao; @@ -105,11 +107,29 @@ if( ! @include("pat/patTemplate.php") ) /** * Atribui o tipo de configuração a ser processada + * @access protected */ function setSetupType($type) { $this->setup_type = $type; } + /** + * Atribui o tipo de configuração a ser processada + * @access protected + */ + function showMessage($msg) { + $this->clearVar('CommonSetup_messages', 'MESSAGE'); + $this->addVar('CommonSetup_messages', 'MESSAGE', $msg ); + } + + /** + * Lança execeção se ocorrer erro + * @access protected + */ + function throwError($msg) { + throw new Exception($msg); + } + } ?> \ No newline at end of file diff --git a/admin/configuracao_common_01.tmpl.php b/admin/configuracao_common_01.tmpl.php index e3fc658..90821cb 100755 --- a/admin/configuracao_common_01.tmpl.php +++ b/admin/configuracao_common_01.tmpl.php @@ -46,7 +46,17 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' ); - +
+ + + + +
+
+ {MESSAGES} + {MESSAGE} +
+
diff --git a/admin/configuracao_padrao.class.php b/admin/configuracao_padrao.class.php index d6465c8..f5f270c 100755 --- a/admin/configuracao_padrao.class.php +++ b/admin/configuracao_padrao.class.php @@ -63,6 +63,7 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' ); $this->addVar('StandardSetup_form', 'TE_JANELAS_EXCECAO_TITLE', $this->oTranslator->_('Aplicativos (janelas) a evitar') ); $this->addVar('StandardSetup_form', 'TE_JANELAS_EXCECAO_HELP', $this->oTranslator->_('Evita que o Gerente de Coletas seja acionado enquanto tais aplicativos (janelas) estiverem ativos') ); $this->addVar('StandardSetup_form', 'BTN_SALVAR', $this->oTranslator->_('Gravar alteracoes') ); + $this->addVar('StandardSetup_form', 'BTN_RESET', $this->oTranslator->_('Restaurar valores') ); } /** @@ -83,10 +84,35 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' ); $this->clearVar('StandardSetup_form', 'SET_FOCUS'); $this->addVar('StandardSetup_form', 'SET_FOCUS', 'nm_organizacao' ); $btn_salvar = Security::read('btn_salvar'); + if(isset($btn_salvar) and ($btn_salvar)) { + try { + $this->salvarDados(); + } + catch( Exception $erro ) { + $msg = ''; + $msg .= ''.$erro->getMessage().""; + $this->showMessage($msg); + } + } $this->showForm(); } /** + * Executa a configuracao padrão do CACIC + * @access public + */ + function salvarDados() { + $error = true; + $msg = $this->oTranslator->_('Ocorreu erro no processamento...'); + + $this->showMessage(''.$this->oTranslator->_('Aguarde processamento...').""); + + ($error) ? $this->throwError($msg):""; // Lança execeção se ocorrer erro + + $this->showMessage(''.$this->oTranslator->_('Processamento realizado com sucesso').""); + } + + /** * Mostra formulario da configuracao padrao * @access private */ diff --git a/admin/configuracao_padrao_01.tmpl.php b/admin/configuracao_padrao_01.tmpl.php index a01f6b3..012036b 100755 --- a/admin/configuracao_padrao_01.tmpl.php +++ b/admin/configuracao_padrao_01.tmpl.php @@ -38,24 +38,28 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' ); +
- + -
{TITULO} + + {TITULO} +
-
- {DESCRICAO} -
+
+ +
+ {DESCRICAO} - + @@ -88,7 +92,7 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' ); {TE_MACADDR_INVALID_HELP} @@ -97,21 +101,23 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' ); {TE_JANELAS_EXCECAO_HELP} - - +
DiretivaDiretiva Valor
{NM_ORGANIZACAO_TITLE} - +
- +
- +
- - +
+ + +
- -
+ +
+
 SCHEMA 
diff --git a/imgs/btnleft.png b/imgs/btnleft.png
new file mode 100755
index 0000000..b01f06d
Binary files /dev/null and b/imgs/btnleft.png differ
diff --git a/imgs/btnright.png b/imgs/btnright.png
new file mode 100755
index 0000000..425c651
Binary files /dev/null and b/imgs/btnright.png differ
diff --git a/imgs/cacic_logo1.png b/imgs/cacic_logo1.png
deleted file mode 100755
index f41d666..0000000
Binary files a/imgs/cacic_logo1.png and /dev/null differ
diff --git a/imgs/cacic_logo2.png b/imgs/cacic_logo2.png
deleted file mode 100755
index a9efb40..0000000
Binary files a/imgs/cacic_logo2.png and /dev/null differ
diff --git a/imgs/cacic_logo_antes.png b/imgs/cacic_logo_antes.png
deleted file mode 100755
index 840b7b6..0000000
Binary files a/imgs/cacic_logo_antes.png and /dev/null differ
diff --git a/imgs/cacic_para_mer.png b/imgs/cacic_para_mer.png
deleted file mode 100755
index f210938..0000000
Binary files a/imgs/cacic_para_mer.png and /dev/null differ
diff --git a/imgs/carregando.gif b/imgs/carregando.gif
new file mode 100755
index 0000000..529e72f
Binary files /dev/null and b/imgs/carregando.gif differ
diff --git a/imgs/checkagain.png b/imgs/checkagain.png
new file mode 100755
index 0000000..436db08
Binary files /dev/null and b/imgs/checkagain.png differ
diff --git a/imgs/checked.png b/imgs/checked.png
new file mode 100755
index 0000000..2461dac
Binary files /dev/null and b/imgs/checked.png differ
diff --git a/imgs/error.png b/imgs/error.png
new file mode 100755
index 0000000..9691957
Binary files /dev/null and b/imgs/error.png differ
diff --git a/imgs/first.png b/imgs/first.png
new file mode 100755
index 0000000..a162243
Binary files /dev/null and b/imgs/first.png differ
diff --git a/imgs/last.png b/imgs/last.png
new file mode 100755
index 0000000..112ca02
Binary files /dev/null and b/imgs/last.png differ
diff --git a/imgs/logo_cacic_vetorizado.gif b/imgs/logo_cacic_vetorizado.gif
deleted file mode 100755
index 222e92a..0000000
Binary files a/imgs/logo_cacic_vetorizado.gif and /dev/null differ
diff --git a/imgs/next.png b/imgs/next.png
new file mode 100755
index 0000000..43e5d82
Binary files /dev/null and b/imgs/next.png differ
diff --git a/imgs/next_.png b/imgs/next_.png
new file mode 100755
index 0000000..3cb5249
Binary files /dev/null and b/imgs/next_.png differ
diff --git a/imgs/prev.png b/imgs/prev.png
new file mode 100755
index 0000000..8bf36ae
Binary files /dev/null and b/imgs/prev.png differ
diff --git a/imgs/prev_.png b/imgs/prev_.png
new file mode 100755
index 0000000..7dfcd2d
Binary files /dev/null and b/imgs/prev_.png differ
diff --git a/imgs/sign_add.png b/imgs/sign_add.png
new file mode 100755
index 0000000..e948508
Binary files /dev/null and b/imgs/sign_add.png differ
diff --git a/imgs/sign_minus.png b/imgs/sign_minus.png
new file mode 100755
index 0000000..d555d92
Binary files /dev/null and b/imgs/sign_minus.png differ
diff --git a/imgs/warning.png b/imgs/warning.png
new file mode 100755
index 0000000..76ca658
Binary files /dev/null and b/imgs/warning.png differ
diff --git a/include/cacic.css b/include/cacic.css
index 4e16e6d..4ae000d 100755
--- a/include/cacic.css
+++ b/include/cacic.css
@@ -150,22 +150,60 @@ a.dcontexto:hover span
 .frameprincipal {
 	background: url('../imgs/linha_v.gif');
 }
-.frameprincipal table {
+
+.frameprincipal .cabecalho {
+    background-color: #FFFFFF;
+    font-weight: bold;
+    font-size: 17px;
+    color: red;
+    font-family: Verdana, Arial, sans;
+}
+
+.frameprincipal .cabecalho table {
     text-align: justify; 
     color: black; 
-    width: 90%;
+    width: 98%;
     margin-left: auto; 
     margin-right: auto;
     border: 0;
     padding: 0;
-}
+}
+
+.frameprincipal .cabecalho img {
+    //opacity:0.65;
+    //-moz-opacity: 0.65;
+    //filter: alpha(opacity=65);
+    //border: 1px solid #0000ff;
+    margin: 2px;
+    height: 40;
+    width: 40;
+    float: left;
+    text-align: center;
+}
+
+.frameprincipal .descricao {
+    font-weight: normal;
+    font-size: 10px;
+    color: black;
+    font-family: Verdana, Arial, sans;
+}
 
+.frameprincipal .corpo table {
+    text-align: justify; 
+    color: black; 
+    width: 100%;
+    margin-left: auto; 
+    margin-right: auto;
+    border: 0;
+    padding: 0;
+}
+
 .frameprincipal .header {
 	background: #CFCFCD;
     text-align: center;
-    font-size: 12px; 
+    font-size: 12px;
 }
-
+
 .frameprincipal .help {
 	//background: url('../imgs/help.png') no-repeat;
     text-align: center;
@@ -183,37 +221,115 @@ a.dcontexto:hover span
 	width: 16px;
 }
 
-.frameprincipal .odd {
-	background: #CCCCCC;
-}
-
 .frameprincipal .btnForm {
 	background: #CCCCCC;
 }
 
+.frameprincipal input, textarea {
+    text-align: left;
+    vertical-align: top;
+}
+
 .frameprincipal .inputFocus {
 	text-align: left;
-	//vertical-align: top;
-	background-color: yellow;
-}
-
-.frameprincipal .input {
-	text-align: left;
 	vertical-align: top;
+	background-color: yellow;
 }
 
+.frameprincipal .inputError {
+    text-align: left;
+    vertical-align: top;
+    border-color: red red red red;
+}
+
 .frameprincipal .hidden {
 	display: none;
-}
-.frameprincipal .inputError {
-	text-align: left;
-	//vertical-align: top;
-	border-color: red red red red;
-}
+}
 
+.frameprincipal .odd {
+    background: #CCCCCC;
+}
+
 .frameprincipal .even {
 	background: #DBDBDB;
-}
-.frameprincipal .cabecalho {background-color: #FFFFFF; font-weight: bold; font-size: 17px; color: red; font-family: Verdana, Arial, sans;}
-.frameprincipal .descricao {font-weight: normal; font-size: 10px; color: black; font-family: Verdana, Arial, sans;}
+}
+
+.frameprincipal .botoes input {
+    height: 26px;
+    float: right;
+    line-height: 26px;
+    font-size: 10px;
+    font-weight: bold;
+    color: #333;
+    cursor: pointer;
+    vertical-align: top;
+}
+
+.frameprincipal .messages {
+    height: 30px;
+    //line-height: 26px;
+    //font-size: 12px;
+    //font-weight: bold;
+    color: #333;
+    vertical-align: top;
+}
+
+.Sim, .Ok, .Gravavel {
+    padding: 05 26px 0 0px;
+    font-weight: bold;
+    font-size: 12px;
+    color: green;
+}
+
+.SimImg, .OkImg, .GravavelImg {
+    background: url('../imgs/checked.png') 100% 0 no-repeat;
+    padding: 05 26px 10 0px;
+    font-weight: bold;
+    font-size: 12px;
+    color: green;
+}
+
+.Nao, .Erro, .NaoGravavel {
+    padding: 05 22px 10 0px;
+    font-weight: bold;
+    font-size: 12px;
+    color: red;
+}
+
+.NaoImg, .ErroImg, .NaoGravavelImg {
+    background: url('../imgs/error.png') 100% 0 no-repeat;
+    padding: 05 22px 10 0px;
+    font-weight: bold;
+    font-size: 12px;
+    color: red;
+}
+
+.NoJavaScript {
+    font-size: 14px;
+    text-align: center; 
+    background-color: red;
+    color: white;
+}
+
+.Aviso {
+    padding: 05 10px 10 0px;
+    font-weight: bold;
+    font-size: 12px;
+    color: #f6bf01;
+}
+
+.AvisoImg {
+    background: url('../imgs/warning.png') 100% 0 no-repeat;
+    padding: 05 10px 10 0px;
+    font-weight: bold;
+    font-size: 12px;
+    color: #f6bf01;
+}
+
+.necessario {
+    padding: 0px 02px 0px 0px;
+    color: red;
+    font-size: 10px;
+}
+
 
--
libgit2 0.21.2