Commit 8cecc7bc8a8c442e8d5973d50f2e78c39cb24e61
1 parent
fb49bc24
Exists in
master
and in
7 other branches
--no commit message
Showing
8 changed files
with
115 additions
and
69 deletions
Show diff stats
classesjs/classe_arvoredecamadas.js
| ... | ... | @@ -567,8 +567,9 @@ i3GEO.arvoreDeCamadas = { |
| 567 | 567 | d = this.EXPANDIDA; |
| 568 | 568 | if(grupoLayers[i].expandido && grupoLayers[i].expandido === true) |
| 569 | 569 | {d = true;} |
| 570 | - grupoNode = new YAHOO.widget.HTMLNode({enableHighlight:false,html:temp,expanded:d}, tempNode); | |
| 571 | 570 | n = grupoLayers[i].layers.length; |
| 571 | + if(n > 0) | |
| 572 | + {grupoNode = new YAHOO.widget.HTMLNode({enableHighlight:false,html:temp,expanded:d}, tempNode);} | |
| 572 | 573 | //layers de um grupo |
| 573 | 574 | for(j=0;j<n; j += 1){ |
| 574 | 575 | //busca na lista de temas | ... | ... |
classesjs/classe_configura.js
| ... | ... | @@ -180,7 +180,9 @@ i3GEO.configura = { |
| 180 | 180 | ], |
| 181 | 181 | "ferramentas": [ |
| 182 | 182 | { id:"omenudataFerramentas1",text: '<span style=color:gray;text-decoration:underline; ><b>'+$trad("a7")+'</b></span>',url: "#"}, |
| 183 | - { id:"omenudataFerramentas2",text: $trad("t31"), url: "javascript:i3GEO.tema.dialogo.tabela()"} | |
| 183 | + { id:"omenudataFerramentas2",text: $trad("t31"), url: "javascript:i3GEO.tema.dialogo.tabela()"}, | |
| 184 | + { id:"omenudataFerramentas3",text: $trad("t23"), url: "javascript:i3GEO.tema.dialogo.procuraratrib()"}, | |
| 185 | + { id:"omenudataFerramentas4",text: $trad("t25"), url: "javascript:i3GEO.tema.dialogo.toponimia()"} | |
| 184 | 186 | ] |
| 185 | 187 | } |
| 186 | 188 | }, | ... | ... |
classesjs/classe_janela.js
| ... | ... | @@ -763,7 +763,65 @@ i3GEO.janela = { |
| 763 | 763 | if(typeof(console) !== 'undefined'){console.error(e);} |
| 764 | 764 | } |
| 765 | 765 | } |
| 766 | - } | |
| 766 | + }, | |
| 767 | + /* | |
| 768 | + Function: comboCabecalhoTemas | |
| 769 | + | |
| 770 | + Adiciona no cabeçalho da janela um combo com a lista de temas para janelas abertas por ferramentas | |
| 771 | + | |
| 772 | + Essa função é utilizada pelas ferramentas que operam sobre um determinado tema. O combo permite que o usuário | |
| 773 | + selecione um tema e ative a ferramenta para funcionar com esse tema | |
| 774 | + | |
| 775 | + Parametros: | |
| 776 | + | |
| 777 | + idDiv {string} - id do elemento HTML que receberá o combo | |
| 778 | + | |
| 779 | + idCombo {string} - id do combo que será criado | |
| 780 | + | |
| 781 | + ferramenta {string} - nome da ferramenta (namespace da classe, por exemplo "tabela" para a classe i3GEOF.tabela | |
| 782 | + | |
| 783 | + tipo {string} - tipo de combo | |
| 784 | + */ | |
| 785 | + comboCabecalhoTemas: function(idDiv,idCombo,ferramenta,tipo){ | |
| 786 | + var temp = $i(idDiv); | |
| 787 | + if(temp){ | |
| 788 | + temp.innerHTML = ""; | |
| 789 | + i3GEO.util.comboTemas( | |
| 790 | + temp.id+"Sel", | |
| 791 | + function(retorno){ | |
| 792 | + $i(idDiv).innerHTML = retorno.dados; | |
| 793 | + var c = $i(idCombo); | |
| 794 | + c.style.width = "150px"; | |
| 795 | + c.style.border = "solid #B4B4B4 1px"; | |
| 796 | + c.style.top = "1px"; | |
| 797 | + c.style.position = "relative"; | |
| 798 | + c.style.fontSize = "10px"; | |
| 799 | + c.style.color = "#B4B4B4"; | |
| 800 | + c.value = i3GEOF[ferramenta].tema; | |
| 801 | + if(c.value === ""){ | |
| 802 | + i3GEOF[ferramenta].tema = ""; | |
| 803 | + $i("i3GEOF."+ferramenta+"_corpo").innerHTML = ""; | |
| 804 | + } | |
| 805 | + c.onchange = function(){ | |
| 806 | + var valor = $i(idCombo).value; | |
| 807 | + if(valor !== ""){ | |
| 808 | + i3GEO.mapa.ativaTema(valor); | |
| 809 | + i3GEOF[ferramenta].tema = valor; | |
| 810 | + $i("i3GEOF."+ferramenta+"_corpo").innerHTML = ""; | |
| 811 | + eval("i3GEOF."+ferramenta+".inicia('i3GEOF."+ferramenta+"_corpo');"); | |
| 812 | + } | |
| 813 | + }; | |
| 814 | + }, | |
| 815 | + temp.id, | |
| 816 | + "", | |
| 817 | + false, | |
| 818 | + tipo | |
| 819 | + ); | |
| 820 | + } | |
| 821 | + temp = "i3GEO.janela.comboCabecalhoTemas('"+idDiv+"','"+idCombo+"','"+ferramenta+"')"; | |
| 822 | + if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search(temp) < 0) | |
| 823 | + {i3GEO.eventos.ATUALIZAARVORECAMADAS.push(temp);} | |
| 824 | + } | |
| 767 | 825 | }; |
| 768 | 826 | try{ |
| 769 | 827 | //controle dos painéis que podem ser redimensionados | ... | ... |
classesjs/classe_util.js
| ... | ... | @@ -1541,7 +1541,7 @@ i3GEO.util = { |
| 1541 | 1541 | } |
| 1542 | 1542 | if(tipoCombo === "ligadosComTabela"){ |
| 1543 | 1543 | if(i3GEO.arvoreDeCamadas.CAMADAS !== ""){ |
| 1544 | - temp(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS)); | |
| 1544 | + temp = i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS); | |
| 1545 | 1545 | monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp)); |
| 1546 | 1546 | } |
| 1547 | 1547 | else | ... | ... |
classesjs/dicionario.js
| ... | ... | @@ -1369,10 +1369,10 @@ it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzi |
| 1369 | 1369 | }], |
| 1370 | 1370 | "d25t":[ |
| 1371 | 1371 | { |
| 1372 | -pt:"inserir texto", | |
| 1373 | -en:"inserir texto", | |
| 1374 | -es:"inserir texto", | |
| 1375 | -it:"inserir texto" | |
| 1372 | +pt:"Inserir texto", | |
| 1373 | +en:"Inserir texto", | |
| 1374 | +es:"Inserir texto", | |
| 1375 | +it:"Inserir texto" | |
| 1376 | 1376 | }], |
| 1377 | 1377 | "d26":[ |
| 1378 | 1378 | { | ... | ... |
ferramentas/busca/index.js.php
| ... | ... | @@ -68,6 +68,11 @@ i3GEOF.busca = { |
| 68 | 68 | iddiv {String} - id do div que receberá o conteudo HTML da ferramenta |
| 69 | 69 | */ |
| 70 | 70 | inicia: function(iddiv){ |
| 71 | + i3GEO.janela.comboCabecalhoTemas("i3GEOFbuscaComboCabeca","i3GEOFbuscaComboCabecaSel","busca","ligadosComTabela"); | |
| 72 | + if(i3GEO.temaAtivo === ""){ | |
| 73 | + $i(iddiv).innerHTML = "Escolha um tema na lista mostrada no cabeçalho"; | |
| 74 | + return; | |
| 75 | + } | |
| 71 | 76 | try{ |
| 72 | 77 | $i(iddiv).innerHTML += i3GEOF.busca.html(); |
| 73 | 78 | i3GEO.php.listaItensTema(i3GEOF.busca.montaListaItens,i3GEOF.busca.tema); |
| ... | ... | @@ -75,6 +80,7 @@ i3GEOF.busca = { |
| 75 | 80 | "i3GEObuscabotao1", |
| 76 | 81 | {onclick:{fn: i3GEOF.busca.procurar}} |
| 77 | 82 | ); |
| 83 | + i3GEO.janela.comboCabecalhoTemas("i3GEOFbuscaComboCabeca","i3GEOFbuscaComboCabecaSel","busca","ligadosComTabela"); | |
| 78 | 84 | } |
| 79 | 85 | catch(erro){alert(erro);} |
| 80 | 86 | }, |
| ... | ... | @@ -122,6 +128,11 @@ i3GEOF.busca = { |
| 122 | 128 | */ |
| 123 | 129 | criaJanelaFlutuante: function(){ |
| 124 | 130 | var minimiza,cabecalho,janela,divid,temp,titulo; |
| 131 | + if($i("i3GEOF.busca")){ | |
| 132 | + i3GEOF.busca.tema = i3GEO.temaAtivo; | |
| 133 | + i3GEOF.busca.inicia("i3GEOF.busca_corpo"); | |
| 134 | + return; | |
| 135 | + } | |
| 125 | 136 | //funcao que sera executada ao ser clicado no cabeçalho da janela |
| 126 | 137 | cabecalho = function(){ |
| 127 | 138 | i3GEOF.busca.ativaFoco(); |
| ... | ... | @@ -130,7 +141,7 @@ i3GEOF.busca = { |
| 130 | 141 | i3GEO.janela.minimiza("i3GEOF.busca"); |
| 131 | 142 | }; |
| 132 | 143 | //cria a janela flutuante |
| 133 | - titulo = "Procurar <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=5&idajuda=35' > </a>"; | |
| 144 | + titulo = "<div style='z-index:1;position:absolute' id='i3GEOFbuscaComboCabeca' >------</div> Buscar <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=5&idajuda=35' > </a>"; | |
| 134 | 145 | janela = i3GEO.janela.cria( |
| 135 | 146 | "290px", |
| 136 | 147 | "330px", |
| ... | ... | @@ -148,6 +159,11 @@ i3GEOF.busca = { |
| 148 | 159 | i3GEOF.busca.aguarde = $i("i3GEOF.busca_imagemCabecalho").style; |
| 149 | 160 | //i3GEOF.analisaGeometrias.aguarde.visibility = "visible"; |
| 150 | 161 | i3GEOF.busca.inicia(divid); |
| 162 | + temp = function(){ | |
| 163 | + if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search('i3GEO.janela.comboCabecalhoTemas("i3GEOFbuscaComboCabeca","i3GEOFbuscaComboCabecaSel","busca","ligadosComTabela")') > 0) | |
| 164 | + {i3GEO.eventos.ATUALIZAARVORECAMADAS.remove('i3GEO.janela.comboCabecalhoTemas("i3GEOFbuscaComboCabeca","i3GEOFbuscaComboCabecaSel","busca","ligadosComTabela")');} | |
| 165 | + }; | |
| 166 | + YAHOO.util.Event.addListener(janela[0].close, "click", temp); | |
| 151 | 167 | }, |
| 152 | 168 | /* |
| 153 | 169 | Function: ativaFoco |
| ... | ... | @@ -155,7 +171,7 @@ i3GEOF.busca = { |
| 155 | 171 | Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado |
| 156 | 172 | */ |
| 157 | 173 | ativaFoco: function(){ |
| 158 | - if(i3GEO.arvoreDeCamadas.pegaTema(i3GEOF.busca.tema) === "") | |
| 174 | + if(i3GEOF.busca.tema !== "" && i3GEO.arvoreDeCamadas.pegaTema(i3GEOF.busca.tema) === "") | |
| 159 | 175 | {alert("O tema ja nao existe mais no mapa");} |
| 160 | 176 | var i = $i("i3GEOF.busca_c").style; |
| 161 | 177 | i3GEO.janela.ULTIMOZINDEX++; | ... | ... |
ferramentas/tabela/index.js.php
| ... | ... | @@ -103,13 +103,13 @@ i3GEOF.tabela = { |
| 103 | 103 | iddiv {String} - id do div que receberá o conteudo HTML da ferramenta |
| 104 | 104 | */ |
| 105 | 105 | inicia: function(iddiv){ |
| 106 | + i3GEO.janela.comboCabecalhoTemas("i3GEOFtabelaComboCabeca","i3GEOFtabelaComboCabecaSel","tabela","ligadosComTabela"); | |
| 106 | 107 | if(i3GEO.temaAtivo === ""){ |
| 107 | - i3GEOF.tabela.comboCabecalho(); | |
| 108 | 108 | $i(iddiv).innerHTML = "Escolha um tema na lista mostrada no cabeçalho"; |
| 109 | 109 | return; |
| 110 | 110 | } |
| 111 | 111 | try{ |
| 112 | - $i(iddiv).innerHTML += i3GEOF.tabela.html(); | |
| 112 | + $i(iddiv).innerHTML = i3GEOF.tabela.html(); | |
| 113 | 113 | i3GEO.guias.mostraGuiaFerramenta("i3GEOtabelaguia1","i3GEOtabelaguia"); |
| 114 | 114 | //eventos das guias |
| 115 | 115 | $i("i3GEOtabelaguia6").onclick = function() |
| ... | ... | @@ -199,7 +199,6 @@ i3GEOF.tabela = { |
| 199 | 199 | if (i3GEO.parametros.r.toLowerCase() !== "sim") |
| 200 | 200 | {$i("i3GEOtabelaguia4obj").innerHTML = "Opção não disponível";} |
| 201 | 201 | i3GEOF.tabela.pegaRegistros(); |
| 202 | - i3GEOF.tabela.comboCabecalho(); | |
| 203 | 202 | } |
| 204 | 203 | catch(erro){alert(erro);} |
| 205 | 204 | }, |
| ... | ... | @@ -311,6 +310,11 @@ i3GEOF.tabela = { |
| 311 | 310 | */ |
| 312 | 311 | criaJanelaFlutuante: function(){ |
| 313 | 312 | var minimiza,cabecalho,janela,divid,temp,titulo; |
| 313 | + if($i("i3GEOF.tabela")){ | |
| 314 | + i3GEOF.tabela.tema = i3GEO.temaAtivo; | |
| 315 | + i3GEOF.tabela.inicia("i3GEOF.tabela_corpo"); | |
| 316 | + return; | |
| 317 | + } | |
| 314 | 318 | cabecalho = function(){ |
| 315 | 319 | i3GEOF.tabela.ativaFoco(); |
| 316 | 320 | }; |
| ... | ... | @@ -347,8 +351,8 @@ i3GEOF.tabela = { |
| 347 | 351 | if(i3GEO.Interface.ATUAL === "googleearth"){ |
| 348 | 352 | google.earth.removeEventListener(tabelaDragend); |
| 349 | 353 | } |
| 350 | - if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEOF.tabela.comboCabecalho()") > 0) | |
| 351 | - {i3GEO.eventos.ATUALIZAARVORECAMADAS.remove("i3GEOF.tabela.comboCabecalho()");} | |
| 354 | + if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search('i3GEO.janela.comboCabecalhoTemas("i3GEOFtabelaComboCabeca","i3GEOFtabelaComboCabecaSel","tabela","ligadosComTabela")') > 0) | |
| 355 | + {i3GEO.eventos.ATUALIZAARVORECAMADAS.remove('i3GEO.janela.comboCabecalhoTemas("i3GEOFtabelaComboCabeca","i3GEOFtabelaComboCabecaSel","tabela","ligadosComTabela")');} | |
| 352 | 356 | }; |
| 353 | 357 | YAHOO.util.Event.addListener(janela[0].close, "click", temp); |
| 354 | 358 | }, |
| ... | ... | @@ -365,56 +369,6 @@ i3GEOF.tabela = { |
| 365 | 369 | i.zIndex = 21000 + i3GEO.janela.ULTIMOZINDEX; |
| 366 | 370 | }, |
| 367 | 371 | /* |
| 368 | - Function: comboCabecalho | |
| 369 | - | |
| 370 | - Cria o combo de seleção de temas localizado no cabeçalho da janela | |
| 371 | - */ | |
| 372 | - comboCabecalho: function(){ | |
| 373 | - var idDiv = "i3GEOFtabelaComboCabeca", | |
| 374 | - idCombo = "i3GEOFtabelaComboCabecaSel", | |
| 375 | - ferramenta = "tabela", | |
| 376 | - temp = $i(idDiv); | |
| 377 | - if(temp){ | |
| 378 | - temp.innerHTML = ""; | |
| 379 | - i3GEO.util.comboTemas( | |
| 380 | - temp.id+"Sel", | |
| 381 | - function(retorno){ | |
| 382 | - $i(idDiv).innerHTML = retorno.dados; | |
| 383 | - var c = $i(idCombo); | |
| 384 | - c.style.width = "150px"; | |
| 385 | - c.style.border = "solid #B4B4B4 1px"; | |
| 386 | - c.style.top = "1px"; | |
| 387 | - c.style.position = "relative"; | |
| 388 | - c.style.fontSize = "10px"; | |
| 389 | - c.style.color = "#B4B4B4"; | |
| 390 | - c.value = i3GEOF.tabela.tema; | |
| 391 | - if(c.value === ""){ | |
| 392 | - i3GEOF.tabela.tema = ""; | |
| 393 | - $i("i3GEOF."+ferramenta+"_corpo").innerHTML = ""; | |
| 394 | - } | |
| 395 | - c.onchange = function(){ | |
| 396 | - var valor = $i(idCombo).value; | |
| 397 | - if(valor !== ""){ | |
| 398 | - | |
| 399 | - i3GEO.mapa.ativaTema(valor); | |
| 400 | - i3GEOF.tabela.tema = valor; | |
| 401 | - | |
| 402 | - $i("i3GEOF."+ferramenta+"_corpo").innerHTML = ""; | |
| 403 | - eval("i3GEOF."+ferramenta+".inicia('i3GEOF."+ferramenta+"_corpo');"); | |
| 404 | - | |
| 405 | - } | |
| 406 | - }; | |
| 407 | - }, | |
| 408 | - temp.id, | |
| 409 | - "", | |
| 410 | - false, | |
| 411 | - "ligados" | |
| 412 | - ); | |
| 413 | - } | |
| 414 | - if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEOF.tabela.comboCabecalho()") < 0) | |
| 415 | - {i3GEO.eventos.ATUALIZAARVORECAMADAS.push("i3GEOF.tabela.comboCabecalho()");} | |
| 416 | - }, | |
| 417 | - /* | |
| 418 | 372 | Function: ativaAutoAtualiza |
| 419 | 373 | |
| 420 | 374 | Ativa ou desativa a atualização automática da tabela quando o usuário navega no mapa | ... | ... |
ferramentas/toponimia/index.js.php
| ... | ... | @@ -19,7 +19,7 @@ Licenca: |
| 19 | 19 | |
| 20 | 20 | GPL2 |
| 21 | 21 | |
| 22 | -I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
| 22 | +i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
| 23 | 23 | |
| 24 | 24 | Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil |
| 25 | 25 | Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br |
| ... | ... | @@ -62,6 +62,11 @@ i3GEOF.toponimia = { |
| 62 | 62 | iddiv {String} - id do div que receberá o conteudo HTML da ferramenta |
| 63 | 63 | */ |
| 64 | 64 | inicia: function(iddiv){ |
| 65 | + i3GEO.janela.comboCabecalhoTemas("i3GEOFtoponimiaComboCabeca","i3GEOFtoponimiaComboCabecaSel","toponimia","ligadosComTabela"); | |
| 66 | + if(i3GEO.temaAtivo === ""){ | |
| 67 | + $i(iddiv).innerHTML = "Escolha um tema na lista mostrada no cabeçalho"; | |
| 68 | + return; | |
| 69 | + } | |
| 65 | 70 | try{ |
| 66 | 71 | $i(iddiv).innerHTML += i3GEOF.toponimia.html(); |
| 67 | 72 | i3GEO.guias.mostraGuiaFerramenta("i3GEOtoponimiaguia1","i3GEOtoponimiaguia"); |
| ... | ... | @@ -234,11 +239,16 @@ i3GEOF.toponimia = { |
| 234 | 239 | */ |
| 235 | 240 | criaJanelaFlutuante: function(){ |
| 236 | 241 | var minimiza,cabecalho,janela,divid,temp,titulo; |
| 242 | + if($i("i3GEOF.toponimia")){ | |
| 243 | + i3GEOF.toponimia.tema = i3GEO.temaAtivo; | |
| 244 | + i3GEOF.toponimia.inicia("i3GEOF.toponimia_corpo"); | |
| 245 | + return; | |
| 246 | + } | |
| 237 | 247 | //cria a janela flutuante |
| 238 | - titulo = "Toponímia <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=5&idajuda=36' > </a>"; | |
| 248 | + titulo = "<div style='z-index:1;position:absolute' id='i3GEOFtoponimiaComboCabeca' >------</div> Toponímia <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=5&idajuda=36' > </a>"; | |
| 239 | 249 | janela = i3GEO.janela.cria( |
| 240 | - "350px", | |
| 241 | - "250px", | |
| 250 | + "390px", | |
| 251 | + "180px", | |
| 242 | 252 | "", |
| 243 | 253 | "", |
| 244 | 254 | "", |
| ... | ... | @@ -251,6 +261,11 @@ i3GEOF.toponimia = { |
| 251 | 261 | i3GEOF.toponimia.aguarde = $i("i3GEOF.toponimia_imagemCabecalho").style; |
| 252 | 262 | $i("i3GEOF.toponimia_corpo").style.backgroundColor = "white"; |
| 253 | 263 | i3GEOF.toponimia.inicia(divid); |
| 264 | + temp = function(){ | |
| 265 | + if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search('i3GEO.janela.comboCabecalhoTemas("i3GEOFtoponimiaComboCabeca","i3GEOFtoponimiaComboCabecaSel","toponimia","ligadosComTabela")') > 0) | |
| 266 | + {i3GEO.eventos.ATUALIZAARVORECAMADAS.remove('i3GEO.janela.comboCabecalhoTemas("i3GEOFtoponimiaComboCabeca","i3GEOFtoponimiaComboCabecaSel","toponimia","ligadosComTabela")');} | |
| 267 | + }; | |
| 268 | + YAHOO.util.Event.addListener(janela[0].close, "click", temp); | |
| 254 | 269 | }, |
| 255 | 270 | /* |
| 256 | 271 | Function: corj | ... | ... |