Commit 088a0ba198960dd43e29e7b1271ab2af5d0bb2a8
1 parent
c2dea8ae
Exists in
master
and in
7 other branches
--no commit message
Showing
7 changed files
with
124 additions
and
7 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/php/classe_metaestat.php
... | ... | @@ -710,7 +710,7 @@ class Metaestat{ |
710 | 710 | try { |
711 | 711 | if($id_parametro_medida != ""){ |
712 | 712 | if($this->convUTF){ |
713 | - $nomeparametro = utf8_encode($nomeparametro); | |
713 | + $nome = utf8_encode($nome); | |
714 | 714 | $descricao = utf8_encode($descricao); |
715 | 715 | } |
716 | 716 | //echo "UPDATE ".$this->esquemaadmin."i3geoestat_parametro_medida SET nomeparametro = '$nomeparametro',descricao = '$descricao',coluna = '$coluna',agregavalores = '$agregavalores' WHERE id_parametro_medida = $id_parametro_medida";exit; |
... | ... | @@ -1073,9 +1073,15 @@ class Metaestat{ |
1073 | 1073 | $this->dbh = $dbhold; |
1074 | 1074 | return $res; |
1075 | 1075 | } |
1076 | - function relatorioCompleto(){ | |
1076 | + function relatorioCompleto($codigo_variavel=""){ | |
1077 | 1077 | $dados = array(); |
1078 | - $vs = $this->listaVariavel(); | |
1078 | + | |
1079 | + if($codigo_variavel != "" || !empty($codigo_variavel)){ | |
1080 | + $vs[] = $this->listaVariavel($codigo_variavel);; | |
1081 | + } | |
1082 | + else{ | |
1083 | + $vs = $this->listaVariavel(); | |
1084 | + } | |
1079 | 1085 | foreach($vs as $v){ |
1080 | 1086 | $nivel1["id"] = $v["codigo_variavel"]; |
1081 | 1087 | $nivel1["titulo"] = $v["nome"]; |
... | ... | @@ -1093,7 +1099,6 @@ class Metaestat{ |
1093 | 1099 | $nivel2["descricao"] = $unidade.", ".$periodo.", ".$regiao; |
1094 | 1100 | $nivel2["fontes"] = $this->listaFonteinfoMedida($m["id_medida_variavel"]); |
1095 | 1101 | $nivel2["links"] = $this->listaLinkMedida($m["id_medida_variavel"]); |
1096 | - | |
1097 | 1102 | $nivel1["filho"] = $nivel2; |
1098 | 1103 | } |
1099 | 1104 | $dados[] = $nivel1; | ... | ... |
admin/php/metaestat.php
... | ... | @@ -937,7 +937,10 @@ switch (strtoupper($funcao)) |
937 | 937 | break; |
938 | 938 | case "RELATORIOCOMPLETO": |
939 | 939 | $m = new Metaestat(); |
940 | - $dados = $m->relatorioCompleto(); | |
940 | + if(empty($codigo_variavel)){ | |
941 | + $codigo_variavel = ""; | |
942 | + } | |
943 | + $dados = $m->relatorioCompleto($codigo_variavel); | |
941 | 944 | $dados = $m->formataRelatorioHtml($dados); |
942 | 945 | retornaJSON($dados); |
943 | 946 | exit; | ... | ... |
classesjs/classe_cartograma.js
... | ... | @@ -54,13 +54,57 @@ i3GEO.cartograma = { |
54 | 54 | aguarde: function(obj){ |
55 | 55 | obj.innerHTML = "<img id='"+obj.id+"_imagem' style='z-index:2' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />"; |
56 | 56 | }, |
57 | + maisInfo: function(){ | |
58 | + var temp = "", | |
59 | + v = $i("i3geoCartoComboVariavel"); | |
60 | + if(!v || v.value === ""){ | |
61 | + alert($trad("x61")); | |
62 | + } | |
63 | + else{ | |
64 | + temp = function(retorno){ | |
65 | + var cabecalho,minimiza,janela; | |
66 | + if (!$i("i3geoCartoMaisInfo")){ | |
67 | + cabecalho = function(){ | |
68 | + }; | |
69 | + minimiza = function(){ | |
70 | + i3GEO.janela.minimiza("i3geoCartoMaisInfo"); | |
71 | + }; | |
72 | + janela = i3GEO.janela.cria( | |
73 | + "400px", | |
74 | + "300px", | |
75 | + "", | |
76 | + "", | |
77 | + "", | |
78 | + $trad("x62"), | |
79 | + "i3geoCartoMaisInfo", | |
80 | + false, | |
81 | + "hd", | |
82 | + cabecalho, | |
83 | + minimiza | |
84 | + ); | |
85 | + janela = janela[0]; | |
86 | + YAHOO.i3GEO.janela.manager.register(janela); | |
87 | + janela.render(); | |
88 | + //YAHOO.util.Event.addListener(janela.close, "click", i3GEO.cartograma.fechaJanelaParametros); | |
89 | + } | |
90 | + else{ | |
91 | + janela = YAHOO.i3GEO.janela.manager.find("i3geoCartoMaisInfo"); | |
92 | + } | |
93 | + janela.setBody(retorno); | |
94 | + janela.show(); | |
95 | + //imagemxy = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO)); | |
96 | + //janela.moveTo(imagemxy[0]+i3GEO.cartograma.LEFT,imagemxy[1]+i3GEO.cartograma.TOP); | |
97 | + }; | |
98 | + i3GEO.php.relatorioVariavel(v.value,temp); | |
99 | + } | |
100 | + }, | |
57 | 101 | comboVariaveis: function(){ |
58 | 102 | var onde = $i("i3geoCartoVariaveis"), |
59 | 103 | temp = function(dados){ |
60 | 104 | var n = dados.length, |
61 | - ins = '<p class="paragrafo" >'+$trad("x58")+'</p>', | |
105 | + ins = '<p onclick="i3GEO.cartograma.maisInfo()" class="paragrafo" style="cursor:pointer;color:blue">'+$trad("x60")+'</p><p class="paragrafo" >'+$trad("x58")+'</p>', | |
62 | 106 | i; |
63 | - ins += "<select style='width:"+(i3GEO.cartograma.LARGURA - 20)+"px' onchange='i3GEO.cartograma.comboVariaveisOnchange(this)'><option value=''>---</option>"; | |
107 | + ins += "<select id='i3geoCartoComboVariavel' style='box-shadow:0 1px 5px gray;width:"+(i3GEO.cartograma.LARGURA - 20)+"px' onchange='i3GEO.cartograma.comboVariaveisOnchange(this)'><option value=''>---</option>"; | |
64 | 108 | for(i=0;i<n;i++){ |
65 | 109 | ins += "<option title='"+dados[i].descricao+"' value='"+dados[i].codigo_variavel+"'>"+dados[i].nome+"</option>"; |
66 | 110 | } | ... | ... |
classesjs/classe_php.js
... | ... | @@ -1455,5 +1455,14 @@ i3GEO.php = { |
1455 | 1455 | listaValoresParametroMedidaVariavel: function(id_parametro_medida,funcao){ |
1456 | 1456 | var p = i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=listaValoresParametro&id_parametro_medida="+id_parametro_medida+"&g_sid="+i3GEO.configura.sid; |
1457 | 1457 | i3GEO.util.ajaxGet(p,funcao); |
1458 | + }, | |
1459 | + /* | |
1460 | + Function: relatorioVariavel | |
1461 | + | |
1462 | + Relatorio descritivo de uma variável do sistema de metadados estatísticos | |
1463 | + */ | |
1464 | + relatorioVariavel: function(codigo_variavel,funcao){ | |
1465 | + var p = i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=relatorioCompleto&codigo_variavel="+codigo_variavel+"&g_sid="+i3GEO.configura.sid; | |
1466 | + i3GEO.util.ajaxGet(p,funcao); | |
1458 | 1467 | } |
1459 | 1468 | }; |
1460 | 1469 | \ No newline at end of file | ... | ... |
classesjs/dicionario.js
... | ... | @@ -1950,6 +1950,27 @@ it:"" |
1950 | 1950 | }], |
1951 | 1951 | "x60":[ |
1952 | 1952 | { |
1953 | +pt:"Mais informações sobre a variável escolhida", | |
1954 | +en:"", | |
1955 | +es:"", | |
1956 | +it:"" | |
1957 | +}], | |
1958 | +"x61":[ | |
1959 | +{ | |
1960 | +pt:"Escolha uma variavel", | |
1961 | +en:"", | |
1962 | +es:"", | |
1963 | +it:"" | |
1964 | +}], | |
1965 | +"x62":[ | |
1966 | +{ | |
1967 | +pt:"Relatório", | |
1968 | +en:"", | |
1969 | +es:"", | |
1970 | +it:"" | |
1971 | +}], | |
1972 | +"x63":[ | |
1973 | +{ | |
1953 | 1974 | pt:"", |
1954 | 1975 | en:"", |
1955 | 1976 | es:"", | ... | ... |
interface/carto_ol.htm
... | ... | @@ -16,6 +16,41 @@ |
16 | 16 | width:29px; |
17 | 17 | cursor:pointer; |
18 | 18 | } |
19 | +.var_div_relatorio h1{ | |
20 | + font-size: 16px; | |
21 | + text-align:left; | |
22 | +} | |
23 | +.var_div_relatorio h2{ | |
24 | + font-size: 14px; | |
25 | + text-align:left; | |
26 | +} | |
27 | +.var_div_relatorio p{ | |
28 | + font-size:12px; | |
29 | + line-height:15px; | |
30 | + margin-bottom:9px; | |
31 | + text-align:left; | |
32 | +} | |
33 | +.var_div_relatorio i{ | |
34 | + font-size:12px; | |
35 | + line-height:15px; | |
36 | + margin-bottom:9px; | |
37 | + text-align:left; | |
38 | + background-color: white; | |
39 | +} | |
40 | +.var_cor1 { | |
41 | + background-color: rgb(250,250,250); | |
42 | + width: 95%; | |
43 | + padding: 5px; | |
44 | +} | |
45 | +.var_cor2 { | |
46 | + background-color: rgb(220,220,220); | |
47 | + width: 95%; | |
48 | + padding: 5px; | |
49 | +} | |
50 | +#i3geoCartoParametros_corpo select { | |
51 | + box-shadow:0 1px 5px gray; | |
52 | + height: 20px; | |
53 | +} | |
19 | 54 | </style> |
20 | 55 | </head> |
21 | 56 | <body id="i3geo" style="background-color:white"> | ... | ... |