Commit 3563bb080a0759b54f69306c1ca9bfff674ea605
1 parent
6a0a44ad
Exists in
master
and in
7 other branches
Correção na adição de WMS no buscador CSW
Showing
2 changed files
with
23 additions
and
20 deletions
Show diff stats
ferramentas/conectarwms/index.js
@@ -170,22 +170,18 @@ Veja: | @@ -170,22 +170,18 @@ Veja: | ||
170 | */ | 170 | */ |
171 | function clickGuia3(codLayer) | 171 | function clickGuia3(codLayer) |
172 | { | 172 | { |
173 | - var listatemas = function(retorno) | ||
174 | - { | 173 | + var listatemas = function(retorno){ |
175 | g_idws = ""; | 174 | g_idws = ""; |
176 | aguarde("none"); | 175 | aguarde("none"); |
177 | - if ((retorno.data != "erro") && (retorno.data != undefined)) | ||
178 | - { | 176 | + if ((retorno.data != "erro") && (retorno.data != undefined)){ |
179 | $i("listatemas").innerHTML = retorno.data; | 177 | $i("listatemas").innerHTML = retorno.data; |
180 | g_tipo = ""; //tipo de tema | 178 | g_tipo = ""; //tipo de tema |
181 | g_tema = ""; //tema selecionado do ws | 179 | g_tema = ""; //tema selecionado do ws |
182 | g_legenda = ""; //legenda do tema | 180 | g_legenda = ""; //legenda do tema |
183 | g_nometema = ""; //nome do tema | 181 | g_nometema = ""; //nome do tema |
184 | g_sld = ""; | 182 | g_sld = ""; |
185 | - if ($i("suportasld")) | ||
186 | - { | ||
187 | - if ($i("suportasld").value != "nao") | ||
188 | - { | 183 | + if ($i("suportasld")){ |
184 | + if ($i("suportasld").value != "nao") { | ||
189 | if ($i("textoSLD")) | 185 | if ($i("textoSLD")) |
190 | $i("textoSLD").style.display = "block"; | 186 | $i("textoSLD").style.display = "block"; |
191 | } | 187 | } |
@@ -193,10 +189,13 @@ function clickGuia3(codLayer) | @@ -193,10 +189,13 @@ function clickGuia3(codLayer) | ||
193 | //ativa um layer caso tenha sido enviado como um parametro no inicio da ferramenta | 189 | //ativa um layer caso tenha sido enviado como um parametro no inicio da ferramenta |
194 | ativaAutoLayer(codLayer); | 190 | ativaAutoLayer(codLayer); |
195 | } | 191 | } |
196 | - else | ||
197 | - {$i("listatemas").innerHTML = "erro";} | 192 | + else{ |
193 | + $i("listatemas").innerHTML = "erro"; | ||
194 | + } | ||
195 | + //TODO remover essa funcao em prol de classesjs/classe_guias | ||
196 | + mostraGuia("guia3"); | ||
198 | }; | 197 | }; |
199 | - mostraGuia("guia3"); | 198 | + |
200 | if ($i("servico").value == ""){ | 199 | if ($i("servico").value == ""){ |
201 | i3GEO.janela.tempoMsg($trad('servico',i3GEOF.conectarwms.dicionario)); | 200 | i3GEO.janela.tempoMsg($trad('servico',i3GEOF.conectarwms.dicionario)); |
202 | } | 201 | } |
@@ -213,14 +212,17 @@ function clickGuia3(codLayer) | @@ -213,14 +212,17 @@ function clickGuia3(codLayer) | ||
213 | } | 212 | } |
214 | function ativaAutoLayer(codLayer){ | 213 | function ativaAutoLayer(codLayer){ |
215 | if(codLayer && codLayer != ""){ | 214 | if(codLayer && codLayer != ""){ |
216 | - var container = $i("listatemas"), | ||
217 | - rs = container.getElementsByTagName("input"), | ||
218 | - nrs = re.lenght, | ||
219 | - i,r; | ||
220 | - for(i = 0; i < nrs; i++){ | ||
221 | - r = rs[i]; | ||
222 | - if(r.type === "radio" && r.name === codLayer){ | ||
223 | - r.onclick.call(); | 215 | + var container, rs, nrs, i, r; |
216 | + container = $i("listatemas"); | ||
217 | + if(container){ | ||
218 | + rs = container.getElementsByTagName("input"); | ||
219 | + nrs = rs.length; | ||
220 | + | ||
221 | + for(i = 0; i < nrs; i++){ | ||
222 | + r = rs[i]; | ||
223 | + if(r.type === "radio" && r.value === codLayer){ | ||
224 | + r.onclick.call(); | ||
225 | + } | ||
224 | } | 226 | } |
225 | } | 227 | } |
226 | } | 228 | } |
ferramentas/conectarwms/listalayers.php
1 | -<?php | 1 | +<?php |
2 | /** | 2 | /** |
3 | * Este programa e utilizado pela ferramenta buscainde | 3 | * Este programa e utilizado pela ferramenta buscainde |
4 | * E uma copia da ferramenta conctarwms sem mostrar as guias de esolha de servico | 4 | * E uma copia da ferramenta conctarwms sem mostrar as guias de esolha de servico |
@@ -53,6 +53,7 @@ p{ | @@ -53,6 +53,7 @@ p{ | ||
53 | <input type=hidden id=servico value="<?php echo $_GET["servico"];?>" /> | 53 | <input type=hidden id=servico value="<?php echo $_GET["servico"];?>" /> |
54 | 54 | ||
55 | <script src="../i3geo_tudo_compacto.js.php" type="text/javascript"></script> | 55 | <script src="../i3geo_tudo_compacto.js.php" type="text/javascript"></script> |
56 | + | ||
56 | <script type="text/javascript" src="index.js"></script> | 57 | <script type="text/javascript" src="index.js"></script> |
57 | 58 | ||
58 | <script type="text/javascript" > | 59 | <script type="text/javascript" > |