Commit 9939cea628225480c33db9749df68dbb44067655
1 parent
8abde119
Exists in
master
and in
7 other branches
Atualização da biblioteca balloon-tooltips
Showing
5 changed files
with
39 additions
and
36 deletions
Show diff stats
classesjs/classe_mapa.js
... | ... | @@ -644,7 +644,7 @@ i3GEO.mapa = { |
644 | 644 | if(i3GEO.Interface.ATUAL === "googleearth") |
645 | 645 | {i3GEO.Interface.googleearth.aguarde.visibility = "visible";} |
646 | 646 | retorna = function(retorno){ |
647 | - var temp,rfes,n,balloon,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s, | |
647 | + var pos,temp,rfes,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s, | |
648 | 648 | configura = i3GEO.configura, |
649 | 649 | tipotip = configura.tipotip; |
650 | 650 | i = $i("i3geo_rosa"); |
... | ... | @@ -723,15 +723,15 @@ i3GEO.mapa = { |
723 | 723 | else{ |
724 | 724 | i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px"); |
725 | 725 | i3GEO.janela.TIPS.push('marcaIdentifica'); |
726 | - i3GEO.util.posicionaImagemNoMapa("marcaIdentifica"); | |
726 | + pos = i3GEO.util.posicionaImagemNoMapa("marcaIdentifica"); | |
727 | 727 | balloon = new Balloon(); |
728 | 728 | BalloonConfig(balloon,'GBox'); |
729 | 729 | balloon.delayTime = 0; |
730 | 730 | res = "<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>"; |
731 | 731 | temp = $i('marcaIdentifica'); |
732 | 732 | if(temp){ |
733 | - | |
734 | - balloon.showTooltip(temp,res); | |
733 | + balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]); | |
734 | + balloon.addCloseButton(); | |
735 | 735 | temp.onclick = function(e){ |
736 | 736 | if (!e){e = window.event;} |
737 | 737 | document.body.removeChild(balloon.getEventTarget(e)); | ... | ... |
classesjs/classe_util.js
... | ... | @@ -662,6 +662,10 @@ i3GEO.util = { |
662 | 662 | Parametros: |
663 | 663 | |
664 | 664 | id {string} - id do elemento que será posicionado |
665 | + | |
666 | + Return: | |
667 | + | |
668 | + array[top,left] - valores em pixel da posição calculada da imagem | |
665 | 669 | */ |
666 | 670 | posicionaImagemNoMapa: function(id){ |
667 | 671 | if(typeof(console) !== 'undefined'){console.info("i3GEO.util.posicionaImagemNoMapa()");} |
... | ... | @@ -672,6 +676,7 @@ i3GEO.util = { |
672 | 676 | i.style.position = "absolute"; |
673 | 677 | i.style.top = objposicaocursor.telay - my; |
674 | 678 | i.style.left = objposicaocursor.telax - mx; |
679 | + return [objposicaocursor.telay - my,objposicaocursor.telax - mx]; | |
675 | 680 | }, |
676 | 681 | /* |
677 | 682 | Function: escondePin | ... | ... |
classesjs/compactados/classe_mapa_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.mapa={AUTORESIZE:false,GEOXML:[],ativaAutoResize:function(){window.onresize=function(){var temp=setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");i3GEO.guias.escondeGuias()},2000)}},ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,imagemxref=0,imagemyref=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert("Essa operação não funciona nessa interface");return}i3GEO.php.ativalogo(i3GEO.atualiza)},verifica:function(retorno){try{i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o3"));if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{alert("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:true,ID:"",cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg,temp=function(retorno){var s,ins,elementos,i;if(i3GEO.mapa.legendaHTML.ID!==""&&$i(i3GEO.mapa.legendaHTML.ID)){if((retorno.data!=="erro")&&(retorno.data!==undefined)){s=i3GEO.configura.locaplic+"/imagens/branco.gif";ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -30px; top: -22px;">Mostra a legenda em uma janela</p></div>'}ins+="<div id='corpoLegi' >"+retorno.data.legenda+"</div>";$i(i3GEO.mapa.legendaHTML.ID).innerHTML=ins}}if($i("wlegenda")){$i("wlegenda").innerHTML=retorno.data.legenda;elementos=$i("wlegenda").getElementsByTagName("input");for(i=0;i<elementos.length;i+=1){elementos[i].style.display="none"}}};if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}idleg=$i("wlegenda");if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};i3GEO.janela.abreAguarde("redesenha",$trad("o1"));if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},libera:function(){var temp=function(retorno){var novoel,temp,n,i;if(!$i("moveLegi")){novoel=document.createElement("div");novoel.id="moveLegi";novoel.style.display="block";temp='<div class="hd" style=background:white >Legenda</div>';temp+='<div id="wlegenda" style="display:block;text-align:left;background-color:white;height:300px;width:300px;overflow:auto" ></div>';novoel.innerHTML=temp;document.body.appendChild(novoel);YAHOO.namespace("moveLegi.xp");YAHOO.moveLegi.xp.panel=new YAHOO.widget.ResizePanel("moveLegi",{width:"300px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:true,visible:true,draggable:true,modal:false,iframe:true});YAHOO.moveLegi.xp.panel.render()}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i<n;i+=1){temp[i].style.display="none"}YAHOO.moveLegi.xp.panel.show();$i("moveLegi_c").style.zIndex=100000;$i("moveLegi").style.border="1px solid gray"};i3GEO.mapa.legendaHTML.obtem(temp)}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' > </a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){if(g_tipoacao==="identifica"){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.identifica.criaJanelaFlutuante()","i3GEOF.identifica_script")}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo);return}}},verificaTipDefault:function(){var ntemas,etiquetas,j,retorna;ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="padrao"){$i("img").style.cursor="wait"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var temp,rfes,n,balloon,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span style='text-decoration:underline;text-align:left;font-size:9pt'><b>"+titulo+"</b></span><br>"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "){try{nds=ds.length;for(s=0;s<nds;s+=1){for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}ins+="<nl>";mostra=true}else{ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+valor+"</span><br>";mostra=true}}catch(e){}}}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.janela.TIPS.push('marcaIdentifica');i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip($i("marcaIdentifica"),res);temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e))}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};i3GEO.php.identifica2(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.mapa={AUTORESIZE:false,GEOXML:[],ativaAutoResize:function(){window.onresize=function(){var temp=setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");i3GEO.guias.escondeGuias()},2000)}},ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,imagemxref=0,imagemyref=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert("Essa operação não funciona nessa interface");return}i3GEO.php.ativalogo(i3GEO.atualiza)},verifica:function(retorno){try{i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o3"));if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{alert("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:true,ID:"",cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg,temp=function(retorno){var s,ins,elementos,i;if(i3GEO.mapa.legendaHTML.ID!==""&&$i(i3GEO.mapa.legendaHTML.ID)){if((retorno.data!=="erro")&&(retorno.data!==undefined)){s=i3GEO.configura.locaplic+"/imagens/branco.gif";ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -30px; top: -22px;">Mostra a legenda em uma janela</p></div>'}ins+="<div id='corpoLegi' >"+retorno.data.legenda+"</div>";$i(i3GEO.mapa.legendaHTML.ID).innerHTML=ins}}if($i("wlegenda")){$i("wlegenda").innerHTML=retorno.data.legenda;elementos=$i("wlegenda").getElementsByTagName("input");for(i=0;i<elementos.length;i+=1){elementos[i].style.display="none"}}};if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}idleg=$i("wlegenda");if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};i3GEO.janela.abreAguarde("redesenha",$trad("o1"));if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},libera:function(){var temp=function(retorno){var novoel,temp,n,i;if(!$i("moveLegi")){novoel=document.createElement("div");novoel.id="moveLegi";novoel.style.display="block";temp='<div class="hd" style=background:white >Legenda</div>';temp+='<div id="wlegenda" style="display:block;text-align:left;background-color:white;height:300px;width:300px;overflow:auto" ></div>';novoel.innerHTML=temp;document.body.appendChild(novoel);YAHOO.namespace("moveLegi.xp");YAHOO.moveLegi.xp.panel=new YAHOO.widget.ResizePanel("moveLegi",{width:"300px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:true,visible:true,draggable:true,modal:false,iframe:true});YAHOO.moveLegi.xp.panel.render()}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i<n;i+=1){temp[i].style.display="none"}YAHOO.moveLegi.xp.panel.show();$i("moveLegi_c").style.zIndex=100000;$i("moveLegi").style.border="1px solid gray"};i3GEO.mapa.legendaHTML.obtem(temp)}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' > </a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){if(g_tipoacao==="identifica"){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js.php";i3GEO.util.scriptTag(js,"i3GEOF.identifica.criaJanelaFlutuante()","i3GEOF.identifica_script")}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo);return}}},verificaTipDefault:function(){var ntemas,etiquetas,j,retorna;ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="padrao"){$i("img").style.cursor="wait"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var pos,temp,rfes,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span style='text-decoration:underline;text-align:left;font-size:9pt'><b>"+titulo+"</b></span><br>"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "){try{nds=ds.length;for(s=0;s<nds;s+=1){for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}ins+="<nl>";mostra=true}else{ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+valor+"</span><br>";mostra=true}}catch(e){}}}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.janela.TIPS.push('marcaIdentifica');pos=i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]);balloon.addCloseButton();temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e));balloon.hideTooltip()}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};i3GEO.php.identifica2(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
pacotes/balloon-tooltips/htdocs/js/balloon.js
... | ... | @@ -77,7 +77,7 @@ var Balloon = function () { |
77 | 77 | // This is the method that is called on mouseover. It has a built-in // |
78 | 78 | // delay time to avoid balloons popping up on rapid mouseover events // |
79 | 79 | ////////////////////////////////////////////////////////////////////////// |
80 | -Balloon.prototype.showTooltip = function(evt,caption,sticky,width,height) { | |
80 | +Balloon.prototype.showTooltip = function(evt,caption,sticky,width,height,x,y) { | |
81 | 81 | // If the objext is not configured by now, fall back to default |
82 | 82 | if (!this.configured) { |
83 | 83 | BalloonConfig(this,'GBubble'); |
... | ... | @@ -202,6 +202,9 @@ Balloon.prototype.showTooltip = function(evt,caption,sticky,width,height) { |
202 | 202 | this.width = width; |
203 | 203 | this.height = height; |
204 | 204 | this.actualWidth = null; |
205 | + //edmar | |
206 | + this.x = x; | |
207 | + this.y = y; | |
205 | 208 | |
206 | 209 | // make sure old balloons are removed |
207 | 210 | this.hideTooltip(); |
... | ... | @@ -283,6 +286,7 @@ Balloon.prototype.showTooltip = function(evt,caption,sticky,width,height) { |
283 | 286 | // Make delay time short for onmousedown |
284 | 287 | //var delay = mouseOver ? this.delayTime : 1; |
285 | 288 | //this.timeoutTooltip = window.setTimeout(this.doShowTooltip,delay); |
289 | + balloon.setActiveCoordinates([]); | |
286 | 290 | this.doShowTooltip(); |
287 | 291 | this.pending = true; |
288 | 292 | } |
... | ... | @@ -368,7 +372,7 @@ Balloon.prototype.doShowTooltip = function() { |
368 | 372 | |
369 | 373 | // close control for balloon or box |
370 | 374 | if (balloonIsSticky) { |
371 | - self.addCloseButton(); | |
375 | + self.addCloseButton(); | |
372 | 376 | } |
373 | 377 | |
374 | 378 | balloonIsVisible = true; |
... | ... | @@ -379,6 +383,7 @@ Balloon.prototype.doShowTooltip = function() { |
379 | 383 | |
380 | 384 | self.startX = self.activeLeft; |
381 | 385 | self.startY = self.activeTop; |
386 | + | |
382 | 387 | self.fade(0,self.opacity,self.fadeIn); |
383 | 388 | } |
384 | 389 | |
... | ... | @@ -396,6 +401,9 @@ Balloon.prototype.addCloseButton = function () { |
396 | 401 | closeButton.setAttribute('src',self.closeButton); |
397 | 402 | closeButton.onclick = function() { |
398 | 403 | Balloon.prototype.nukeTooltip(); |
404 | + var temp = $i('marcaIdentifica'); | |
405 | + if(temp) | |
406 | + {temp.parentNode.removeChild(temp);} | |
399 | 407 | }; |
400 | 408 | self.setStyle(closeButton,'position','absolute'); |
401 | 409 | document.body.appendChild(closeButton); |
... | ... | @@ -520,6 +528,7 @@ Balloon.prototype.setBalloonStyle = function(vOrient,hOrient,pageWidth,pageLeft) |
520 | 528 | |
521 | 529 | if (this.stem) { |
522 | 530 | var stem = document.createElement('img'); |
531 | + stem.style.zIndex = 50000; | |
523 | 532 | self.setStyle(stem,'position','absolute'); |
524 | 533 | balloon.appendChild(stem); |
525 | 534 | |
... | ... | @@ -747,7 +756,7 @@ Balloon.prototype.hideTooltip = function(override) { |
747 | 756 | // Garbage collection |
748 | 757 | Balloon.prototype.cleanup = function() { |
749 | 758 | var self = currentBalloonClass; |
750 | - var body; | |
759 | + var body; | |
751 | 760 | if (self) { |
752 | 761 | body = self.parent ? self.parent |
753 | 762 | : self.parentID ? document.getElementById(self.parentID) || document.body |
... | ... | @@ -756,13 +765,13 @@ Balloon.prototype.cleanup = function() { |
756 | 765 | else { |
757 | 766 | body = document.body; |
758 | 767 | } |
759 | - | |
760 | 768 | var bubble = document.getElementById('visibleBalloonElement'); |
761 | 769 | var close = document.getElementById('closeButton'); |
762 | 770 | var cont = document.getElementById('balloonPreloadContainer'); |
763 | 771 | if (bubble) { body.removeChild(bubble) } |
764 | 772 | if (close) { body.removeChild(close) } |
765 | 773 | if (cont) { body.removeChild(cont) } |
774 | + //edmar | |
766 | 775 | } |
767 | 776 | |
768 | 777 | |
... | ... | @@ -789,10 +798,6 @@ Balloon.prototype.setActiveCoordinates = function(evt) { |
789 | 798 | if (!evt) { |
790 | 799 | return true; |
791 | 800 | } |
792 | - // | |
793 | - //modificado por edmar | |
794 | - // | |
795 | - | |
796 | 801 | self.currentEvent = {}; |
797 | 802 | for (var i in evt) { |
798 | 803 | self.currentEvent[i] = evt[i]; |
... | ... | @@ -806,7 +811,8 @@ Balloon.prototype.setActiveCoordinates = function(evt) { |
806 | 811 | var scrollTop = 0; |
807 | 812 | var scrollLeft = 0; |
808 | 813 | |
809 | - var XY = self.eventXY(evt); | |
814 | + //var XY = self.eventXY(evt); | |
815 | + var XY = [self.x,self.y]; | |
810 | 816 | adjustment = self.hOffset < 20 ? 10 : 0; |
811 | 817 | self.activeTop = scrollTop + XY[1] - adjustment - self.vOffset - self.stemHeight; |
812 | 818 | self.activeLeft = scrollLeft + XY[0] - adjustment - self.hOffset; |
... | ... | @@ -854,7 +860,6 @@ Balloon.prototype.setActiveCoordinates = function(evt) { |
854 | 860 | } |
855 | 861 | } |
856 | 862 | } |
857 | - | |
858 | 863 | return true; |
859 | 864 | } |
860 | 865 | ... | ... |
pacotes/balloon-tooltips/htdocs/js/balloon.js~
... | ... | @@ -77,7 +77,7 @@ var Balloon = function () { |
77 | 77 | // This is the method that is called on mouseover. It has a built-in // |
78 | 78 | // delay time to avoid balloons popping up on rapid mouseover events // |
79 | 79 | ////////////////////////////////////////////////////////////////////////// |
80 | -Balloon.prototype.showTooltip = function(evt,caption,sticky,width,height) { | |
80 | +Balloon.prototype.showTooltip = function(evt,caption,sticky,width,height,x,y) { | |
81 | 81 | // If the objext is not configured by now, fall back to default |
82 | 82 | if (!this.configured) { |
83 | 83 | BalloonConfig(this,'GBubble'); |
... | ... | @@ -202,6 +202,9 @@ Balloon.prototype.showTooltip = function(evt,caption,sticky,width,height) { |
202 | 202 | this.width = width; |
203 | 203 | this.height = height; |
204 | 204 | this.actualWidth = null; |
205 | + //edmar | |
206 | + this.x = x; | |
207 | + this.y = y; | |
205 | 208 | |
206 | 209 | // make sure old balloons are removed |
207 | 210 | this.hideTooltip(); |
... | ... | @@ -368,7 +371,7 @@ Balloon.prototype.doShowTooltip = function() { |
368 | 371 | |
369 | 372 | // close control for balloon or box |
370 | 373 | if (balloonIsSticky) { |
371 | - self.addCloseButton(); | |
374 | + self.addCloseButton(); | |
372 | 375 | } |
373 | 376 | |
374 | 377 | balloonIsVisible = true; |
... | ... | @@ -379,6 +382,7 @@ Balloon.prototype.doShowTooltip = function() { |
379 | 382 | |
380 | 383 | self.startX = self.activeLeft; |
381 | 384 | self.startY = self.activeTop; |
385 | + | |
382 | 386 | self.fade(0,self.opacity,self.fadeIn); |
383 | 387 | } |
384 | 388 | |
... | ... | @@ -396,6 +400,9 @@ Balloon.prototype.addCloseButton = function () { |
396 | 400 | closeButton.setAttribute('src',self.closeButton); |
397 | 401 | closeButton.onclick = function() { |
398 | 402 | Balloon.prototype.nukeTooltip(); |
403 | + var temp = $i('marcaIdentifica'); | |
404 | + if(temp) | |
405 | + {temp.parentNode.removeChild(temp);} | |
399 | 406 | }; |
400 | 407 | self.setStyle(closeButton,'position','absolute'); |
401 | 408 | document.body.appendChild(closeButton); |
... | ... | @@ -520,6 +527,7 @@ Balloon.prototype.setBalloonStyle = function(vOrient,hOrient,pageWidth,pageLeft) |
520 | 527 | |
521 | 528 | if (this.stem) { |
522 | 529 | var stem = document.createElement('img'); |
530 | + stem.style.zIndex = 50000; | |
523 | 531 | self.setStyle(stem,'position','absolute'); |
524 | 532 | balloon.appendChild(stem); |
525 | 533 | |
... | ... | @@ -747,7 +755,7 @@ Balloon.prototype.hideTooltip = function(override) { |
747 | 755 | // Garbage collection |
748 | 756 | Balloon.prototype.cleanup = function() { |
749 | 757 | var self = currentBalloonClass; |
750 | - var body; | |
758 | + var body; | |
751 | 759 | if (self) { |
752 | 760 | body = self.parent ? self.parent |
753 | 761 | : self.parentID ? document.getElementById(self.parentID) || document.body |
... | ... | @@ -756,13 +764,13 @@ Balloon.prototype.cleanup = function() { |
756 | 764 | else { |
757 | 765 | body = document.body; |
758 | 766 | } |
759 | - | |
760 | 767 | var bubble = document.getElementById('visibleBalloonElement'); |
761 | 768 | var close = document.getElementById('closeButton'); |
762 | 769 | var cont = document.getElementById('balloonPreloadContainer'); |
763 | 770 | if (bubble) { body.removeChild(bubble) } |
764 | 771 | if (close) { body.removeChild(close) } |
765 | 772 | if (cont) { body.removeChild(cont) } |
773 | + //edmar | |
766 | 774 | } |
767 | 775 | |
768 | 776 | |
... | ... | @@ -789,21 +797,6 @@ Balloon.prototype.setActiveCoordinates = function(evt) { |
789 | 797 | if (!evt) { |
790 | 798 | return true; |
791 | 799 | } |
792 | - // | |
793 | - //modificado por edmar | |
794 | - // | |
795 | - alert(evt.id) | |
796 | - try{ | |
797 | - if(typeof(evt.id) == "string") | |
798 | - { | |
799 | - var pos = i3GEO.util.pegaPosicaoObjeto(event); | |
800 | - self.activeTop = pos[1] - 10; | |
801 | - self.activeLeft = pos[0] - 10; | |
802 | - self.activeRight = self.activeLeft + 20; | |
803 | - self.activeBottom = self.activeTop + 20; | |
804 | - return true; | |
805 | - } | |
806 | - }catch(e){} | |
807 | 800 | self.currentEvent = {}; |
808 | 801 | for (var i in evt) { |
809 | 802 | self.currentEvent[i] = evt[i]; |
... | ... | @@ -817,7 +810,8 @@ Balloon.prototype.setActiveCoordinates = function(evt) { |
817 | 810 | var scrollTop = 0; |
818 | 811 | var scrollLeft = 0; |
819 | 812 | |
820 | - var XY = self.eventXY(evt); | |
813 | + //var XY = self.eventXY(evt); | |
814 | + var XY = [self.x,self.y]; | |
821 | 815 | adjustment = self.hOffset < 20 ? 10 : 0; |
822 | 816 | self.activeTop = scrollTop + XY[1] - adjustment - self.vOffset - self.stemHeight; |
823 | 817 | self.activeLeft = scrollLeft + XY[0] - adjustment - self.hOffset; |
... | ... | @@ -865,7 +859,6 @@ Balloon.prototype.setActiveCoordinates = function(evt) { |
865 | 859 | } |
866 | 860 | } |
867 | 861 | } |
868 | - | |
869 | 862 | return true; |
870 | 863 | } |
871 | 864 | ... | ... |