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 | 596 | else |
| 597 | 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 | 600 | novoel.onmouseout = function(){ |
| 603 | 601 | if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){ |
| ... | ... | @@ -763,6 +761,7 @@ i3GEO.barraDeBotoes = { |
| 763 | 761 | // |
| 764 | 762 | //esconde x |
| 765 | 763 | // |
| 764 | + /* | |
| 766 | 765 | if(i3GEO.barraDeBotoes.PERMITEFECHAR == true){ |
| 767 | 766 | var id = $i(idconteudonovo); |
| 768 | 767 | if(id){ |
| ... | ... | @@ -770,8 +769,12 @@ i3GEO.barraDeBotoes = { |
| 770 | 769 | if(iconex){ |
| 771 | 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 | 780 | Function: ativaMenuContexto | ... | ... |
classesjs/classe_maparef.js
| ... | ... | @@ -163,7 +163,7 @@ i3GEO.maparef = { |
| 163 | 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 | 164 | ins += "<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span> "; |
| 165 | 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 | 167 | ins += "<option value='fixo' select >fixo</option>"; |
| 168 | 168 | ins += "<option value='mapa' >mapa</option>"; |
| 169 | 169 | ins += "<option value='dinamico' >dinâmico</option>"; | ... | ... |
ferramentas/identifica/index.js.php
| ... | ... | @@ -41,7 +41,7 @@ Classe: i3GEOF.identifica |
| 41 | 41 | */ |
| 42 | 42 | i3GEOF.identifica = { |
| 43 | 43 | /* |
| 44 | - Variavel: mostraLinkGeohack | |
| 44 | + Propriedade: mostraLinkGeohack | |
| 45 | 45 | |
| 46 | 46 | Mostra ou não o link para abrir o site GeoHack. |
| 47 | 47 | |
| ... | ... | @@ -52,7 +52,7 @@ i3GEOF.identifica = { |
| 52 | 52 | */ |
| 53 | 53 | mostraLinkGeohack: true, |
| 54 | 54 | /* |
| 55 | - Variavel: mostraSistemasAdicionais | |
| 55 | + Propriedade: mostraSistemasAdicionais | |
| 56 | 56 | |
| 57 | 57 | Mostra ou não a lista de sistemas adicionais de busca de dados. |
| 58 | 58 | |
| ... | ... | @@ -97,6 +97,15 @@ i3GEOF.identifica = { |
| 97 | 97 | */ |
| 98 | 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 | 109 | Function: inicia |
| 101 | 110 | |
| 102 | 111 | Inicia a janela de informações |
| ... | ... | @@ -246,7 +255,7 @@ i3GEOF.identifica = { |
| 246 | 255 | i3GEO.eventos.MOUSECLIQUE.remove("cliqueIdentifica()"); |
| 247 | 256 | i3GEO.barraDeBotoes.ativaBotoes(); |
| 248 | 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 | 259 | {i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.identifica.limpaMarca()");} |
| 251 | 260 | }; |
| 252 | 261 | YAHOO.util.Event.addListener(janela[0].close, "click", temp); |
| ... | ... | @@ -255,7 +264,10 @@ i3GEOF.identifica = { |
| 255 | 264 | {i3GEO.eventos.NAVEGAMAPA.push("i3GEOF.identifica.limpaMarca()");} |
| 256 | 265 | }, |
| 257 | 266 | limpaMarca: function(){ |
| 258 | - i3GEO.util.escondePin(); | |
| 267 | + try{ | |
| 268 | + i3GEO.util.escondePin(); | |
| 269 | + } | |
| 270 | + catch(e){} | |
| 259 | 271 | }, |
| 260 | 272 | /* |
| 261 | 273 | Function: ativaFoco |
| ... | ... | @@ -353,7 +365,7 @@ i3GEOF.identifica = { |
| 353 | 365 | retorno {JSON} - objeto retornado por i3GEO.php.listaTemas ou por i3GEO.arvoreDeCamadas.filtraCamadas |
| 354 | 366 | */ |
| 355 | 367 | montaListaTemas: function(retorno){ |
| 356 | - var lista,linhas,linhas1,l,nome,tema,divResultado; | |
| 368 | + var lista,linhas,linhas1,l,nome,tema,divResultado,marcado=""; | |
| 357 | 369 | if(retorno.data) |
| 358 | 370 | {lista = retorno.data;} |
| 359 | 371 | else |
| ... | ... | @@ -372,6 +384,7 @@ i3GEOF.identifica = { |
| 372 | 384 | linhas1 = ""; |
| 373 | 385 | for (l=0;l<lista.length;l++) |
| 374 | 386 | { |
| 387 | + marcado=""; | |
| 375 | 388 | if(lista[l].nome){ |
| 376 | 389 | nome = lista[l].nome; |
| 377 | 390 | tema = lista[l].tema; |
| ... | ... | @@ -380,9 +393,10 @@ i3GEOF.identifica = { |
| 380 | 393 | nome = lista[l].tema; |
| 381 | 394 | tema = lista[l].name; |
| 382 | 395 | } |
| 383 | - | |
| 396 | + if(tema == i3GEO.temaAtivo) | |
| 397 | + {marcado = "CHECKED";} | |
| 384 | 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 | 401 | divResultado = $i("i3GEOidentificalistaTemas"); |
| 388 | 402 | if(divResultado) |
| ... | ... | @@ -492,7 +506,7 @@ i3GEOF.identifica = { |
| 492 | 506 | <i3GEO.php.identifica2> |
| 493 | 507 | */ |
| 494 | 508 | buscaDadosTema: function(tema){ |
| 495 | - var res,opcao,resolucao,listaDeTemas=""; | |
| 509 | + var res,opcao,resolucao,listaDeTemas="",temp; | |
| 496 | 510 | $i("i3GEOidentificaocorrencia").innerHTML = "<img src='"+i3GEO.configura.locaplic+"/imagens/aguarde.gif' />"; |
| 497 | 511 | res = $i("i3GEOidentificaresolucao"); |
| 498 | 512 | if(res) |
| ... | ... | @@ -505,7 +519,14 @@ i3GEOF.identifica = { |
| 505 | 519 | {opcao = "ligados";} |
| 506 | 520 | else |
| 507 | 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 | 532 | Function: mostraDadosSistema |
| ... | ... | @@ -562,16 +583,17 @@ i3GEOF.identifica = { |
| 562 | 583 | retorno {JSON} - objeto JSON com os dados <i3GEO.php.identifica2> |
| 563 | 584 | */ |
| 564 | 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 | 589 | $i("i3GEOF.identifica_corpo").scrollTop = 0; |
| 567 | 590 | if(retorno == "") |
| 568 | 591 | {$i("i3GEOidentificaocorrencia").innerHTML="Nada encontrado";} |
| 569 | 592 | var i = $i("i3GEOmarcaIdentifica"); |
| 570 | 593 | if(i) |
| 571 | 594 | {i.style.display = "block";} |
| 572 | - if (retorno.data !== undefined) | |
| 595 | + if (retorno !== undefined) | |
| 573 | 596 | { |
| 574 | - retorno = retorno.data; | |
| 575 | 597 | divO = $i("i3GEOidentificaocorrencia"); |
| 576 | 598 | divO.innerHTML=""; |
| 577 | 599 | ntemas = retorno.length; |
| ... | ... | @@ -581,9 +603,14 @@ i3GEOF.identifica = { |
| 581 | 603 | res += "<div style='padding-top:6px;left:2px;text-align:left;width:100%;' >"+retorno[i].nome+"</div>"; |
| 582 | 604 | if(resultados[0] !== " ") |
| 583 | 605 | { |
| 584 | - nres = resultados.length; | |
| 606 | + nres = resultados.length; | |
| 607 | + numResultados = nres; | |
| 585 | 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 | 615 | nitens = resultados[j].length; |
| 589 | 616 | for(k=0;k<nitens;k++){ |
| ... | ... | @@ -603,8 +630,35 @@ i3GEOF.identifica = { |
| 603 | 630 | else |
| 604 | 631 | {res += "Nada encontrado";} |
| 605 | 632 | } |
| 633 | + if(ntemas == 1) | |
| 634 | + {res = i3GEOF.identifica.montaOpcoesIdentificaOcorrencia(atualN,numResultados) + res;} | |
| 606 | 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 | 664 | <?php error_reporting(0);if(extension_loaded('zlib')){ob_end_flush();}?> |
| 611 | 665 | \ No newline at end of file | ... | ... |