Commit cdaa655cbc54e8028437cae846255d1b514a2da4

Authored by Adriano Vieira
1 parent f51584e6
Exists in master and in 1 other branch 3.1

- Acrescentadas classes no cacic.css

- melhorias no programa para manutenção da tabela "configuracao_padrao" e das demais configurações do sistema

git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/gerente@525 fecfc0c7-e812-0410-ae72-849f08638ee7
admin/configuracao_common.class.php
... ... @@ -93,10 +93,12 @@ if( ! @include("pat/patTemplate.php") )
93 93 $this->addVar('CommonSetup_head', 'CACIC_LANG_CHARSET', CACIC_LANG_CHARSET );
94 94 $this->addVar('CommonSetup_head', 'CACIC_THEME', CACIC_THEME );
95 95 $this->addVar('CommonSetup_head', 'CACIC_URL', CACIC_URL );
  96 + $this->addVar('CommonSetup_messages', 'MESSAGES', $this->oTranslator->_('Mensagens') );
96 97 }
97 98  
98 99 /**
99 100 * Armazena na "sessao" os dados de configuração comuns
  101 + * @access protected
100 102 */
101 103 function setup() {
102 104 global $configuracao;
... ... @@ -105,11 +107,29 @@ if( ! @include("pat/patTemplate.php") )
105 107  
106 108 /**
107 109 * Atribui o tipo de configuração a ser processada
  110 + * @access protected
108 111 */
109 112 function setSetupType($type) {
110 113 $this->setup_type = $type;
111 114 }
112 115  
  116 + /**
  117 + * Atribui o tipo de configuração a ser processada
  118 + * @access protected
  119 + */
  120 + function showMessage($msg) {
  121 + $this->clearVar('CommonSetup_messages', 'MESSAGE');
  122 + $this->addVar('CommonSetup_messages', 'MESSAGE', $msg );
  123 + }
  124 +
  125 + /**
  126 + * Lança execeção se ocorrer erro
  127 + * @access protected
  128 + */
  129 + function throwError($msg) {
  130 + throw new Exception($msg);
  131 + }
  132 +
113 133 }
114 134  
115 135 ?>
116 136 \ No newline at end of file
... ...
admin/configuracao_common_01.tmpl.php
... ... @@ -46,7 +46,17 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' );
46 46 </cfgCommon:tmpl>
47 47  
48 48 <cfgCommon:tmpl name="CommonSetup_messages">
49   -<span id='message' class="message"></span>
  49 +<div class="cabecalho">
  50 +<table>
  51 + <tr>
  52 + <td>
  53 + <fieldset class="messages">
  54 + <legend>{MESSAGES}</legend>
  55 + <span id='message' class="message">{MESSAGE}</span>
  56 + </fieldset>
  57 + </td>
  58 + </tr>
  59 +</table>
50 60 </cfgCommon:tmpl>
51 61  
52 62 <cfgCommon:tmpl name="CommonSetup_foot">
... ...
admin/configuracao_padrao.class.php
... ... @@ -63,6 +63,7 @@ defined( &#39;CACIC&#39; ) or die( &#39;Acesso restrito (Restricted access)!&#39; );
63 63 $this->addVar('StandardSetup_form', 'TE_JANELAS_EXCECAO_TITLE', $this->oTranslator->_('Aplicativos (janelas) a evitar') );
64 64 $this->addVar('StandardSetup_form', 'TE_JANELAS_EXCECAO_HELP', $this->oTranslator->_('Evita que o Gerente de Coletas seja acionado enquanto tais aplicativos (janelas) estiverem ativos') );
65 65 $this->addVar('StandardSetup_form', 'BTN_SALVAR', $this->oTranslator->_('Gravar alteracoes') );
  66 + $this->addVar('StandardSetup_form', 'BTN_RESET', $this->oTranslator->_('Restaurar valores') );
66 67 }
67 68  
68 69 /**
... ... @@ -83,10 +84,35 @@ defined( &#39;CACIC&#39; ) or die( &#39;Acesso restrito (Restricted access)!&#39; );
83 84 $this->clearVar('StandardSetup_form', 'SET_FOCUS');
84 85 $this->addVar('StandardSetup_form', 'SET_FOCUS', 'nm_organizacao' );
85 86 $btn_salvar = Security::read('btn_salvar');
  87 + if(isset($btn_salvar) and ($btn_salvar)) {
  88 + try {
  89 + $this->salvarDados();
  90 + }
  91 + catch( Exception $erro ) {
  92 + $msg = '<span class="ErroImg"></span>';
  93 + $msg .= '<span class="Erro">'.$erro->getMessage()."</span>";
  94 + $this->showMessage($msg);
  95 + }
  96 + }
86 97 $this->showForm();
87 98 }
88 99  
89 100 /**
  101 + * Executa a configuracao padrão do CACIC
  102 + * @access public
  103 + */
  104 + function salvarDados() {
  105 + $error = true;
  106 + $msg = $this->oTranslator->_('Ocorreu erro no processamento...');
  107 +
  108 + $this->showMessage('<span class="OK">'.$this->oTranslator->_('Aguarde processamento...')."</span>");
  109 +
  110 + ($error) ? $this->throwError($msg):""; // Lança execeção se ocorrer erro
  111 +
  112 + $this->showMessage('<span class="OKImg">'.$this->oTranslator->_('Processamento realizado com sucesso')."</span>");
  113 + }
  114 +
  115 + /**
90 116 * Mostra formulario da configuracao padrao
91 117 * @access private
92 118 */
... ...
admin/configuracao_padrao_01.tmpl.php
... ... @@ -38,24 +38,28 @@ defined( &#39;CACIC&#39; ) or die( &#39;Acesso restrito (Restricted access)!&#39; );
38 38 </cfgPadrao:tmpl>
39 39  
40 40 <cfgPadrao:tmpl name="StandardSetup_form">
  41 +<div class="cabecalho">
41 42 <table>
42 43 <tr>
43   - <td class="cabecalho">{TITULO}</td>
  44 + <td class="cabecalho">
  45 + <cfgPadrao:comment><img src="../imgs/cacic_logo.png" /></cfgPadrao:comment>
  46 + {TITULO}
  47 + </td>
44 48 </tr>
45 49 <tr>
46   - <td class="descricao">
47   - <fieldset>
48   - <legend>{DESCRICAO}</legend>
49   - <form id="StandardSetup_form" method="post">
  50 + <td>
  51 + <form id="StandardSetup_form" name="StandardSetup_form" method="post">
  52 + <fieldset class="corpo">
  53 + <legend>{DESCRICAO}</legend>
50 54 <table>
51 55 <tr class="header">
52   - <th>Diretiva</th>
  56 + <th width="37%">Diretiva</th>
53 57 <th>Valor</th>
54 58 </tr>
55 59 <tr class="even">
56 60 <td>{NM_ORGANIZACAO_TITLE}</td>
57 61 <td>
58   - <input {OU_ENABLED} type="text" id="nm_organizacao" name="nm_organizacao" onFocus="setClass(this, 'inputFocus');" onBlur="setClass(this, 'input');" size="70" maxlength="150" value="{NM_ORGANIZACAO}" />
  62 + <input {OU_ENABLED} type="text" id="nm_organizacao" name="nm_organizacao" onFocus="setClass(this, 'inputFocus');" onBlur="setClass(this, 'input');" size="55" maxlength="150" value="{NM_ORGANIZACAO}" />
59 63 </td>
60 64 </tr>
61 65 <tr class="odd">
... ... @@ -88,7 +92,7 @@ defined( &#39;CACIC&#39; ) or die( &#39;Acesso restrito (Restricted access)!&#39; );
88 92 <span class="help">{TE_MACADDR_INVALID_HELP}</span>
89 93 </td>
90 94 <td>
91   - <textarea {TE_MACADDR_INVALID_ENABLED} id="te_enderecos_mac_invalidos" name="te_enderecos_mac_invalidos" onFocus="setClass(this, 'inputFocus');" onBlur="setClass(this, 'input');" rows="3" cols="70" wrap="off">{TE_MACADDR_INVALID}</textarea>
  95 + <textarea {TE_MACADDR_INVALID_ENABLED} id="te_enderecos_mac_invalidos" name="te_enderecos_mac_invalidos" onFocus="setClass(this, 'inputFocus');" onBlur="setClass(this, 'input');" rows="3" cols="65" wrap="off">{TE_MACADDR_INVALID}</textarea>
92 96 </td>
93 97 </tr>
94 98 <tr class="even">
... ... @@ -97,21 +101,23 @@ defined( &#39;CACIC&#39; ) or die( &#39;Acesso restrito (Restricted access)!&#39; );
97 101 <span class="help">{TE_JANELAS_EXCECAO_HELP}</span>
98 102 </td>
99 103 <td>
100   - <textarea {TE_JANELAS_EXCECAO_ENABLED} id="te_janelas_excecao" name="te_janelas_excecao" onFocus="setClass(this, 'inputFocus');" onBlur="setClass(this, 'input');" rows="3" cols="70" wrap="off">{TE_JANELAS_EXCECAO}</textarea>
  104 + <textarea {TE_JANELAS_EXCECAO_ENABLED} id="te_janelas_excecao" name="te_janelas_excecao" onFocus="setClass(this, 'inputFocus');" onBlur="setClass(this, 'input');" rows="3" cols="65" wrap="off">{TE_JANELAS_EXCECAO}</textarea>
101 105 </td>
102 106 </tr>
103   - <tr class="btnForm">
104   - <td colspan="2">
105   - <input {EXIBE_ERROS_CRITICOS_ENABLED} type="submit" id="salvar" name="salvar" value="{BTN_SALVAR}" onClick="setDocVar( 'btn_salvar', 1 );" />
106   - <input type="hidden" id="btn_salvar" name="btn_salvar" value="" />
  107 + <tr>
  108 + <td colspan="2" class="botoes">
  109 + <input type="hidden" id="btn_salvar" name="btn_salvar" value="" />
  110 + <input type='button' title="{BTN_SALVAR}" name="{BTN_SALVAR}" onClick="setDocVar( 'btn_salvar', 1 ); sendForm(this.form);" value="{BTN_SALVAR}" />
  111 + <input type='reset' onClick="setFocus('nm_organizacao');" title="{BTN_RESET}" value="{BTN_RESET}" />
107 112 </td>
108 113 </tr>
109 114 </table>
110   - </form>
111   - </fieldset>
  115 + </fieldset>
  116 + </form>
112 117 </td>
113 118 </tr>
114 119 </table>
  120 +</div>
115 121 <cfgPadrao:comment>
116 122 <pre>
117 123 SCHEMA
... ...
imgs/btnleft.png 0 → 100755

407 Bytes

imgs/btnright.png 0 → 100755

448 Bytes

imgs/cacic_logo1.png

2.48 KB

imgs/cacic_logo2.png

4.6 KB

imgs/cacic_logo_antes.png

3.92 KB

imgs/cacic_para_mer.png

2.48 KB

imgs/carregando.gif 0 → 100755

1.51 KB

imgs/checkagain.png 0 → 100755

599 Bytes

imgs/checked.png 0 → 100755

630 Bytes

imgs/error.png 0 → 100755

883 Bytes

imgs/first.png 0 → 100755

835 Bytes

imgs/last.png 0 → 100755

838 Bytes

imgs/logo_cacic_vetorizado.gif

9.58 KB

imgs/next.png 0 → 100755

558 Bytes

imgs/next_.png 0 → 100755

482 Bytes

imgs/prev.png 0 → 100755

564 Bytes

imgs/prev_.png 0 → 100755

478 Bytes

imgs/sign_add.png 0 → 100755

1.06 KB

imgs/sign_minus.png 0 → 100755

625 Bytes

imgs/warning.png 0 → 100755

701 Bytes

include/cacic.css
... ... @@ -150,22 +150,60 @@ a.dcontexto:hover span
150 150 .frameprincipal {
151 151 background: url('../imgs/linha_v.gif');
152 152 }
153   -.frameprincipal table {
  153 +
  154 +.frameprincipal .cabecalho {
  155 + background-color: #FFFFFF;
  156 + font-weight: bold;
  157 + font-size: 17px;
  158 + color: red;
  159 + font-family: Verdana, Arial, sans;
  160 +}
  161 +
  162 +.frameprincipal .cabecalho table {
154 163 text-align: justify;
155 164 color: black;
156   - width: 90%;
  165 + width: 98%;
157 166 margin-left: auto;
158 167 margin-right: auto;
159 168 border: 0;
160 169 padding: 0;
161   -}
  170 +}
  171 +
  172 +.frameprincipal .cabecalho img {
  173 + //opacity:0.65;
  174 + //-moz-opacity: 0.65;
  175 + //filter: alpha(opacity=65);
  176 + //border: 1px solid #0000ff;
  177 + margin: 2px;
  178 + height: 40;
  179 + width: 40;
  180 + float: left;
  181 + text-align: center;
  182 +}
  183 +
  184 +.frameprincipal .descricao {
  185 + font-weight: normal;
  186 + font-size: 10px;
  187 + color: black;
  188 + font-family: Verdana, Arial, sans;
  189 +}
162 190  
  191 +.frameprincipal .corpo table {
  192 + text-align: justify;
  193 + color: black;
  194 + width: 100%;
  195 + margin-left: auto;
  196 + margin-right: auto;
  197 + border: 0;
  198 + padding: 0;
  199 +}
  200 +
163 201 .frameprincipal .header {
164 202 background: #CFCFCD;
165 203 text-align: center;
166   - font-size: 12px;
  204 + font-size: 12px;
167 205 }
168   -
  206 +
169 207 .frameprincipal .help {
170 208 //background: url('../imgs/help.png') no-repeat;
171 209 text-align: center;
... ... @@ -183,37 +221,115 @@ a.dcontexto:hover span
183 221 width: 16px;
184 222 }
185 223  
186   -.frameprincipal .odd {
187   - background: #CCCCCC;
188   -}
189   -
190 224 .frameprincipal .btnForm {
191 225 background: #CCCCCC;
192 226 }
193 227  
  228 +.frameprincipal input, textarea {
  229 + text-align: left;
  230 + vertical-align: top;
  231 +}
  232 +
194 233 .frameprincipal .inputFocus {
195 234 text-align: left;
196   - //vertical-align: top;
197   - background-color: yellow;
198   -}
199   -
200   -.frameprincipal .input {
201   - text-align: left;
202 235 vertical-align: top;
  236 + background-color: yellow;
203 237 }
204 238  
  239 +.frameprincipal .inputError {
  240 + text-align: left;
  241 + vertical-align: top;
  242 + border-color: red red red red;
  243 +}
  244 +
205 245 .frameprincipal .hidden {
206 246 display: none;
207   -}
208   -.frameprincipal .inputError {
209   - text-align: left;
210   - //vertical-align: top;
211   - border-color: red red red red;
212   -}
  247 +}
213 248  
  249 +.frameprincipal .odd {
  250 + background: #CCCCCC;
  251 +}
  252 +
214 253 .frameprincipal .even {
215 254 background: #DBDBDB;
216   -}
217   -.frameprincipal .cabecalho {background-color: #FFFFFF; font-weight: bold; font-size: 17px; color: red; font-family: Verdana, Arial, sans;}
218   -.frameprincipal .descricao {font-weight: normal; font-size: 10px; color: black; font-family: Verdana, Arial, sans;}
  255 +}
  256 +
  257 +.frameprincipal .botoes input {
  258 + height: 26px;
  259 + float: right;
  260 + line-height: 26px;
  261 + font-size: 10px;
  262 + font-weight: bold;
  263 + color: #333;
  264 + cursor: pointer;
  265 + vertical-align: top;
  266 +}
  267 +
  268 +.frameprincipal .messages {
  269 + height: 30px;
  270 + //line-height: 26px;
  271 + //font-size: 12px;
  272 + //font-weight: bold;
  273 + color: #333;
  274 + vertical-align: top;
  275 +}
  276 +
  277 +.Sim, .Ok, .Gravavel {
  278 + padding: 05 26px 0 0px;
  279 + font-weight: bold;
  280 + font-size: 12px;
  281 + color: green;
  282 +}
  283 +
  284 +.SimImg, .OkImg, .GravavelImg {
  285 + background: url('../imgs/checked.png') 100% 0 no-repeat;
  286 + padding: 05 26px 10 0px;
  287 + font-weight: bold;
  288 + font-size: 12px;
  289 + color: green;
  290 +}
  291 +
  292 +.Nao, .Erro, .NaoGravavel {
  293 + padding: 05 22px 10 0px;
  294 + font-weight: bold;
  295 + font-size: 12px;
  296 + color: red;
  297 +}
  298 +
  299 +.NaoImg, .ErroImg, .NaoGravavelImg {
  300 + background: url('../imgs/error.png') 100% 0 no-repeat;
  301 + padding: 05 22px 10 0px;
  302 + font-weight: bold;
  303 + font-size: 12px;
  304 + color: red;
  305 +}
  306 +
  307 +.NoJavaScript {
  308 + font-size: 14px;
  309 + text-align: center;
  310 + background-color: red;
  311 + color: white;
  312 +}
  313 +
  314 +.Aviso {
  315 + padding: 05 10px 10 0px;
  316 + font-weight: bold;
  317 + font-size: 12px;
  318 + color: #f6bf01;
  319 +}
  320 +
  321 +.AvisoImg {
  322 + background: url('../imgs/warning.png') 100% 0 no-repeat;
  323 + padding: 05 10px 10 0px;
  324 + font-weight: bold;
  325 + font-size: 12px;
  326 + color: #f6bf01;
  327 +}
  328 +
  329 +.necessario {
  330 + padding: 0px 02px 0px 0px;
  331 + color: red;
  332 + font-size: 10px;
  333 +}
  334 +
219 335 </style>
... ...