Commit e43cf6c9f4f3985070792793141b802f054163b3
1 parent
86278010
Exists in
master
and in
7 other branches
Retirada a listagem de mapas salvos e metaestat da página que lista os serviços ogc
Showing
2 changed files
with
65 additions
and
56 deletions
Show diff stats
ogc/index.js
@@ -104,64 +104,67 @@ function listaCamadasSubgrupo(idmenu,id_n1,id_n2){ | @@ -104,64 +104,67 @@ function listaCamadasSubgrupo(idmenu,id_n1,id_n2){ | ||
104 | i3GEO.php.pegalistadetemas(r, idmenu, id_n1, id_n2); | 104 | i3GEO.php.pegalistadetemas(r, idmenu, id_n1, id_n2); |
105 | } | 105 | } |
106 | function listaMetaestat (onde,templateCamadas){ | 106 | function listaMetaestat (onde,templateCamadas){ |
107 | - var r, p; | ||
108 | - r = function(d){ | ||
109 | - var html = "", n, camadas = [], i, t; | ||
110 | - n = d.length; | ||
111 | - if(n > 0){ | ||
112 | - for(i=0; i<n; i++){ | ||
113 | - t = d[i]; | ||
114 | - camadas.push({ | ||
115 | - "nome": t.nomemedida, | ||
116 | - "hidden": "", | ||
117 | - "codigo_tema": t.id_medida_variavel | ||
118 | - }); | 107 | + if(onde.html()){ |
108 | + var r, p; | ||
109 | + r = function(d){ | ||
110 | + var html = "", n, camadas = [], i, t; | ||
111 | + n = d.length; | ||
112 | + if(n > 0){ | ||
113 | + for(i=0; i<n; i++){ | ||
114 | + t = d[i]; | ||
115 | + camadas.push({ | ||
116 | + "nome": t.nomemedida, | ||
117 | + "hidden": "", | ||
118 | + "codigo_tema": t.id_medida_variavel | ||
119 | + }); | ||
120 | + } | ||
121 | + html = Mustache.to_html( | ||
122 | + onde.html(), | ||
123 | + { | ||
124 | + "nomemeta":$trad("nomemeta",g_traducao_ogc), | ||
125 | + "camadasmeta": ckCamada(camadas,templateCamadas,"meta"), | ||
126 | + "hidden": "hidden" | ||
127 | + } | ||
128 | + ); | ||
119 | } | 129 | } |
120 | - html = Mustache.to_html( | ||
121 | - onde.html(), | ||
122 | - { | ||
123 | - "nomemeta":$trad("nomemeta",g_traducao_ogc), | ||
124 | - "camadasmeta": ckCamada(camadas,templateCamadas,"meta"), | ||
125 | - "hidden": "hidden" | ||
126 | - } | ||
127 | - ); | ||
128 | - } | ||
129 | - onde.html(html); | ||
130 | - }; | ||
131 | - //cpJSON vem de class_php.js | ||
132 | - cpJSON.call("../admin/php/metaestat.php?funcao=listaMedidaVariavel&codigo_variavel=&g_sid=", "foo", r); | 130 | + onde.html(html); |
131 | + }; | ||
132 | + //cpJSON vem de class_php.js | ||
133 | + cpJSON.call("../admin/php/metaestat.php?funcao=listaMedidaVariavel&codigo_variavel=&g_sid=", "foo", r); | ||
134 | + } | ||
133 | } | 135 | } |
134 | function listaMapasSalvos(onde,templateCamadas){ | 136 | function listaMapasSalvos(onde,templateCamadas){ |
135 | - var r, p; | ||
136 | - r = function(d){ | ||
137 | - d = d.data.mapas; | ||
138 | - var html = "", n, camadas = [], i, t; | ||
139 | - n = d.length; | ||
140 | - if(n > 0){ | ||
141 | - for(i=0; i<n; i++){ | ||
142 | - t = d[i]; | ||
143 | - camadas.push({ | ||
144 | - "nome": t.NOME, | ||
145 | - "hidden": "", | ||
146 | - "codigo_tema": t.ID_MAPA, | ||
147 | - "download": "nao" | ||
148 | - }); | ||
149 | - } | ||
150 | - | ||
151 | - html = Mustache.to_html( | ||
152 | - onde.html(), | ||
153 | - { | ||
154 | - "nomeMapasSalvos":$trad("nomeMapasSalvos",g_traducao_ogc), | ||
155 | - "mapasSalvos": ckCamada(camadas,templateCamadas,"mapa"), | ||
156 | - "hidden": "hidden" | ||
157 | - } | ||
158 | - ); | ||
159 | - } | ||
160 | - onde.html(html); | ||
161 | - }; | ||
162 | - //cpJSON vem de class_php.js | ||
163 | - cpJSON.call("../classesphp/mapa_controle.php?map_file=&funcao=pegaMapas&g_sid=", "foo", r); | 137 | + if(onde.html()){ |
138 | + var r, p; | ||
139 | + r = function(d){ | ||
140 | + d = d.data.mapas; | ||
141 | + var html = "", n, camadas = [], i, t; | ||
142 | + n = d.length; | ||
143 | + if(n > 0){ | ||
144 | + for(i=0; i<n; i++){ | ||
145 | + t = d[i]; | ||
146 | + camadas.push({ | ||
147 | + "nome": t.NOME, | ||
148 | + "hidden": "", | ||
149 | + "codigo_tema": t.ID_MAPA, | ||
150 | + "download": "nao" | ||
151 | + }); | ||
152 | + } | ||
164 | 153 | ||
154 | + html = Mustache.to_html( | ||
155 | + onde.html(), | ||
156 | + { | ||
157 | + "nomeMapasSalvos":$trad("nomeMapasSalvos",g_traducao_ogc), | ||
158 | + "mapasSalvos": ckCamada(camadas,templateCamadas,"mapa"), | ||
159 | + "hidden": "hidden" | ||
160 | + } | ||
161 | + ); | ||
162 | + } | ||
163 | + onde.html(html); | ||
164 | + }; | ||
165 | + //cpJSON vem de class_php.js | ||
166 | + cpJSON.call("../classesphp/mapa_controle.php?map_file=&funcao=pegaMapas&g_sid=", "foo", r); | ||
167 | + } | ||
165 | } | 168 | } |
166 | function ckCamada(camadas,templateCamadas,tipo){ | 169 | function ckCamada(camadas,templateCamadas,tipo){ |
167 | var ncamadas = [], | 170 | var ncamadas = [], |
@@ -308,7 +311,12 @@ function listaCompleta(onde){ | @@ -308,7 +311,12 @@ function listaCompleta(onde){ | ||
308 | } | 311 | } |
309 | html = ckCamada(camadas,$("#templateCamadas").html(),"tema"); | 312 | html = ckCamada(camadas,$("#templateCamadas").html(),"tema"); |
310 | } | 313 | } |
311 | - onde.html(html + $("#corpoMetaestat").html()); | 314 | + if($("#corpoMetaestat").html()){ |
315 | + onde.html(html + $("#corpoMetaestat").html()); | ||
316 | + } | ||
317 | + else{ | ||
318 | + onde.html(html); | ||
319 | + } | ||
312 | }; | 320 | }; |
313 | //cpJSON vem de class_php.js | 321 | //cpJSON vem de class_php.js |
314 | cpJSON.call("../classesphp/mapa_controle.php?map_file=&funcao=pegaTodosTemas&g_sid=&idioma=pt", "foo", r); | 322 | cpJSON.call("../classesphp/mapa_controle.php?map_file=&funcao=pegaTodosTemas&g_sid=&idioma=pt", "foo", r); |
ogc/index.php
@@ -188,7 +188,7 @@ include "../init/head.php"; | @@ -188,7 +188,7 @@ include "../init/head.php"; | ||
188 | </div> | 188 | </div> |
189 | </div> | 189 | </div> |
190 | </div> | 190 | </div> |
191 | - <!-- Camadas oriundas do sistema de metadados estatisticos --> | 191 | + <!-- Camadas oriundas do sistema de metadados estatisticos e mapas salvos |
192 | <div class="row center-block escondido hidden"> | 192 | <div class="row center-block escondido hidden"> |
193 | <div class="col-sm-6" id="metaestat"> | 193 | <div class="col-sm-6" id="metaestat"> |
194 | <div class="panel-group" role="tablist" aria-multiselectable="true"> | 194 | <div class="panel-group" role="tablist" aria-multiselectable="true"> |
@@ -227,6 +227,7 @@ include "../init/head.php"; | @@ -227,6 +227,7 @@ include "../init/head.php"; | ||
227 | </div> | 227 | </div> |
228 | </div> | 228 | </div> |
229 | </div> | 229 | </div> |
230 | + --> | ||
230 | <div class="row center-block"> | 231 | <div class="row center-block"> |
231 | <div class="col-sm-12" id="arvore"> | 232 | <div class="col-sm-12" id="arvore"> |
232 | <i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span> | 233 | <i class="fa fa-spinner fa-pulse fa-2x fa-fw"></i><span class="sr-only">Aguarde</span> |