Commit a705455b1eb77d6a5f9f4d96ffc90ef47523296b
1 parent
44dad5a5
Exists in
master
and in
7 other branches
Opção para escolha de quais dados serão mostrados na ferramenta de identificação
Showing
3 changed files
with
75 additions
and
18 deletions
Show diff stats
classesjs/classe_barradebotoes.js
| @@ -596,8 +596,6 @@ i3GEO.barraDeBotoes = { | @@ -596,8 +596,6 @@ i3GEO.barraDeBotoes = { | ||
| 596 | else | 596 | else |
| 597 | {novoel.style.opacity = 0.85;} | 597 | {novoel.style.opacity = 0.85;} |
| 598 | } | 598 | } |
| 599 | - if(i3GEO.barraDeBotoes.PERMITEFECHAR == true) | ||
| 600 | - {novoel.getElementsByClassName('container-close')[0].style.display='block';} | ||
| 601 | }; | 599 | }; |
| 602 | novoel.onmouseout = function(){ | 600 | novoel.onmouseout = function(){ |
| 603 | if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){ | 601 | if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){ |
| @@ -763,6 +761,7 @@ i3GEO.barraDeBotoes = { | @@ -763,6 +761,7 @@ i3GEO.barraDeBotoes = { | ||
| 763 | // | 761 | // |
| 764 | //esconde x | 762 | //esconde x |
| 765 | // | 763 | // |
| 764 | + /* | ||
| 766 | if(i3GEO.barraDeBotoes.PERMITEFECHAR == true){ | 765 | if(i3GEO.barraDeBotoes.PERMITEFECHAR == true){ |
| 767 | var id = $i(idconteudonovo); | 766 | var id = $i(idconteudonovo); |
| 768 | if(id){ | 767 | if(id){ |
| @@ -770,8 +769,12 @@ i3GEO.barraDeBotoes = { | @@ -770,8 +769,12 @@ i3GEO.barraDeBotoes = { | ||
| 770 | if(iconex){ | 769 | if(iconex){ |
| 771 | iconex.style.display='none'; | 770 | iconex.style.display='none'; |
| 772 | } | 771 | } |
| 773 | - } | 772 | + } |
| 773 | + var over = ; | ||
| 774 | + if($i(idconteudonovo+"_h")) | ||
| 775 | + {$i(idconteudonovo+"_h").onmouseover = eval("function(){$i('"+idconteudonovo+"').getElementsByClassName('container-close')[0].style.display='block';}")}; | ||
| 774 | } | 776 | } |
| 777 | + */ | ||
| 775 | }, | 778 | }, |
| 776 | /* | 779 | /* |
| 777 | Function: ativaMenuContexto | 780 | Function: ativaMenuContexto |
classesjs/classe_maparef.js
| @@ -163,7 +163,7 @@ i3GEO.maparef = { | @@ -163,7 +163,7 @@ i3GEO.maparef = { | ||
| 163 | temp = "javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();"; | 163 | temp = "javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();"; |
| 164 | ins += "<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span> "; | 164 | ins += "<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span> "; |
| 165 | if(i3GEO.maparef.SELETORTIPO){ | 165 | if(i3GEO.maparef.SELETORTIPO){ |
| 166 | - ins += "<select style='font-size:9px;display:none;' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>"; | 166 | + ins += "<select style='font-size:9px;' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>"; |
| 167 | ins += "<option value='fixo' select >fixo</option>"; | 167 | ins += "<option value='fixo' select >fixo</option>"; |
| 168 | ins += "<option value='mapa' >mapa</option>"; | 168 | ins += "<option value='mapa' >mapa</option>"; |
| 169 | ins += "<option value='dinamico' >dinâmico</option>"; | 169 | ins += "<option value='dinamico' >dinâmico</option>"; |
ferramentas/identifica/index.js.php
| @@ -41,7 +41,7 @@ Classe: i3GEOF.identifica | @@ -41,7 +41,7 @@ Classe: i3GEOF.identifica | ||
| 41 | */ | 41 | */ |
| 42 | i3GEOF.identifica = { | 42 | i3GEOF.identifica = { |
| 43 | /* | 43 | /* |
| 44 | - Variavel: mostraLinkGeohack | 44 | + Propriedade: mostraLinkGeohack |
| 45 | 45 | ||
| 46 | Mostra ou não o link para abrir o site GeoHack. | 46 | Mostra ou não o link para abrir o site GeoHack. |
| 47 | 47 | ||
| @@ -52,7 +52,7 @@ i3GEOF.identifica = { | @@ -52,7 +52,7 @@ i3GEOF.identifica = { | ||
| 52 | */ | 52 | */ |
| 53 | mostraLinkGeohack: true, | 53 | mostraLinkGeohack: true, |
| 54 | /* | 54 | /* |
| 55 | - Variavel: mostraSistemasAdicionais | 55 | + Propriedade: mostraSistemasAdicionais |
| 56 | 56 | ||
| 57 | Mostra ou não a lista de sistemas adicionais de busca de dados. | 57 | Mostra ou não a lista de sistemas adicionais de busca de dados. |
| 58 | 58 | ||
| @@ -97,6 +97,15 @@ i3GEOF.identifica = { | @@ -97,6 +97,15 @@ i3GEOF.identifica = { | ||
| 97 | */ | 97 | */ |
| 98 | sistemasAdicionais: [], | 98 | sistemasAdicionais: [], |
| 99 | /* | 99 | /* |
| 100 | + Variavel: dadosIdentifica | ||
| 101 | + | ||
| 102 | + Guarda os dados obtidos com a chamada em AJAX de identificação | ||
| 103 | + | ||
| 104 | + Type: | ||
| 105 | + {Array} | ||
| 106 | + */ | ||
| 107 | + dadosIdentifica: [], | ||
| 108 | + /* | ||
| 100 | Function: inicia | 109 | Function: inicia |
| 101 | 110 | ||
| 102 | Inicia a janela de informações | 111 | Inicia a janela de informações |
| @@ -246,7 +255,7 @@ i3GEOF.identifica = { | @@ -246,7 +255,7 @@ i3GEOF.identifica = { | ||
| 246 | i3GEO.eventos.MOUSECLIQUE.remove("cliqueIdentifica()"); | 255 | i3GEO.eventos.MOUSECLIQUE.remove("cliqueIdentifica()"); |
| 247 | i3GEO.barraDeBotoes.ativaBotoes(); | 256 | i3GEO.barraDeBotoes.ativaBotoes(); |
| 248 | i3GEOF.identifica.limpaMarca(); | 257 | i3GEOF.identifica.limpaMarca(); |
| 249 | - if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEOF.identifica.limpaMarca()") > 0) | 258 | + if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEOF.identifica") > 0) |
| 250 | {i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.identifica.limpaMarca()");} | 259 | {i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.identifica.limpaMarca()");} |
| 251 | }; | 260 | }; |
| 252 | YAHOO.util.Event.addListener(janela[0].close, "click", temp); | 261 | YAHOO.util.Event.addListener(janela[0].close, "click", temp); |
| @@ -255,7 +264,10 @@ i3GEOF.identifica = { | @@ -255,7 +264,10 @@ i3GEOF.identifica = { | ||
| 255 | {i3GEO.eventos.NAVEGAMAPA.push("i3GEOF.identifica.limpaMarca()");} | 264 | {i3GEO.eventos.NAVEGAMAPA.push("i3GEOF.identifica.limpaMarca()");} |
| 256 | }, | 265 | }, |
| 257 | limpaMarca: function(){ | 266 | limpaMarca: function(){ |
| 258 | - i3GEO.util.escondePin(); | 267 | + try{ |
| 268 | + i3GEO.util.escondePin(); | ||
| 269 | + } | ||
| 270 | + catch(e){} | ||
| 259 | }, | 271 | }, |
| 260 | /* | 272 | /* |
| 261 | Function: ativaFoco | 273 | Function: ativaFoco |
| @@ -353,7 +365,7 @@ i3GEOF.identifica = { | @@ -353,7 +365,7 @@ i3GEOF.identifica = { | ||
| 353 | retorno {JSON} - objeto retornado por i3GEO.php.listaTemas ou por i3GEO.arvoreDeCamadas.filtraCamadas | 365 | retorno {JSON} - objeto retornado por i3GEO.php.listaTemas ou por i3GEO.arvoreDeCamadas.filtraCamadas |
| 354 | */ | 366 | */ |
| 355 | montaListaTemas: function(retorno){ | 367 | montaListaTemas: function(retorno){ |
| 356 | - var lista,linhas,linhas1,l,nome,tema,divResultado; | 368 | + var lista,linhas,linhas1,l,nome,tema,divResultado,marcado=""; |
| 357 | if(retorno.data) | 369 | if(retorno.data) |
| 358 | {lista = retorno.data;} | 370 | {lista = retorno.data;} |
| 359 | else | 371 | else |
| @@ -372,6 +384,7 @@ i3GEOF.identifica = { | @@ -372,6 +384,7 @@ i3GEOF.identifica = { | ||
| 372 | linhas1 = ""; | 384 | linhas1 = ""; |
| 373 | for (l=0;l<lista.length;l++) | 385 | for (l=0;l<lista.length;l++) |
| 374 | { | 386 | { |
| 387 | + marcado=""; | ||
| 375 | if(lista[l].nome){ | 388 | if(lista[l].nome){ |
| 376 | nome = lista[l].nome; | 389 | nome = lista[l].nome; |
| 377 | tema = lista[l].tema; | 390 | tema = lista[l].tema; |
| @@ -380,9 +393,10 @@ i3GEOF.identifica = { | @@ -380,9 +393,10 @@ i3GEOF.identifica = { | ||
| 380 | nome = lista[l].tema; | 393 | nome = lista[l].tema; |
| 381 | tema = lista[l].name; | 394 | tema = lista[l].name; |
| 382 | } | 395 | } |
| 383 | - | 396 | + if(tema == i3GEO.temaAtivo) |
| 397 | + {marcado = "CHECKED";} | ||
| 384 | if(lista[l].identifica !== "nao") | 398 | if(lista[l].identifica !== "nao") |
| 385 | - {linhas1 += "<tr><td style='border-top:1px solid beige;'><input onclick='i3GEOF.identifica.buscaDadosTema(\""+tema+"\")' style='border:0px solid white;cursor:pointer;' type=radio name=i3GEOidentificatema /></td><td style='border-top:1px solid beige;' >"+nome+"</td></tr>";} | 399 | + {linhas1 += "<tr><td style='border-top:1px solid beige;'><input onclick='i3GEOF.identifica.buscaDadosTema(\""+tema+"\")' style='border:0px solid white;cursor:pointer;' type=radio "+marcado+" name=i3GEOidentificatema /></td><td style='border-top:1px solid beige;' >"+nome+"</td></tr>";} |
| 386 | } | 400 | } |
| 387 | divResultado = $i("i3GEOidentificalistaTemas"); | 401 | divResultado = $i("i3GEOidentificalistaTemas"); |
| 388 | if(divResultado) | 402 | if(divResultado) |
| @@ -492,7 +506,7 @@ i3GEOF.identifica = { | @@ -492,7 +506,7 @@ i3GEOF.identifica = { | ||
| 492 | <i3GEO.php.identifica2> | 506 | <i3GEO.php.identifica2> |
| 493 | */ | 507 | */ |
| 494 | buscaDadosTema: function(tema){ | 508 | buscaDadosTema: function(tema){ |
| 495 | - var res,opcao,resolucao,listaDeTemas=""; | 509 | + var res,opcao,resolucao,listaDeTemas="",temp; |
| 496 | $i("i3GEOidentificaocorrencia").innerHTML = "<img src='"+i3GEO.configura.locaplic+"/imagens/aguarde.gif' />"; | 510 | $i("i3GEOidentificaocorrencia").innerHTML = "<img src='"+i3GEO.configura.locaplic+"/imagens/aguarde.gif' />"; |
| 497 | res = $i("i3GEOidentificaresolucao"); | 511 | res = $i("i3GEOidentificaresolucao"); |
| 498 | if(res) | 512 | if(res) |
| @@ -505,7 +519,14 @@ i3GEOF.identifica = { | @@ -505,7 +519,14 @@ i3GEOF.identifica = { | ||
| 505 | {opcao = "ligados";} | 519 | {opcao = "ligados";} |
| 506 | else | 520 | else |
| 507 | {opcao = "tema";} | 521 | {opcao = "tema";} |
| 508 | - i3GEO.php.identifica2(i3GEOF.identifica.mostraDadosTema,i3GEOF.identifica.x,i3GEOF.identifica.y,resolucao,opcao,i3GEO.configura.locaplic,i3GEO.configura.sid,tema,i3GEO.parametros.mapexten,listaDeTemas); | 522 | + temp = function(retorno){ |
| 523 | + i3GEOF.identifica.dadosIdentifica = retorno.data; | ||
| 524 | + if(retorno !== undefined) | ||
| 525 | + {i3GEOF.identifica.mostraDadosTema(i3GEOF.identifica.dadosIdentifica);} | ||
| 526 | + else | ||
| 527 | + {i3GEOF.identifica.mostraDadosTema(undefined);} | ||
| 528 | + } | ||
| 529 | + i3GEO.php.identifica2(temp,i3GEOF.identifica.x,i3GEOF.identifica.y,resolucao,opcao,i3GEO.configura.locaplic,i3GEO.configura.sid,tema,i3GEO.parametros.mapexten,listaDeTemas); | ||
| 509 | }, | 530 | }, |
| 510 | /* | 531 | /* |
| 511 | Function: mostraDadosSistema | 532 | Function: mostraDadosSistema |
| @@ -562,16 +583,17 @@ i3GEOF.identifica = { | @@ -562,16 +583,17 @@ i3GEOF.identifica = { | ||
| 562 | retorno {JSON} - objeto JSON com os dados <i3GEO.php.identifica2> | 583 | retorno {JSON} - objeto JSON com os dados <i3GEO.php.identifica2> |
| 563 | */ | 584 | */ |
| 564 | mostraDadosTema: function(retorno){ | 585 | mostraDadosTema: function(retorno){ |
| 565 | - var res="",div0,ntemas,i,resultados,nres,cor,j,itens,nitens,k; | 586 | + var res="",div0,ntemas,i,resultados,nres,cor,j,itens,nitens,k,atualN = "todas",inicio=0,numResultados; |
| 587 | + if($i("i3GEOFidentificaNocorrencias")) | ||
| 588 | + {atualN = $i("i3GEOFidentificaNocorrencias").value;} | ||
| 566 | $i("i3GEOF.identifica_corpo").scrollTop = 0; | 589 | $i("i3GEOF.identifica_corpo").scrollTop = 0; |
| 567 | if(retorno == "") | 590 | if(retorno == "") |
| 568 | {$i("i3GEOidentificaocorrencia").innerHTML="Nada encontrado";} | 591 | {$i("i3GEOidentificaocorrencia").innerHTML="Nada encontrado";} |
| 569 | var i = $i("i3GEOmarcaIdentifica"); | 592 | var i = $i("i3GEOmarcaIdentifica"); |
| 570 | if(i) | 593 | if(i) |
| 571 | {i.style.display = "block";} | 594 | {i.style.display = "block";} |
| 572 | - if (retorno.data !== undefined) | 595 | + if (retorno !== undefined) |
| 573 | { | 596 | { |
| 574 | - retorno = retorno.data; | ||
| 575 | divO = $i("i3GEOidentificaocorrencia"); | 597 | divO = $i("i3GEOidentificaocorrencia"); |
| 576 | divO.innerHTML=""; | 598 | divO.innerHTML=""; |
| 577 | ntemas = retorno.length; | 599 | ntemas = retorno.length; |
| @@ -581,9 +603,14 @@ i3GEOF.identifica = { | @@ -581,9 +603,14 @@ i3GEOF.identifica = { | ||
| 581 | res += "<div style='padding-top:6px;left:2px;text-align:left;width:100%;' >"+retorno[i].nome+"</div>"; | 603 | res += "<div style='padding-top:6px;left:2px;text-align:left;width:100%;' >"+retorno[i].nome+"</div>"; |
| 582 | if(resultados[0] !== " ") | 604 | if(resultados[0] !== " ") |
| 583 | { | 605 | { |
| 584 | - nres = resultados.length; | 606 | + nres = resultados.length; |
| 607 | + numResultados = nres; | ||
| 585 | cor = "RGB(250,250,250)"; | 608 | cor = "RGB(250,250,250)"; |
| 586 | - for(j=0;j<nres;j++) | 609 | + if(atualN != "todas"){ |
| 610 | + nres = atualN*1; | ||
| 611 | + inicio = atualN*1 - 1; | ||
| 612 | + } | ||
| 613 | + for(j=inicio;j<nres;j++) | ||
| 587 | { | 614 | { |
| 588 | nitens = resultados[j].length; | 615 | nitens = resultados[j].length; |
| 589 | for(k=0;k<nitens;k++){ | 616 | for(k=0;k<nitens;k++){ |
| @@ -603,8 +630,35 @@ i3GEOF.identifica = { | @@ -603,8 +630,35 @@ i3GEOF.identifica = { | ||
| 603 | else | 630 | else |
| 604 | {res += "Nada encontrado";} | 631 | {res += "Nada encontrado";} |
| 605 | } | 632 | } |
| 633 | + if(ntemas == 1) | ||
| 634 | + {res = i3GEOF.identifica.montaOpcoesIdentificaOcorrencia(atualN,numResultados) + res;} | ||
| 606 | $i("i3GEOidentificaocorrencia").innerHTML=res; | 635 | $i("i3GEOidentificaocorrencia").innerHTML=res; |
| 607 | } | 636 | } |
| 637 | + }, | ||
| 638 | + montaOpcoesIdentificaOcorrencia: function(atual,nres){ | ||
| 639 | + var ins,select,i,nocor; | ||
| 640 | + if(!atual){ | ||
| 641 | + atual = "todas"; | ||
| 642 | + } | ||
| 643 | + sel = ""; | ||
| 644 | + select = "<select id=i3GEOFidentificaNocorrencias onchange='i3GEOF.identifica.mostraDadosTema(i3GEOF.identifica.dadosIdentifica)'>"; | ||
| 645 | + if(atual == "todas") | ||
| 646 | + {sel = "SELECTED";} | ||
| 647 | + select += "<option value='todas' "+sel+" >todas</option>"; | ||
| 648 | + nocor = nres + 1; | ||
| 649 | + for(i=1;i<nocor;i++) | ||
| 650 | + { | ||
| 651 | + sel = ""; | ||
| 652 | + if(atual == i) | ||
| 653 | + {sel = "SELECTED";} | ||
| 654 | + select += "<option value="+i+" "+sel+" >"+i+"</option>"; | ||
| 655 | + } | ||
| 656 | + select += "</select>"; | ||
| 657 | + ins = "<table><tr>"; | ||
| 658 | + ins += "<td>Mostra a ocorrência: </td>"; | ||
| 659 | + ins += "<td> "+select+"</td>"; | ||
| 660 | + ins += "</tr></table>"; | ||
| 661 | + return ins; | ||
| 608 | } | 662 | } |
| 609 | }; | 663 | }; |
| 610 | <?php error_reporting(0);if(extension_loaded('zlib')){ob_end_flush();}?> | 664 | <?php error_reporting(0);if(extension_loaded('zlib')){ob_end_flush();}?> |
| 611 | \ No newline at end of file | 665 | \ No newline at end of file |