Commit 04a4e81321635c5dece63bc85889fb6979c815a6
1 parent
0e632b47
Exists in
master
and in
7 other branches
Correção na definição do título da camada no plugin parametrossql
Showing
2 changed files
with
6 additions
and
2 deletions
Show diff stats
ferramentas/parametrossql/exec.php
... | ... | @@ -57,6 +57,7 @@ switch (strtoupper($funcao)) |
57 | 57 | */ |
58 | 58 | case "APLICAR": |
59 | 59 | $valores = $_GET["valores"]; |
60 | + $titulos = $_GET["titulos"]; | |
60 | 61 | $map = ms_newMapObj($map_file); |
61 | 62 | //pega o layer |
62 | 63 | $layer = $map->getlayerbyname($tema); |
... | ... | @@ -100,7 +101,7 @@ switch (strtoupper($funcao)) |
100 | 101 | } |
101 | 102 | $layer->set("status",MS_DEFAULT); |
102 | 103 | $layer->setmetadata("PLUGINI3GEO",'{"plugin":"parametrossql","ativo":"sim"}'); |
103 | - $layer->setmetadata("TEMA",$layer1->getmetadata("TEMA")." - ".implode(",",$valores)); | |
104 | + $layer->setmetadata("TEMA",$layer1->getmetadata("TEMA")." - ".$titulos); | |
104 | 105 | //$layer->set("name","plugin".nomeRandomico()); |
105 | 106 | $layer->setmetadata("nomeoriginal",$layer1->name); |
106 | 107 | if (connection_aborted()){ | ... | ... |
ferramentas/parametrossql/index.js
... | ... | @@ -309,18 +309,20 @@ i3GEOF.parametrossql = { |
309 | 309 | }, |
310 | 310 | aplicar: function(camada){ |
311 | 311 | var temp, fim,cp,p,onde = $i("i3GEOFparametrosSQLForm"), |
312 | - campos,n,i,chaves = [], valores = []; | |
312 | + campos,n,i,chaves = [], valores = [], titulos = []; | |
313 | 313 | campos = onde.getElementsByTagName("input"); |
314 | 314 | n = campos.length; |
315 | 315 | for (i = 0; i<n; i++) { |
316 | 316 | chaves.push(campos[i].name); |
317 | 317 | valores.push(campos[i].value); |
318 | + titulos.push(campos[i].options[campos[i].selectedIndex].text); | |
318 | 319 | } |
319 | 320 | campos = onde.getElementsByTagName("select"); |
320 | 321 | n = campos.length; |
321 | 322 | for (i = 0; i<n; i++) { |
322 | 323 | chaves.push(campos[i].name); |
323 | 324 | valores.push(campos[i].value); |
325 | + titulos.push(campos[i].options[campos[i].selectedIndex].text); | |
324 | 326 | } |
325 | 327 | //verifica os objetos pois essa funcao pode ter sido chamada do mashup |
326 | 328 | if(typeof i3geoOL != 'undefined' || typeof i3GeoMap != 'undefined'){ |
... | ... | @@ -333,6 +335,7 @@ i3GEOF.parametrossql = { |
333 | 335 | + "&funcao=aplicar" |
334 | 336 | + "&tema=" + camada |
335 | 337 | + "&chaves=" + chaves.join(",") |
338 | + + "&titulos=" + titulos.join(",") | |
336 | 339 | + "&valores=" + valores.join(","); |
337 | 340 | cp = new cpaint(); |
338 | 341 | cp.set_response_type("JSON"); | ... | ... |