From 0e959e96630185452a9fd22e7aa415e4d3414176 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Fri, 11 Dec 2009 13:27:44 +0000 Subject: [PATCH] #285 --- ferramentas/graficointerativo/index.js.php | 10 ++++++++++ ferramentas/tabela/index.js.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 0 deletions(-) diff --git a/ferramentas/graficointerativo/index.js.php b/ferramentas/graficointerativo/index.js.php index 164ec58..b1d84bb 100644 --- a/ferramentas/graficointerativo/index.js.php +++ b/ferramentas/graficointerativo/index.js.php @@ -233,6 +233,16 @@ i3GEOF.graficointerativo = { {i3GEOF.graficointerativo.inicia(divid);} else {i3GEOF.graficointerativo.inicia(divid,dados);} + temp = function(){ + if(i3GEO.Interface.ATUAL === "padrao"){ + i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.graficointerativo.obterDados()"); + } + if(i3GEO.Interface.ATUAL === "googlemaps"){ + GEvent.removeListener(graficointerativoDragend); + GEvent.removeListener(graficointerativoZoomend); + } + }; + YAHOO.util.Event.addListener(janela[0].close, "click", temp); }, /* Function: ativaFoco diff --git a/ferramentas/tabela/index.js.php b/ferramentas/tabela/index.js.php index 65b6651..0e4d848 100644 --- a/ferramentas/tabela/index.js.php +++ b/ferramentas/tabela/index.js.php @@ -206,6 +206,10 @@ i3GEOF.tabela = { ins += ' Considerar na listagem a região mostrada no mapa (se essa opção for desmarcada, será considerada a extensão geográfica do mapa inicial)'; ins += ' '; ins += ' '; + ins += ' '; + ins += ' Atualiza a tabela após navegar no mapa'; + ins += ' '; + ins += ' '; ins += ' '; ins += ' Mostrar na listagem apenas os selecionados'; ins += ' '; @@ -305,6 +309,16 @@ i3GEOF.tabela = { $i("i3GEOF.tabela_corpo").style.backgroundColor = "white"; i3GEOF.tabela.aguarde = $i("i3GEOF.tabela_imagemCabecalho").style; i3GEOF.tabela.inicia(divid); + temp = function(){ + if(i3GEO.Interface.ATUAL === "padrao"){ + i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.tabela.pegaRegistros()"); + } + if(i3GEO.Interface.ATUAL === "googlemaps"){ + GEvent.removeListener(tabelaDragend); + GEvent.removeListener(tabelaZoomend); + } + }; + YAHOO.util.Event.addListener(janela[0].close, "click", temp); }, /* Function: ativaFoco @@ -319,6 +333,34 @@ i3GEOF.tabela = { i.zIndex = 10000 + i3GEO.janela.ULTIMOZINDEX; }, /* + Function: ativaAutoAtualiza + + Ativa ou desativa a atualização automática da tabela quando o usuário navega no mapa + */ + ativaAutoAtualiza:function(obj){ + if(obj.checked == true){ + if(i3GEO.Interface.ATUAL === "padrao"){ + i3GEO.eventos.NAVEGAMAPA.push("i3GEOF.tabela.pegaRegistros()"); + } + if(i3GEO.Interface.ATUAL === "googlemaps"){ + tabelaDragend = GEvent.addListener(i3GeoMap, "dragend", function() {i3GEOF.tabela.pegaRegistros();}); + tabelaZoomend = GEvent.addListener(i3GeoMap, "zoomend", function() {i3GEOF.tebela.pegaRegistros();}); + } + if(i3GEO.Interface.ATUAL === "openlayers"){ + i3geoOL.events.register("moveend",i3geoOL,function(e){i3GEOF.tabela.pegaRegistros();}); + } + } + else{ + if(i3GEO.Interface.ATUAL === "padrao"){ + i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.tabela.pegaRegistros()"); + } + if(i3GEO.Interface.ATUAL === "googlemaps"){ + GEvent.removeListener(tabelaDragend); + GEvent.removeListener(tabelaZoomend); + } + } + }, + /* Function: pegaRegistros Pega os registros da tabela de atributos do tema -- libgit2 0.21.2