Commit 365b1c36c9bcb4c550551e4eeaa22b60e288ac6e

Authored by Edmar Moretti
1 parent fe1986fd

v6 - inclusão de opção de filtragem na ferramenta de identificação

css/botoes2.css
... ... @@ -876,6 +876,13 @@
876 876 width: 18px;
877 877 height: 18px;
878 878 }
  879 +.i3geo_filtro {
  880 + background-image: URL('../imagens/visual/default/sprite.png');
  881 + background-repeat: no-repeat;
  882 + background-position: 0px -2073px;
  883 + width: 18px;
  884 + height: 18px;
  885 +}
879 886  
880 887 #abreJanelaLegenda {
881 888 background-image: URL('../imagens/visual/default/sprite.png');
... ...
css/i3geo6.css
... ... @@ -1109,6 +1109,13 @@ background-position: 0px -2073px;
1109 1109 width: 18px;
1110 1110 height: 18px;
1111 1111 }
  1112 +.i3geo_filtro {
  1113 +background-image: URL('../imagens/visual/default/sprite.png');
  1114 +background-repeat: no-repeat;
  1115 +background-position: 0px -2073px;
  1116 +width: 18px;
  1117 +height: 18px;
  1118 +}
1112 1119 #abreJanelaLegenda {
1113 1120 background-image: URL('../imagens/visual/default/sprite.png');
1114 1121 background-repeat: no-repeat;
... ...
css/i3geo6.css.php
... ... @@ -1109,6 +1109,13 @@ background-position: 0px -2073px;
1109 1109 width: 18px;
1110 1110 height: 18px;
1111 1111 }
  1112 +.i3geo_filtro {
  1113 +background-image: URL('../imagens/visual/default/sprite.png');
  1114 +background-repeat: no-repeat;
  1115 +background-position: 0px -2073px;
  1116 +width: 18px;
  1117 +height: 18px;
  1118 +}
1112 1119 #abreJanelaLegenda {
1113 1120 background-image: URL('../imagens/visual/default/sprite.png');
1114 1121 background-repeat: no-repeat;
... ...
ferramentas/identifica/dicionario.js
... ... @@ -143,5 +143,17 @@ i3GEOF.identifica.dicionario = {
143 143 en:"",
144 144 es:"",
145 145 it:""
  146 + }],
  147 + 25: [{
  148 + pt:"Etiqueta está ativa",
  149 + en:"",
  150 + es:"",
  151 + it:""
  152 + }],
  153 + 26: [{
  154 + pt:"Filtrar por valor",
  155 + en:"",
  156 + es:"",
  157 + it:""
146 158 }]
147 159 };
148 160 \ No newline at end of file
... ...
ferramentas/identifica/index.js
... ... @@ -41,6 +41,12 @@ Classe: i3GEOF.identifica
41 41 */
42 42 i3GEOF.identifica = {
43 43 /*
  44 + Variavel: aguarde
  45 +
  46 + Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela.
  47 + */
  48 + aguarde: "",
  49 + /*
44 50 Propriedade: mostraLinkGeohack
45 51  
46 52 Mostra ou não o link para abrir o site GeoHack.
... ... @@ -298,6 +304,7 @@ i3GEOF.identifica = {
298 304 }
299 305 i3GEOF.identifica.inicia(i3GEO.temaAtivo,objposicaocursor.ddx,objposicaocursor.ddy,divid,true,true);
300 306 $i("i3GEOF.identifica_corpo").style.backgroundColor = "white";
  307 + i3GEOF.identifica.aguarde = $i("i3GEOF.identifica_imagemCabecalho").style;
301 308 if(i3GEO.Interface.ATUAL !== "googleearth"){
302 309 temp = function(){
303 310 //i3GEO.barraDeBotoes.ativaBotoes();
... ... @@ -566,7 +573,7 @@ i3GEOF.identifica = {
566 573  
567 574 O resultado é inserido no div com id "listaSistemas".
568 575  
569   - Cada sistema consiste em uma URL para a qual serão passados os parâmetros x e y.
  576 + Cada sistema consiste em uma URL para a qual serão passados os par�metros x e y.
570 577  
571 578 */
572 579 montaListaSistemas: function(retorno){
... ... @@ -729,27 +736,28 @@ i3GEOF.identifica = {
729 736 retorno {JSON} - objeto JSON com os dados <i3GEO.php.identifica3>
730 737 */
731 738 mostraDadosTema: function(retorno){
732   - var camada,idreg,idsalva,paramsalva,i,res="",ntemas,resultados,nres,cor,j,nitens,k,atualN = "todas",inicio=0,numResultados = 0,tip,link,textovalor;
  739 + var filtro,camada,idreg,idsalva,paramsalva,i,res="",ntemas,resultados,nres,cor,j,nitens,k,atualN = "todas",inicio=0,numResultados = 0,tip,link,textovalor;
733 740  
734   - if($i("i3GEOFidentificaNocorrencias"))
735   - {atualN = $i("i3GEOFidentificaNocorrencias").value;}
  741 + if($i("i3GEOFidentificaNocorrencias")){
  742 + atualN = $i("i3GEOFidentificaNocorrencias").value;
  743 + }
736 744 $i("i3GEOF.identifica_corpo").scrollTop = 0;
737   - if(retorno == undefined || retorno == "")
738   - {$i("i3GEOidentificaocorrencia").innerHTML=$trad(14,i3GEOF.identifica.dicionario);return;}
  745 + if(retorno == undefined || retorno == ""){
  746 + $i("i3GEOidentificaocorrencia").innerHTML=$trad(14,i3GEOF.identifica.dicionario);
  747 + return;
  748 + }
739 749 i = $i("i3GEOmarcaIdentifica");
740   - if(i)
741   - {i.style.display = "block";}
742   - if (retorno !== undefined)
743   - {
  750 + if(i){
  751 + i.style.display = "block";
  752 + }
  753 + if (retorno !== undefined){
744 754 $i("i3GEOidentificaocorrencia").innerHTML="";
745 755 ntemas = retorno.length;
746   - for(i=0;i<ntemas;i++)
747   - {
  756 + for(i=0;i<ntemas;i++){
748 757 resultados = retorno[i].resultado;
749 758 res += "<div style='padding-top:6px;left:2px;text-align:left;width:100%;' ><b>"+retorno[i].nome+"</b></div>";
750 759 //encontrou algo
751   - if(resultados[0] !== " ")
752   - {
  760 + if(resultados[0] !== " "){
753 761 nres = resultados.length;
754 762 numResultados = nres;
755 763 cor = "RGB(250,250,250)";
... ... @@ -757,8 +765,7 @@ i3GEOF.identifica = {
757 765 nres = atualN*1;
758 766 inicio = atualN*1 - 1;
759 767 }
760   - for(j=inicio;j<nres;j++)
761   - {
  768 + for(j=inicio;j<nres;j++){
762 769 nitens = resultados[j].length;
763 770 //pega o valor do item que e o id unico no sistema METAESTAT
764 771 idreg = "";
... ... @@ -788,13 +795,20 @@ i3GEOF.identifica = {
788 795 "<input id='"+idsalva+"' type=text value='"+textovalor+"' class=digitar style='widh:210px' />";
789 796 }
790 797 if(resultados[j][k].tip && resultados[j][k].tip.toLowerCase() == "sim"){
791   - tip = "<img style='margin-right:2px;position:relative;top:3px;width:12px;' src='"+i3GEO.configura.locaplic+"/imagens/tips.png' title='Etiqueta ativa' />";
  798 + tip = "<img style='margin-right:2px;position:relative;top:3px;width:12px;' src='"+i3GEO.configura.locaplic+"/imagens/tips.png' title='"+$trad(25,i3GEOF.identifica.dicionario)+"' />";
792 799 }
793 800 else{
794 801 tip = "<img style='margin-right:2px;position:relative;top:3px;width:12px;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' title='' />";
795 802 }
796   - if(resultados[j][k].link === "")
797   - {res += "<div style='width:100%;text-align:left;background-color:"+cor+"' >"+tip+resultados[j][k].alias+":&nbsp;"+textovalor+"</div>";}
  803 + filtro = "onclick=i3GEOF.identifica.filtrar('"+retorno[i].tema+"','"+resultados[j][k].item+"','"+resultados[j][k].valor+"')";
  804 + filtro = "<img "+filtro+" style='margin-right:2px;position:relative;top:3px;width:12px;' src='"+i3GEO.configura.locaplic+"/imagens/oxygen/16x16/view-filter.png' title='"+$trad(26,i3GEOF.identifica.dicionario)+"' />";
  805 + if(resultados[j][k].link === ""){
  806 + res += "<div style='width:100%;text-align:left;background-color:"+
  807 + cor+"' >"+
  808 + tip+
  809 + filtro+
  810 + resultados[j][k].alias+":&nbsp;"+textovalor+"</div>";
  811 + }
798 812 else{
799 813 try{
800 814 link = eval(resultados[j][k].link);
... ... @@ -829,6 +843,21 @@ i3GEOF.identifica = {
829 843 $i("i3GEOidentificaocorrencia").innerHTML=res;
830 844 }
831 845 },
  846 + filtrar: function(tema,item,valor){
  847 + if(i3GEOF.identifica.aguarde.visibility === "visible")
  848 + {return;}
  849 + i3GEOF.identifica.aguarde.visibility = "visible";
  850 + var filtro = "(|["+item+"]| = |"+valor+"|)",
  851 + temp = function(retorno){
  852 + i3GEOF.identifica.aguarde.visibility = "hidden";
  853 + i3GEO.Interface.atualizaTema(retorno,tema);
  854 + },
  855 + p = i3GEO.configura.locaplic+"/ferramentas/filtro/exec.php?base64=sim&g_sid="+i3GEO.configura.sid+"&funcao=inserefiltro",
  856 + cp = new cpaint();
  857 + cp.set_response_type("JSON");
  858 + cp.set_transfer_mode('POST');
  859 + cp.call(p,"insereFiltro",temp,"tema="+tema,"filtro="+i3GEO.util.base64encode(filtro));
  860 + },
832 861 adicionaPontoRegiao: function(tema){
833 862 //
834 863 var p = i3GEO.configura.locaplic+"/ferramentas/editortema/exec.php?funcao=adicionaGeometria&g_sid="+i3GEO.configura.sid,
... ...