Commit cdaa655cbc54e8028437cae846255d1b514a2da4
1 parent
f51584e6
Exists in
master
and in
1 other branch
- 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
Showing
25 changed files
with
218 additions
and
40 deletions
Show diff stats
admin/configuracao_common.class.php
@@ -93,10 +93,12 @@ if( ! @include("pat/patTemplate.php") ) | @@ -93,10 +93,12 @@ if( ! @include("pat/patTemplate.php") ) | ||
93 | $this->addVar('CommonSetup_head', 'CACIC_LANG_CHARSET', CACIC_LANG_CHARSET ); | 93 | $this->addVar('CommonSetup_head', 'CACIC_LANG_CHARSET', CACIC_LANG_CHARSET ); |
94 | $this->addVar('CommonSetup_head', 'CACIC_THEME', CACIC_THEME ); | 94 | $this->addVar('CommonSetup_head', 'CACIC_THEME', CACIC_THEME ); |
95 | $this->addVar('CommonSetup_head', 'CACIC_URL', CACIC_URL ); | 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 | * Armazena na "sessao" os dados de configuração comuns | 100 | * Armazena na "sessao" os dados de configuração comuns |
101 | + * @access protected | ||
100 | */ | 102 | */ |
101 | function setup() { | 103 | function setup() { |
102 | global $configuracao; | 104 | global $configuracao; |
@@ -105,11 +107,29 @@ if( ! @include("pat/patTemplate.php") ) | @@ -105,11 +107,29 @@ if( ! @include("pat/patTemplate.php") ) | ||
105 | 107 | ||
106 | /** | 108 | /** |
107 | * Atribui o tipo de configuração a ser processada | 109 | * Atribui o tipo de configuração a ser processada |
110 | + * @access protected | ||
108 | */ | 111 | */ |
109 | function setSetupType($type) { | 112 | function setSetupType($type) { |
110 | $this->setup_type = $type; | 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 | \ No newline at end of file | 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,7 +46,17 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' ); | ||
46 | </cfgCommon:tmpl> | 46 | </cfgCommon:tmpl> |
47 | 47 | ||
48 | <cfgCommon:tmpl name="CommonSetup_messages"> | 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 | </cfgCommon:tmpl> | 60 | </cfgCommon:tmpl> |
51 | 61 | ||
52 | <cfgCommon:tmpl name="CommonSetup_foot"> | 62 | <cfgCommon:tmpl name="CommonSetup_foot"> |
admin/configuracao_padrao.class.php
@@ -63,6 +63,7 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' ); | @@ -63,6 +63,7 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' ); | ||
63 | $this->addVar('StandardSetup_form', 'TE_JANELAS_EXCECAO_TITLE', $this->oTranslator->_('Aplicativos (janelas) a evitar') ); | 63 | $this->addVar('StandardSetup_form', 'TE_JANELAS_EXCECAO_TITLE', $this->oTranslator->_('Aplicativos (janelas) a evitar') ); |
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') ); | 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 | $this->addVar('StandardSetup_form', 'BTN_SALVAR', $this->oTranslator->_('Gravar alteracoes') ); | 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( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' ); | @@ -83,10 +84,35 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' ); | ||
83 | $this->clearVar('StandardSetup_form', 'SET_FOCUS'); | 84 | $this->clearVar('StandardSetup_form', 'SET_FOCUS'); |
84 | $this->addVar('StandardSetup_form', 'SET_FOCUS', 'nm_organizacao' ); | 85 | $this->addVar('StandardSetup_form', 'SET_FOCUS', 'nm_organizacao' ); |
85 | $btn_salvar = Security::read('btn_salvar'); | 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 | $this->showForm(); | 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 | * Mostra formulario da configuracao padrao | 116 | * Mostra formulario da configuracao padrao |
91 | * @access private | 117 | * @access private |
92 | */ | 118 | */ |
admin/configuracao_padrao_01.tmpl.php
@@ -38,24 +38,28 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' ); | @@ -38,24 +38,28 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' ); | ||
38 | </cfgPadrao:tmpl> | 38 | </cfgPadrao:tmpl> |
39 | 39 | ||
40 | <cfgPadrao:tmpl name="StandardSetup_form"> | 40 | <cfgPadrao:tmpl name="StandardSetup_form"> |
41 | +<div class="cabecalho"> | ||
41 | <table> | 42 | <table> |
42 | <tr> | 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 | </tr> | 48 | </tr> |
45 | <tr> | 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 | <table> | 54 | <table> |
51 | <tr class="header"> | 55 | <tr class="header"> |
52 | - <th>Diretiva</th> | 56 | + <th width="37%">Diretiva</th> |
53 | <th>Valor</th> | 57 | <th>Valor</th> |
54 | </tr> | 58 | </tr> |
55 | <tr class="even"> | 59 | <tr class="even"> |
56 | <td>{NM_ORGANIZACAO_TITLE}</td> | 60 | <td>{NM_ORGANIZACAO_TITLE}</td> |
57 | <td> | 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 | </td> | 63 | </td> |
60 | </tr> | 64 | </tr> |
61 | <tr class="odd"> | 65 | <tr class="odd"> |
@@ -88,7 +92,7 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' ); | @@ -88,7 +92,7 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' ); | ||
88 | <span class="help">{TE_MACADDR_INVALID_HELP}</span> | 92 | <span class="help">{TE_MACADDR_INVALID_HELP}</span> |
89 | </td> | 93 | </td> |
90 | <td> | 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 | </td> | 96 | </td> |
93 | </tr> | 97 | </tr> |
94 | <tr class="even"> | 98 | <tr class="even"> |
@@ -97,21 +101,23 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' ); | @@ -97,21 +101,23 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' ); | ||
97 | <span class="help">{TE_JANELAS_EXCECAO_HELP}</span> | 101 | <span class="help">{TE_JANELAS_EXCECAO_HELP}</span> |
98 | </td> | 102 | </td> |
99 | <td> | 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 | </td> | 105 | </td> |
102 | </tr> | 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 | </td> | 112 | </td> |
108 | </tr> | 113 | </tr> |
109 | </table> | 114 | </table> |
110 | - </form> | ||
111 | - </fieldset> | 115 | + </fieldset> |
116 | + </form> | ||
112 | </td> | 117 | </td> |
113 | </tr> | 118 | </tr> |
114 | </table> | 119 | </table> |
120 | +</div> | ||
115 | <cfgPadrao:comment> | 121 | <cfgPadrao:comment> |
116 | <pre> | 122 | <pre> |
117 | SCHEMA | 123 | SCHEMA |
407 Bytes
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
1.51 KB
599 Bytes
630 Bytes
883 Bytes
835 Bytes
838 Bytes
imgs/logo_cacic_vetorizado.gif
9.58 KB
558 Bytes
482 Bytes
564 Bytes
478 Bytes
1.06 KB
625 Bytes
701 Bytes
include/cacic.css
@@ -150,22 +150,60 @@ a.dcontexto:hover span | @@ -150,22 +150,60 @@ a.dcontexto:hover span | ||
150 | .frameprincipal { | 150 | .frameprincipal { |
151 | background: url('../imgs/linha_v.gif'); | 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 | text-align: justify; | 163 | text-align: justify; |
155 | color: black; | 164 | color: black; |
156 | - width: 90%; | 165 | + width: 98%; |
157 | margin-left: auto; | 166 | margin-left: auto; |
158 | margin-right: auto; | 167 | margin-right: auto; |
159 | border: 0; | 168 | border: 0; |
160 | padding: 0; | 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 | .frameprincipal .header { | 201 | .frameprincipal .header { |
164 | background: #CFCFCD; | 202 | background: #CFCFCD; |
165 | text-align: center; | 203 | text-align: center; |
166 | - font-size: 12px; | 204 | + font-size: 12px; |
167 | } | 205 | } |
168 | - | 206 | + |
169 | .frameprincipal .help { | 207 | .frameprincipal .help { |
170 | //background: url('../imgs/help.png') no-repeat; | 208 | //background: url('../imgs/help.png') no-repeat; |
171 | text-align: center; | 209 | text-align: center; |
@@ -183,37 +221,115 @@ a.dcontexto:hover span | @@ -183,37 +221,115 @@ a.dcontexto:hover span | ||
183 | width: 16px; | 221 | width: 16px; |
184 | } | 222 | } |
185 | 223 | ||
186 | -.frameprincipal .odd { | ||
187 | - background: #CCCCCC; | ||
188 | -} | ||
189 | - | ||
190 | .frameprincipal .btnForm { | 224 | .frameprincipal .btnForm { |
191 | background: #CCCCCC; | 225 | background: #CCCCCC; |
192 | } | 226 | } |
193 | 227 | ||
228 | +.frameprincipal input, textarea { | ||
229 | + text-align: left; | ||
230 | + vertical-align: top; | ||
231 | +} | ||
232 | + | ||
194 | .frameprincipal .inputFocus { | 233 | .frameprincipal .inputFocus { |
195 | text-align: left; | 234 | text-align: left; |
196 | - //vertical-align: top; | ||
197 | - background-color: yellow; | ||
198 | -} | ||
199 | - | ||
200 | -.frameprincipal .input { | ||
201 | - text-align: left; | ||
202 | vertical-align: top; | 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 | .frameprincipal .hidden { | 245 | .frameprincipal .hidden { |
206 | display: none; | 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 | .frameprincipal .even { | 253 | .frameprincipal .even { |
215 | background: #DBDBDB; | 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 | </style> | 335 | </style> |