Commit 981808cd02c7f3b6f40572ba632c70f3485b8c15
1 parent
d2238285
Exists in
master
and in
7 other branches
Correção nos formulários de edição de parâmetros inseridos em mapfiles (ferramen…
…tas tme, storymap,animagif)
Showing
5 changed files
with
77 additions
and
71 deletions
Show diff stats
ferramentas/animagif/index.js
| ... | ... | @@ -272,6 +272,9 @@ i3GEOF.animagif = |
| 272 | 272 | |
| 273 | 273 | }, |
| 274 | 274 | salvaParametros: function(){ |
| 275 | + if(i3GEOF.animagif.aguarde.visibility == "visible"){ | |
| 276 | + return; | |
| 277 | + } | |
| 275 | 278 | //monta a string JSON que sera enviada para gravacao |
| 276 | 279 | var j, auto = "nao", exec = "nao"; |
| 277 | 280 | if($i("ativaAoAdic").checked === true){ |
| ... | ... | @@ -309,38 +312,34 @@ i3GEOF.animagif = |
| 309 | 312 | + exec |
| 310 | 313 | + '"}'; |
| 311 | 314 | |
| 312 | - i3GEO.janela.confirma($trad("incluiPar", i3GEOF.animagif.dicionario), 300, $trad("x14"), | |
| 313 | - "", function() { | |
| 315 | + | |
| 314 | 316 | p = i3GEO.configura.locaplic + "/ferramentas/animagif/manutencao.php"; |
| 315 | 317 | par = "&g_sid=" + i3GEO.configura.sid |
| 316 | 318 | + "&tema=" + i3GEOF.animagif.tema |
| 317 | 319 | + "&animagif=" + j |
| 318 | 320 | + "&funcao=inclui"; |
| 319 | 321 | |
| 320 | - retorno = | |
| 321 | - function(retorno) { | |
| 322 | - i3GEO.janela.fechaAguarde("animagif"); | |
| 322 | + retorno = function(retorno) { | |
| 323 | + i3GEOF.animagif.aguarde.visibility = "hidden"; | |
| 323 | 324 | }; |
| 324 | - i3GEO.janela.abreAguarde("animagif", $trad("o1")); | |
| 325 | + i3GEOF.animagif.aguarde.visibility = "visible"; | |
| 325 | 326 | cpJSON.call(p, "foo", retorno, par); |
| 326 | - }); | |
| 327 | 327 | |
| 328 | 328 | }, |
| 329 | 329 | removeParametros: function(){ |
| 330 | - i3GEO.janela.confirma($trad("removePar", i3GEOF.animagif.dicionario), 300, $trad("x14"), | |
| 331 | - "", function() { | |
| 332 | - p = i3GEO.configura.locaplic + "/ferramentas/animagif/manutencao.php"; | |
| 333 | - par = "&g_sid=" + i3GEO.configura.sid | |
| 334 | - + "&tema=" + i3GEOF.animagif.tema | |
| 335 | - + "&funcao=remove"; | |
| 330 | + if(i3GEOF.animagif.aguarde.visibility == "visible"){ | |
| 331 | + return; | |
| 332 | + } | |
| 333 | + p = i3GEO.configura.locaplic + "/ferramentas/animagif/manutencao.php"; | |
| 334 | + par = "&g_sid=" + i3GEO.configura.sid | |
| 335 | + + "&tema=" + i3GEOF.animagif.tema | |
| 336 | + + "&funcao=remove"; | |
| 336 | 337 | |
| 337 | - retorno = | |
| 338 | - function(retorno) { | |
| 339 | - i3GEO.janela.fechaAguarde("animagif"); | |
| 340 | - }; | |
| 341 | - i3GEO.janela.abreAguarde("animagif", $trad("o1")); | |
| 342 | - cpJSON.call(p, "foo", retorno, par); | |
| 343 | - }); | |
| 338 | + retorno = function(retorno) { | |
| 339 | + i3GEOF.animagif.aguarde.visibility = "hidden"; | |
| 340 | + }; | |
| 341 | + i3GEOF.animagif.aguarde.visibility = "visible"; | |
| 342 | + cpJSON.call(p, "foo", retorno, par); | |
| 344 | 343 | }, |
| 345 | 344 | /* |
| 346 | 345 | * Function: ativa | ... | ... |
ferramentas/animagif/manutencao.php
| ... | ... | @@ -20,22 +20,24 @@ $retorno = ""; //string que será retornada ao browser via JSON |
| 20 | 20 | switch (strtoupper($funcao)) |
| 21 | 21 | { |
| 22 | 22 | case "REMOVE": |
| 23 | + $retorno = "erro"; | |
| 23 | 24 | $mapa = ms_newMapObj($map_file); |
| 24 | 25 | $l = $mapa->getlayerbyname($tema); |
| 25 | 26 | if($l != ""){ |
| 26 | - $l->setmetadata("tme",""); | |
| 27 | + $l->setmetadata("animagif",""); | |
| 27 | 28 | $mapa->save($map_file); |
| 29 | + $retorno = "ok"; | |
| 28 | 30 | } |
| 29 | - $retorno = "ok"; | |
| 30 | 31 | break; |
| 31 | 32 | case "INCLUI": |
| 33 | + $retorno = "erro"; | |
| 32 | 34 | $mapa = ms_newMapObj($map_file); |
| 33 | 35 | $l = $mapa->getlayerbyname($tema); |
| 34 | 36 | if($l != ""){ |
| 35 | 37 | $l->setmetadata("animagif",str_replace("\\","'",$_POST["animagif"])); |
| 36 | 38 | $mapa->save($map_file); |
| 39 | + $retorno = "ok"; | |
| 37 | 40 | } |
| 38 | - $retorno = "ok"; | |
| 39 | 41 | break; |
| 40 | 42 | } |
| 41 | 43 | cpjson($retorno); | ... | ... |
ferramentas/storymap/index.js
| ... | ... | @@ -250,6 +250,9 @@ i3GEOF.storymap = |
| 250 | 250 | YAHOO.util.Event.addListener(janela[0].close, "click", temp); |
| 251 | 251 | }, |
| 252 | 252 | salvaParametros : function() { |
| 253 | + if(i3GEOF.storymap.aguarde.visibility == "visible"){ | |
| 254 | + return; | |
| 255 | + } | |
| 253 | 256 | var j; |
| 254 | 257 | j = |
| 255 | 258 | '{"cabecalho":"' + $i("i3GEOStocabecalho").value |
| ... | ... | @@ -269,7 +272,6 @@ i3GEOF.storymap = |
| 269 | 272 | + $i("i3GEOstocollatCombo").value |
| 270 | 273 | + '"}'; |
| 271 | 274 | |
| 272 | - i3GEO.janela.confirma($trad("incluiPar", i3GEOF.storymap.dicionario), 300, $trad("x14"), "", function() { | |
| 273 | 275 | p = i3GEO.configura.locaplic + "/ferramentas/storymap/manutencao.php"; |
| 274 | 276 | par = |
| 275 | 277 | "&g_sid=" + i3GEO.configura.sid |
| ... | ... | @@ -280,23 +282,23 @@ i3GEOF.storymap = |
| 280 | 282 | + "&funcao=inclui"; |
| 281 | 283 | |
| 282 | 284 | retorno = function(retorno) { |
| 283 | - i3GEO.janela.fechaAguarde("storymap"); | |
| 285 | + i3GEOF.storymap.aguarde.visibility = "hidden"; | |
| 284 | 286 | }; |
| 285 | - i3GEO.janela.abreAguarde("storymap", $trad("o1")); | |
| 287 | + i3GEOF.storymap.aguarde.visibility = "visible"; | |
| 286 | 288 | cpJSON.call(p, "foo", retorno, par); |
| 287 | - }); | |
| 288 | 289 | |
| 289 | 290 | }, |
| 290 | 291 | removeParametros : function() { |
| 291 | - i3GEO.janela.confirma($trad("removePar", i3GEOF.storymap.dicionario), 300, $trad("x14"), "", function() { | |
| 292 | - p = i3GEO.configura.locaplic + "/ferramentas/storymap/manutencao.php"; | |
| 292 | + if(i3GEOF.storymap.aguarde.visibility == "visible"){ | |
| 293 | + return; | |
| 294 | + } | |
| 295 | + p = i3GEO.configura.locaplic + "/ferramentas/storymap/manutencao.php"; | |
| 293 | 296 | par = "&g_sid=" + i3GEO.configura.sid + "&tema=" + i3GEOF.storymap.tema + "&funcao=remove"; |
| 294 | 297 | |
| 295 | 298 | retorno = function(retorno) { |
| 296 | - i3GEO.janela.fechaAguarde("storymap"); | |
| 299 | + i3GEOF.storymap.aguarde.visibility = "hidden"; | |
| 297 | 300 | }; |
| 298 | - i3GEO.janela.abreAguarde("storymap", $trad("o1")); | |
| 301 | + i3GEOF.storymap.aguarde.visibility = "visible"; | |
| 299 | 302 | cpJSON.call(p, "foo", retorno, par); |
| 300 | - }); | |
| 301 | 303 | } |
| 302 | 304 | }; |
| 303 | 305 | \ No newline at end of file | ... | ... |
ferramentas/tme/index.js
| ... | ... | @@ -288,6 +288,9 @@ i3GEOF.tme = |
| 288 | 288 | ativaFoco : function() { |
| 289 | 289 | }, |
| 290 | 290 | salvaParametros: function(){ |
| 291 | + if(i3GEOF.tme.aguarde.visibility == "visible"){ | |
| 292 | + return; | |
| 293 | + } | |
| 291 | 294 | //monta a string JSON que sera enviada para gravacao |
| 292 | 295 | //'{"titulo":"População","colnome":"CNTRY_NAME","colsdata":["POP_CNTRY"],"lmax":"100000","amax":"2000000","auto":"sim","exec":"sim"}' |
| 293 | 296 | var j, colsdata = i3GEOF.tme.pegaItensMarcados(), auto = "nao", exec = "nao"; |
| ... | ... | @@ -318,38 +321,35 @@ i3GEOF.tme = |
| 318 | 321 | + exec |
| 319 | 322 | + '"}'; |
| 320 | 323 | |
| 321 | - i3GEO.janela.confirma($trad("incluiPar", i3GEOF.tme.dicionario), 300, $trad("x14"), | |
| 322 | - "", function() { | |
| 323 | - p = i3GEO.configura.locaplic + "/ferramentas/tme/manutencao.php"; | |
| 324 | - par = "&g_sid=" + i3GEO.configura.sid | |
| 325 | - + "&tema=" + i3GEOF.tme.tema | |
| 326 | - + "&tme=" + i3GEO.util.base64encode(j) | |
| 327 | - + "&funcao=incluitme"; | |
| 324 | + p = i3GEO.configura.locaplic + "/ferramentas/tme/manutencao.php"; | |
| 325 | + par = "&g_sid=" + i3GEO.configura.sid | |
| 326 | + + "&tema=" + i3GEOF.tme.tema | |
| 327 | + + "&tme=" + i3GEO.util.base64encode(j) | |
| 328 | + + "&funcao=incluitme"; | |
| 328 | 329 | |
| 329 | - retorno = | |
| 330 | - function(retorno) { | |
| 331 | - i3GEO.janela.fechaAguarde("tme"); | |
| 332 | - }; | |
| 333 | - i3GEO.janela.abreAguarde("tme", $trad("o1")); | |
| 334 | - cpJSON.call(p, "foo", retorno, par); | |
| 335 | - }); | |
| 330 | + retorno = | |
| 331 | + function(retorno) { | |
| 332 | + i3GEOF.tme.aguarde.visibility = "hidden"; | |
| 333 | + }; | |
| 334 | + i3GEOF.tme.aguarde.visibility = "visible"; | |
| 335 | + cpJSON.call(p, "foo", retorno, par); | |
| 336 | 336 | |
| 337 | 337 | }, |
| 338 | 338 | removeParametros: function(){ |
| 339 | - i3GEO.janela.confirma($trad("removePar", i3GEOF.tme.dicionario), 300, $trad("x14"), | |
| 340 | - "", function() { | |
| 341 | - p = i3GEO.configura.locaplic + "/ferramentas/tme/manutencao.php"; | |
| 342 | - par = "&g_sid=" + i3GEO.configura.sid | |
| 343 | - + "&tema=" + i3GEOF.tme.tema | |
| 344 | - + "&funcao=removetme"; | |
| 339 | + if(i3GEOF.tme.aguarde.visibility == "visible"){ | |
| 340 | + return; | |
| 341 | + } | |
| 342 | + p = i3GEO.configura.locaplic + "/ferramentas/tme/manutencao.php"; | |
| 343 | + par = "&g_sid=" + i3GEO.configura.sid | |
| 344 | + + "&tema=" + i3GEOF.tme.tema | |
| 345 | + + "&funcao=removetme"; | |
| 345 | 346 | |
| 346 | - retorno = | |
| 347 | - function(retorno) { | |
| 348 | - i3GEO.janela.fechaAguarde("tme"); | |
| 349 | - }; | |
| 350 | - i3GEO.janela.abreAguarde("tme", $trad("o1")); | |
| 351 | - cpJSON.call(p, "foo", retorno, par); | |
| 352 | - }); | |
| 347 | + retorno = | |
| 348 | + function(retorno) { | |
| 349 | + i3GEOF.tme.aguarde.visibility = "hidden"; | |
| 350 | + }; | |
| 351 | + i3GEOF.tme.aguarde.visibility = "visible"; | |
| 352 | + cpJSON.call(p, "foo", retorno, par); | |
| 353 | 353 | }, |
| 354 | 354 | /* |
| 355 | 355 | * Function: montaListaItens | ... | ... |
temas/_lbiomashp.map
| ... | ... | @@ -5,39 +5,42 @@ MAP |
| 5 | 5 | CONNECTION "" |
| 6 | 6 | DATA "/var/www/i3geo/aplicmap/dados/biomas.shp" |
| 7 | 7 | METADATA |
| 8 | - "cache" "sim" | |
| 9 | 8 | "TIP" "CD_LEGENDA" |
| 10 | - "olopacity" "" | |
| 9 | + "cache" "sim" | |
| 11 | 10 | "CLASSE" "SIM" |
| 11 | + "olopacity" "" | |
| 12 | + "animagif" "" | |
| 12 | 13 | "permitekmz" "SIM" |
| 13 | 14 | "gmopacity" "" |
| 14 | 15 | "gmstatus" "" |
| 15 | 16 | "ITENSDESC" "Teste de acentuação" |
| 16 | - "editavel" "" | |
| 17 | - "ESCALA" "250000" | |
| 18 | 17 | "TILES" "SIM" |
| 18 | + "ESCALA" "250000" | |
| 19 | + "editavel" "" | |
| 19 | 20 | "arquivotemaoriginal" "" |
| 20 | 21 | "extensao" "-73.990940816816 -33.74827031115 -34.822855820777 5.272224303909" |
| 21 | - "olstatus" "" | |
| 22 | 22 | "nomeoriginal" "" |
| 23 | + "olstatus" "" | |
| 23 | 24 | "permitedownload" "SIM" |
| 24 | - "permitecomentario" "NAO" | |
| 25 | 25 | "FILTROORIGINAL" "" |
| 26 | - "escondido" "NAO" | |
| 26 | + "permitecomentario" "NAO" | |
| 27 | 27 | "DATAORIGINAL" "" |
| 28 | - "esquematabelaeditavel" "" | |
| 28 | + "escondido" "NAO" | |
| 29 | 29 | "download" "SIM" |
| 30 | + "esquematabelaeditavel" "" | |
| 30 | 31 | "itembuscarapida" "CD_LEGENDA" |
| 31 | 32 | "ITENS" "CD_LEGENDA" |
| 32 | - "transitioneffect" "NAO" | |
| 33 | - "permiteogc" "SIM" | |
| 33 | + "tme" "" | |
| 34 | 34 | "permitekml" "SIM" |
| 35 | - "TEMA" "Biomas shapefile (acentuação)" | |
| 35 | + "permiteogc" "SIM" | |
| 36 | + "transitioneffect" "NAO" | |
| 36 | 37 | "convcaracter" "SIM" |
| 37 | - "colunageometria" "" | |
| 38 | + "TEMA" "Biomas shapefile (acentuação)" | |
| 38 | 39 | "colunaidunico" "" |
| 40 | + "colunageometria" "" | |
| 39 | 41 | "identifica" "sim" |
| 40 | 42 | "tabelaeditavel" "" |
| 43 | + "storymap" "" | |
| 41 | 44 | END # METADATA |
| 42 | 45 | NAME "_lbiomashp" |
| 43 | 46 | PROCESSING "ITEMS=CD_LEGENDA" | ... | ... |