diff --git a/ferramentas/graficointerativo1/dicionario.js b/ferramentas/graficointerativo1/dicionario.js
index 2d6342e..3d439ac 100755
--- a/ferramentas/graficointerativo1/dicionario.js
+++ b/ferramentas/graficointerativo1/dicionario.js
@@ -1,316 +1,430 @@
//+$trad(1,i3GEOF.graficointerativo1.dicionario)+
-i3GEOF.graficointerativo1.dicionario = {
- 1: [{
- pt:"Tipo",
- en:"",
- es:"",
- it:""
- }],
- 2: [{
- pt:"Dados",
- en:"",
- es:"",
- it:""
- }],
- 3: [{
- pt:"Gráfico",
- en:"",
- es:"",
- it:""
- }],
- 4: [{
- pt:"Escolha o tipo de gráfico",
- en:"",
- es:"",
- it:""
- }],
- 5: [{
- pt:"pizza 2d",
- en:"",
- es:"",
- it:""
- }],
- 6: [{
- pt:"área simples",
- en:"",
- es:"",
- it:""
- }],
- 7: [{
- pt:"distribuição de pontos",
- en:"",
- es:"",
- it:""
- }],
- 8: [{
- pt:"linhas simples",
- en:"",
- es:"",
- it:""
- }],
- 9: [{
- pt:"Árvore",
- en:"",
- es:"",
- it:""
- }],
- 10: [{
- pt:"barras verticais",
- en:"",
- es:"",
- it:""
- }],
- 11: [{
- pt:"barras horizontais",
- en:"",
- es:"",
- it:""
- }],
- 12: [{
- pt:"Configuração do gráfico",
- en:"",
- es:"",
- it:""
- }],
- 13: [{
- pt:"Tema",
- en:"",
- es:"",
- it:""
- }],
- 14: [{
- pt:"Item com as classes ou eixo X",
- en:"",
- es:"",
- it:""
- }],
- 15: [{
- pt:"Item(ns) com os valores ou eixo Y",
- en:"",
- es:"",
- it:""
- }],
- 16: [{
- pt:"Excluir o seguinte valor",
- en:"",
- es:"",
- it:""
- }],
- 17: [{
- pt:"gera cores aleatórias",
- en:"",
- es:"",
- it:""
- }],
- 18: [{
- pt:"Obter dados",
- en:"",
- es:"",
- it:""
- }],
- 19: [{
- pt:"Se vc escolher para X e Y o mesmo item, será considerada a frequência das ocorrências para compor cada parte da pizza. Caso contrário, será feita a soma dos valores existentes em Y para cada ocorrência existente em X.",
- en:"",
- es:"",
- it:""
- }],
- 20: [{
- pt:"Inclina os textos do eixo X",
- en:"",
- es:"",
- it:""
- }],
- 21: [{
- pt:"Adiciona as linhas em gráficos de barras",
- en:"",
- es:"",
- it:""
- }],
- 22: [{
- pt:"Utiliza valores acumulados",
- en:"",titleFont: 'bold 14px sans-serif',
- titlePosition: "top",
- es:"",
- it:""
- }],
- 23: [{
- pt:"Utiliza valores relativos",
- en:"",
- es:"",
- it:""
- }],
- 24: [{
- pt:"Ordena o eixo X",
- en:"",
- es:"",
- it:""
- }],
- 25: [{
- pt:"Não processa os valores ao obter os dados (mantém os dados como estão na tabela de atributos) - essa opção é útil nos gráficos de distribuição de pontos",
- en:"",
- es:"",
- it:""
- }],
- 26: [{
- pt:"Soma",
- en:"",
- es:"",
- it:""
- }],
- 27: [{
- pt:"Média",
- en:"",
- es:"",
- it:""
- }],
- 28: [{
- pt:"Tipo de agregação dos valores do eixo Y",
- en:"",
- es:"",
- it:""
- }],
- 29: [{
- pt:"Fator de cálculo da largura do gráfico. O número de ocorrências será multiplicado por esse fator para calcular o tamanho final do gráfico em pixels. Deixe como 0 para usar o cálculo automático.",
- en:"",
- es:"",
- it:""
- }],
- 30: [{
- pt:"abrir em uma janela separada",
- en:"",
- es:"",
- it:""
- }],
- 31: [{
- pt:"Escolha um tipo de grafico",
- en:"",
- es:"",
- it:""
- }],
- 32: [{
- pt:"erro ao ler os itens do tema de origem",
- en:"",
- es:"",
- it:""
- }],
- 33: [{
- pt:"Digite o título para legenda",
- en:"",
- es:"",
- it:""
- }],
- 34: [{
- pt:"Escolha um tema",
- en:"",
- es:"",
- it:""
- }],
- 35: [{
- pt:"Escolha um item para X",
- en:"",
- es:"",
- it:""
- }],
- 36: [{
- pt:"Escolha um item para Y",
- en:"",
- es:"",
- it:""
- }],
- 37: [{
- pt:"Os dados utilizados referem-se apenas à região atual mostrada no mapa",
- en:"",
- es:"",
- it:""
- }],
- 38: [{
- pt:"Tabela de dados para o gráfico. Os valores podem ser editados",
- en:"",
- es:"",
- it:""
- }],
- 39: [{
- pt:"nome",
- en:"",
- es:"",
- it:""
- }],
- 40: [{
- pt:"valor",
- en:"",
- es:"",
- it:""
- }],
- 41: [{
- pt:"cor",
- en:"",
- es:"",
- it:""
- }],
- 42: [{
- pt:"excluir",
- en:"",
- es:"",
- it:""
- }],
- 43: [{
- pt:"digite o novo nome",
- en:"",
- es:"",
- it:""
- }],
- 44: [{
- pt:"digite o novo valor",
- en:"",
- es:"",
- it:""
- }],
- 45: [{
- pt:"casos",
- en:"",
- es:"",
- it:""
- }],
- 46: [{
- pt:"n. de casos",
- en:"",
- es:"",
- it:""
- }],
- 47: [{
- pt:"Atualiza o gráfico ao navegar pelo mapa",
- en:"",
- es:"",
- it:""
- }],
- 48: [{
- pt:"Utiliza barras divididas entre os valores (stacked)",
- en:"",
- es:"",
- it:""
- }],
- 49: [{
- pt:"As linhas de dados ficam nas colunas",
- en:"",
- es:"",
- it:""
- }],
- 50: [{
- pt:"Título",
- en:"",
- es:"",
- it:""
- }],
- 51: [{
- pt:"Título do eixo X",
- en:"",
- es:"",
- it:""
- }],
- 52: [{
- pt:"Título do eixo Y",
- en:"",
- es:"",
- it:""
- }]
-};
\ No newline at end of file
+i3GEOF.graficointerativo1.dicionario =
+ {
+ 1 : [
+ {
+ pt : "Tipo",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 2 : [
+ {
+ pt : "Dados",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 3 : [
+ {
+ pt : "Gráfico",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 4 : [
+ {
+ pt : "Escolha o tipo de gráfico",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 5 : [
+ {
+ pt : "pizza 2d",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 6 : [
+ {
+ pt : "área simples",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 7 : [
+ {
+ pt : "distribuição de pontos",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 8 : [
+ {
+ pt : "linhas simples",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 9 : [
+ {
+ pt : "Árvore",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 10 : [
+ {
+ pt : "barras verticais",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 11 : [
+ {
+ pt : "barras horizontais",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 12 : [
+ {
+ pt : "Configuração do gráfico",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 13 : [
+ {
+ pt : "Tema",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 14 : [
+ {
+ pt : "Item com as classes ou eixo X",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 15 : [
+ {
+ pt : "Item(ns) com os valores ou eixo Y",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 16 : [
+ {
+ pt : "Excluir o seguinte valor",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 17 : [
+ {
+ pt : "gera cores aleatórias",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 18 : [
+ {
+ pt : "Obter dados",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 19 : [
+ {
+ pt : "Se vc escolher para X e Y o mesmo item, será considerada a frequência das ocorrências para compor cada parte da pizza. Caso contrário, será feita a soma dos valores existentes em Y para cada ocorrência existente em X.",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 20 : [
+ {
+ pt : "Inclina os textos do eixo X",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 21 : [
+ {
+ pt : "Adiciona as linhas em gráficos de barras",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 22 : [
+ {
+ pt : "Utiliza valores acumulados",
+ en : "",
+ titleFont : 'bold 14px sans-serif',
+ titlePosition : "top",
+ es : "",
+ it : ""
+ }
+ ],
+ 23 : [
+ {
+ pt : "Utiliza valores relativos",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 24 : [
+ {
+ pt : "Ordena o eixo X",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 25 : [
+ {
+ pt : "Não processa os valores ao obter os dados (mantém os dados como estão na tabela de atributos) - essa opção é útil nos gráficos de distribuição de pontos",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 26 : [
+ {
+ pt : "Soma",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 27 : [
+ {
+ pt : "Média",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 28 : [
+ {
+ pt : "Tipo de agregação dos valores do eixo Y",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 29 : [
+ {
+ pt : "Fator de cálculo da largura do gráfico. O número de ocorrências será multiplicado por esse fator para calcular o tamanho final do gráfico em pixels. Deixe como 0 para usar o cálculo automático.",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 30 : [
+ {
+ pt : "abrir em uma janela separada",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 31 : [
+ {
+ pt : "Escolha um tipo de grafico",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 32 : [
+ {
+ pt : "erro ao ler os itens do tema de origem",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 33 : [
+ {
+ pt : "Digite o título para legenda",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 34 : [
+ {
+ pt : "Escolha um tema",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 35 : [
+ {
+ pt : "Escolha um item para X",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 36 : [
+ {
+ pt : "Escolha um item para Y",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 37 : [
+ {
+ pt : "Os dados utilizados referem-se apenas à região atual mostrada no mapa",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 38 : [
+ {
+ pt : "Tabela de dados para o gráfico. Os valores podem ser editados",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 39 : [
+ {
+ pt : "nome",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 40 : [
+ {
+ pt : "valor",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 41 : [
+ {
+ pt : "cor",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 42 : [
+ {
+ pt : "excluir",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 43 : [
+ {
+ pt : "digite o novo nome",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 44 : [
+ {
+ pt : "digite o novo valor",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 45 : [
+ {
+ pt : "casos",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 46 : [
+ {
+ pt : "n. de casos",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 47 : [
+ {
+ pt : "Atualiza o gráfico ao navegar pelo mapa",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 48 : [
+ {
+ pt : "Utiliza barras divididas entre os valores (stacked)",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 49 : [
+ {
+ pt : "As linhas de dados ficam nas colunas",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 50 : [
+ {
+ pt : "Título",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 51 : [
+ {
+ pt : "Título do eixo X",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 52 : [
+ {
+ pt : "Título do eixo Y",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ],
+ 53 : [
+ {
+ pt : "Atualiza ao navegar",
+ en : "",
+ es : "",
+ it : ""
+ }
+ ]
+ };
\ No newline at end of file
diff --git a/ferramentas/graficointerativo1/index.js b/ferramentas/graficointerativo1/index.js
index 113a0d8..1be9637 100755
--- a/ferramentas/graficointerativo1/index.js
+++ b/ferramentas/graficointerativo1/index.js
@@ -1,123 +1,115 @@
-/*
-Title: Gráfico interativo 1
-
-Representação gráfica de dados. O gráfico é construído tendo como base os atributos de um tema e é modificado
-conforme o usuário navega pelo mapa. A renderização do gráfico é feito pelo navegador por meio do aplicativo openflashchart.
-Os dados que serão utilizados no gráfico são baseados em um elemento TABLE. Esse elemento pode ser montado com base na tabela
-de atributos e editada pelo usuário. Os dados podem também ser inseridos como par�metros na inicialização da ferramenta,
-permitindo que o gráfico seja utilizado por outras ferramentas.
-
-Veja:
-
-
-
-Arquivo:
-
-i3geo/ferramentas/graficointerativo1/index.js.php
-
-Licenca:
-
-GPL2
-
-i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet
-
-Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil
-Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com
-
-Este programa é software livre; você pode redistribuí-lo
-e/ou modificá-lo sob os termos da Licença Pública Geral
-GNU conforme publicada pela Free Software Foundation;
-
-Este programa é distribuído na expectativa de que seja útil,
-porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita
-de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA.
-Consulte a Licença Pública Geral do GNU para mais detalhes.
-Você deve ter recebido uma cópia da Licença Pública Geral do
-GNU junto com este programa; se não, escreva para a
-Free Software Foundation, Inc., no endereço
-59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
+/**
+ * Title: Gráfico interativo 1
+ *
+ * Representação gráfica de dados. O gráfico é construído tendo como base os atributos de um tema
+ * e é modificado conforme o usuário navega pelo mapa. A renderização do gráfico é feito pelo
+ * navegador por meio do aplicativo openflashchart. Os dados que serão utilizados no gráfico são baseados em um
+ * elemento TABLE. Esse elemento pode ser montado com base na tabela de atributos e editada pelo usuário. Os dados podem
+ * também ser inseridos como parâmetros na inicialização da ferramenta, permitindo que o gráfico seja
+ * utilizado por outras ferramentas.
+ *
+ * Veja:
+ *
+ *
+ *
+ * Arquivo:
+ *
+ * i3geo/ferramentas/graficointerativo1/index.js.php
+ *
+ * Licenca:
+ *
+ * GPL2
+ *
+ * i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet
+ *
+ * Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com
+ *
+ * Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo sob os termos da Licença
+ * Pública Geral GNU conforme publicada pela Free Software Foundation;
+ *
+ * Este programa é distribuído na expectativa de que seja útil, porém, SEM NENHUMA GARANTIA; nem mesmo a
+ * garantia implícita de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença
+ * Pública Geral do GNU para mais detalhes. Você deve ter recebido uma cópia da Licença Pública Geral do
+ * GNU junto com este programa; se não, escreva para a Free Software Foundation, Inc., no endereço 59 Temple Street, Suite
+ * 330, Boston, MA 02111-1307 USA.
*/
if (typeof (i3GEOF) === 'undefined') {
var i3GEOF = {};
}
-/*
+/**
* Classe: i3GEOF.graficointerativo1
- *
+ *
*/
-i3GEOF.graficointerativo1 = {
- /*
- * Variavel: aguarde
- *
- * Estilo do objeto DOM com a imagem de aguarde existente no
- * cabeçalho da janela.
+i3GEOF.graficointerativo1 =
+ {
+ /**
+ * Array com os ids das janelas ja criadas
*/
- aguarde : "",
- /*
+ janelas : [],
+ propJanelas : {},
+ /**
* Propriedade: dados
- *
+ *
* Dados que serao utilizados. Pode ser passado como parametro.
- *
+ *
* Default: {false}
*/
dados : false,
- /*
+ /**
* Propriedade: titulo
- *
- * Título do gráfico. Se for vazio, será obtido do nome
- * do tema selecionado
+ *
+ * Título do gráfico. Se for vazio, será obtido do nome do tema selecionado
*/
titulo : "",
- /*
+ /**
* Propriedade: tipo
- *
+ *
* Tipo de gráfico escolhido pelo usuário.
*/
tipo : "",
- /*
+ /**
* Propriedade: acumula
- *
+ *
* Acumula os valores ao gerar o gráfico
- *
+ *
* Type: {boolean}
- *
+ *
* Default: {false}
*/
acumula : false,
- /*
+ /**
* Propriedade: relativa
- *
+ *
* Utiliza valores relativos ao criar o gráfico
- *
+ *
* Type: {boolean}
- *
+ *
* Default: {false}
*/
relativa : false,
- /*
+ /**
* Propriedade: dadospuros
- *
- * Não faz nenhum tipo de processamento nos dados antes de gerar o
- * gráfico
- *
+ *
+ * Não faz nenhum tipo de processamento nos dados antes de gerar o gráfico
+ *
* Type: {boolean}
- *
+ *
* Default: {false}
*/
dadospuros : false,
- /*
+ /**
* Propriedade: navegacao
- *
- * Ativa ou não a navegação din�mica do mapa
- *
+ *
+ * Ativa ou não a navegação dinâmica do mapa
+ *
* Type: {boolean}
- *
+ *
* Default: {false}
*/
navegacao : false,
- /*
- * Para efeitos de compatibilidade antes da versão 4.7 que não
- * tinha dicionário
+ /**
+ * Para efeitos de compatibilidade antes da versão 4.7 que não tinha dicionário
*/
criaJanelaFlutuante : function(dados) {
if (dados) {
@@ -125,636 +117,628 @@ i3GEOF.graficointerativo1 = {
}
i3GEOF.graficointerativo1.iniciaDicionario();
},
- /*
+ /**
* Function: iniciaDicionario
- *
- * Carrega o dicionário e chama a função que inicia a
- * ferramenta
- *
- * O Javascript é carregado com o id
- * i3GEOF.nomedaferramenta.dicionario_script
+ *
+ * Carrega o dicionário e chama a função que inicia a ferramenta
+ *
+ * O Javascript é carregado com o id i3GEOF.nomedaferramenta.dicionario_script
*/
iniciaDicionario : function(dados) {
if (dados) {
i3GEOF.graficointerativo1.dados = dados;
}
+ var temp = function() {
+ i3GEOF.graficointerativo1.ativaNavegacao();
+ i3GEOF.graficointerativo1.iniciaJanelaFlutuante(dados);
+ };
if (typeof (i3GEOF.graficointerativo1.dicionario) === 'undefined') {
- i3GEO.util.scriptTag(i3GEO.configura.locaplic
- + "/ferramentas/graficointerativo1/dependencias.php",
- "i3GEOF.graficointerativo1.iniciaJanelaFlutuante()",
- "i3GEOF.graficointerativo1.dicionario_script");
+ i3GEO.util.scriptTag(
+ i3GEO.configura.locaplic + "/ferramentas/graficointerativo1/dependencias.php",
+ temp,
+ "i3GEOF.graficointerativo1.dicionario_script");
} else {
i3GEOF.graficointerativo1.iniciaJanelaFlutuante(dados);
}
},
- /*
+ /**
* Function: inicia
- *
+ *
* Inicia a ferramenta. É chamado por criaJanelaFlutuante
- *
+ *
* Parametros:
- *
- * iddiv {String} - id do div que receberá o conteudo HTML da
- * ferramenta
- *
+ *
+ * iddiv {String} - id do div que receberá o conteudo HTML da ferramenta
+ *
* dados {JSON} - dados para o gráfico (opcional) exemplo
* ["n;x","'Argentina';33796870","'Paraguay';4773464","'Brazil';151525400","'Chile';13772710"]
*/
- inicia : function(iddiv) {
+ inicia : function(iddiv, idjanela) {
// try{
- $i(iddiv).innerHTML += i3GEOF.graficointerativo1.html();
- $i("i3GEOgraficointerativo1Acumula").checked = i3GEOF.graficointerativo1.acumula;
- $i("i3GEOgraficointerativo1Relativa").checked = i3GEOF.graficointerativo1.relativa;
- $i("i3GEOgraficointerativo1DadosPuros").checked = i3GEOF.graficointerativo1.dadospuros;
- if (i3GEOF.graficointerativo1.navegacao === true) {
- i3GEOF.graficointerativo1.ativaNavegacao(true);
- }
- // eventos das guias
-
- //tipos de graficos
- $i("i3GEOgraficointerativo1guia1").onclick = function() {
- i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativo1guia1",
- "i3GEOgraficointerativo1guia");
- $i("i3GEOgraficointerativo1Grafico").style.display = "none";
+ $i(iddiv).innerHTML += i3GEOF.graficointerativo1.html(idjanela);
+ $i(idjanela + "i3GEOgraficointerativo1Acumula").checked = i3GEOF.graficointerativo1.propJanelas[idjanela].acumula;
+ $i(idjanela + "i3GEOgraficointerativo1Relativa").checked = i3GEOF.graficointerativo1.propJanelas[idjanela].relativa;
+ $i(idjanela + "i3GEOgraficointerativo1DadosPuros").checked = i3GEOF.graficointerativo1.propJanelas[idjanela].dadospuros;
+ // tipos de graficos
+ $i(idjanela + "i3GEOgraficointerativo1guia1").onclick = function() {
+ i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOgraficointerativo1guia1", idjanela + "i3GEOgraficointerativo1guia");
+ $i(idjanela + "i3GEOgraficointerativo1Grafico").style.display = "none";
};
- //dados para o grafico
- $i("i3GEOgraficointerativo1guia2").onclick = function() {
- if(i3GEOF.graficointerativo1.tipo === ""){
+ // dados para o grafico
+ $i(idjanela + "i3GEOgraficointerativo1guia2").onclick = function() {
+ if (i3GEOF.graficointerativo1.propJanelas[idjanela].tipo === "") {
alert($trad(4, i3GEOF.graficointerativo1.dicionario));
return;
}
- i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativo1guia2","i3GEOgraficointerativo1guia");
- i3GEOF.graficointerativo1.configuraDados();
- $i("i3GEOgraficointerativo1Grafico").style.display = "none";
+ i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOgraficointerativo1guia2", idjanela + "i3GEOgraficointerativo1guia");
+ i3GEOF.graficointerativo1.configuraDados(idjanela);
+ $i(idjanela + "i3GEOgraficointerativo1Grafico").style.display = "none";
};
- //propriedades adicionais
- $i("i3GEOgraficointerativo1guia3").onclick = function() {
- i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativo1guia3",
- "i3GEOgraficointerativo1guia");
- $i("i3GEOgraficointerativo1Grafico").style.display = "none";
+ // propriedades adicionais
+ $i(idjanela + "i3GEOgraficointerativo1guia3").onclick = function() {
+ i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOgraficointerativo1guia3", idjanela + "i3GEOgraficointerativo1guia");
+ $i(idjanela + "i3GEOgraficointerativo1Grafico").style.display = "none";
};
- //mostra o grafico
- $i("i3GEOgraficointerativo1guia4").onclick = function() {
- if(i3GEOF.graficointerativo1.tipo === ""){
+ // mostra o grafico
+ $i(idjanela + "i3GEOgraficointerativo1guia4").onclick = function() {
+ if (i3GEOF.graficointerativo1.propJanelas[idjanela].tipo === "") {
alert($trad(4, i3GEOF.graficointerativo1.dicionario));
return;
}
- if($i("i3GEOgraficointerativo1Dados").innerHTML === ""){
+ if ($i(idjanela + "i3GEOgraficointerativo1Dados").innerHTML === "") {
return;
}
- i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativo1guia4","i3GEOgraficointerativo1guia");
- var t = $i("i3GEOgraficointerativo1Grafico");
+ i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOgraficointerativo1guia4", idjanela + "i3GEOgraficointerativo1guia");
+ var t = $i(idjanela + "i3GEOgraficointerativo1Grafico");
t.style.display = "block";
t.style.position = "relative";
t.style.top = "-5px";
t.visibility = "visible";
- i3GEOF.graficointerativo1.tabela2dados();
- };
- $i("i3GEOgraficointerativo1guia5").onclick = function() {
- if(i3GEOF.graficointerativo1.tipo === ""){
- alert($trad(4, i3GEOF.graficointerativo1.dicionario));
- return;
- }
- if($i("i3GEOgraficointerativo1Dados").innerHTML === ""){
- return;
- }
- i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativo1guia5","i3GEOgraficointerativo1guia");
- $i("i3GEOgraficointerativo1Grafico").style.display = "none";
- $i("i3GEOgraficointerativo1guia5obj").innerHTML = "";
- };
- $i("i3GEOgraficointerativo1guia6").onclick = function() {
- if(i3GEOF.graficointerativo1.tipo === ""){
- alert($trad(4, i3GEOF.graficointerativo1.dicionario));
- return;
- }
- if($i("i3GEOgraficointerativo1Dados").innerHTML === ""){
- return;
- }
- var w,h,form = $i("i3GEOgraficointerativo1PNG"),
- isvg = form.getElementsByTagName("input")[0],
- svg = $i("i3GEOgraficointerativo1guia4objCanvas").firstChild;
- h = svg.getAttributeNS(null, 'height');
- w = svg.getAttributeNS(null, 'width');
- if (typeof XMLSerializer != "undefined"){
- svg = (new XMLSerializer()).serializeToString(svg);
- } else {
- svg = svg.html();
- }
- isvg.value = svg;
- form.action = form.action+"?"+"w="+w+"&h="+h;
- form.submit();
+ i3GEOF.graficointerativo1.tabela2dados(idjanela);
};
- i3GEOF.graficointerativo1.ativaFoco();
- i3GEOF.graficointerativo1.comboTemas();
- new YAHOO.widget.Button("i3GEOgraficointerativo1botao1", {
+ $i(idjanela + "i3GEOgraficointerativo1guia5").onclick =
+ function() {
+ if (i3GEOF.graficointerativo1.tipo === "") {
+ alert($trad(4, i3GEOF.graficointerativo1.dicionario));
+ return;
+ }
+ if ($i(idjanela + "i3GEOgraficointerativo1Dados").innerHTML === "") {
+ return;
+ }
+ i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOgraficointerativo1guia5", idjanela + "i3GEOgraficointerativo1guia");
+ $i(idjanela + "i3GEOgraficointerativo1Grafico").style.display = "none";
+ $i(idjanela + "i3GEOgraficointerativo1guia5obj").innerHTML =
+ "";
+ };
+ $i(idjanela + "i3GEOgraficointerativo1guia6").onclick =
+ function() {
+ if (i3GEOF.graficointerativo1.tipo === "") {
+ alert($trad(4, i3GEOF.graficointerativo1.dicionario));
+ return;
+ }
+ if ($i(idjanela + "i3GEOgraficointerativo1Dados").innerHTML === "") {
+ return;
+ }
+ var w, h, form = $i(idjanela + "i3GEOgraficointerativo1PNG"), isvg = form.getElementsByTagName("input")[0], svg =
+ $i(idjanela + "i3GEOgraficointerativo1guia4objCanvas").firstChild;
+ h = svg.getAttributeNS(null, 'height');
+ w = svg.getAttributeNS(null, 'width');
+ if (typeof XMLSerializer != "undefined") {
+ svg = (new XMLSerializer()).serializeToString(svg);
+ } else {
+ svg = svg.html();
+ }
+ isvg.value = svg;
+ form.action = form.action + "?" + "w=" + w + "&h=" + h;
+ form.submit();
+ };
+ i3GEOF.graficointerativo1.ativaFoco(idjanela);
+ i3GEOF.graficointerativo1.comboTemas(idjanela);
+ new YAHOO.widget.Button(idjanela + "i3GEOgraficointerativo1botao1", {
onclick : {
- fn : i3GEOF.graficointerativo1.obterDados
+ fn : function() {
+ i3GEOF.graficointerativo1.obterDados(idjanela);
+ }
}
});
- if (i3GEOF.graficointerativo1.dados && i3GEOF.graficointerativo1.dados != "undefined") {
- i3GEOF.graficointerativo1.montaTabelaDados(i3GEOF.graficointerativo1.dados);
- $i("i3GEOgraficointerativo1guia4").onclick.call();
- }
- else{
- i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativo1guia1","i3GEOgraficointerativo1guia");
+ if (i3GEOF.graficointerativo1.propJanelas[idjanela].dados
+ && i3GEOF.graficointerativo1.propJanelas[idjanela].dados != "undefined") {
+ i3GEOF.graficointerativo1.montaTabelaDados(idjanela, i3GEOF.graficointerativo1.propJanelas[idjanela].dados);
+ $i(idjanela + "i3GEOgraficointerativo1guia4").onclick.call();
+ } else {
+ i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOgraficointerativo1guia1", idjanela + "i3GEOgraficointerativo1guia");
}
},
- /*
+ /**
* Function: html
- *
- * Gera o código html para apresentação das
- * opções da ferramenta
- *
+ *
+ * Gera o código html para apresentação das opções da ferramenta
+ *
* Retorno:
- *
+ *
* String com o código html
*/
- html : function() {
- var locaplic = i3GEO.configura.locaplic, ins = ''
- + ' '
- //tipos de grafico
- + ''
- + '
'
- + $trad(4, i3GEOF.graficointerativo1.dicionario)
- + ':
'
- + '
'
- + '
'
- //obtencao dos dados e parametros
- + ''
- + '
'
- + $trad(12, i3GEOF.graficointerativo1.dicionario)
- + ':
'
- + '
'
- + $trad(13, i3GEOF.graficointerativo1.dicionario)
- + ':
'
- + '
'
- + '
'
- + $trad(50, i3GEOF.graficointerativo1.dicionario)
- + ': '
- + $inputText("", "", "i3GEOgraficointerativo1Titulo", "", 40,"")
- + '
'
- + $trad(51, i3GEOF.graficointerativo1.dicionario)
- + ': '
- + $inputText("", "", "i3GEOgraficointerativo1TituloX", "", 40,"")
- + '
'
- + $trad(52, i3GEOF.graficointerativo1.dicionario)
- + ': '
- + $inputText("", "", "i3GEOgraficointerativo1TituloY", "", 40,"")
+ html : function(idjanela) {
+ var locaplic = i3GEO.configura.locaplic, ins = '';
+ ins =
+ '
'
+ // tipos de grafico
+ + '
'
+ + '
'
+ + $trad(4, i3GEOF.graficointerativo1.dicionario)
+ + ':
'
+ + '
' + '
'
+ // obtencao dos dados e parametros
+ + '
'
+ + '
' + $trad(12, i3GEOF.graficointerativo1.dicionario) + ':
' + '
'
+ + $trad(13, i3GEOF.graficointerativo1.dicionario) + ':
' + '
' + '
'
+ + $trad(50, i3GEOF.graficointerativo1.dicionario) + ': '
+ + $inputText("", "", idjanela + "i3GEOgraficointerativo1Titulo", "", 40, "") + '
'
+ + $trad(51, i3GEOF.graficointerativo1.dicionario) + ': '
+ + $inputText("", "", idjanela + "i3GEOgraficointerativo1TituloX", "", 40, "") + '
'
+ + $trad(52, i3GEOF.graficointerativo1.dicionario) + ': '
+ + $inputText("", "", idjanela + "i3GEOgraficointerativo1TituloY", "", 40, "") + '
' + '
' + $trad(14, i3GEOF.graficointerativo1.dicionario)
+ + ':
' + '
' + '
'
+ + '
' + '
'
+ + $trad(15, i3GEOF.graficointerativo1.dicionario) + ':
' + '
' + '
' + '
'
+ + $trad(16, i3GEOF.graficointerativo1.dicionario) + ': '
+ + $inputText("", "", idjanela + "i3GEOgraficointerativo1excluir", "", 3, "")
+ + '
' + $trad(17, i3GEOF.graficointerativo1.dicionario) + '
'
+ + '
' + '
' + '
' + $trad(19, i3GEOF.graficointerativo1.dicionario) + '
' + '
'
+ // propriedades adicionais
+ + '
'
+ + '
' + $trad(20, i3GEOF.graficointerativo1.dicionario) + '
'
+ + '
' + $trad(21, i3GEOF.graficointerativo1.dicionario) + '
'
+ + '
' + $trad(22, i3GEOF.graficointerativo1.dicionario) + '
'
+ + '
' + $trad(23, i3GEOF.graficointerativo1.dicionario) + ' (%)
'
+ + '
' + $trad(24, i3GEOF.graficointerativo1.dicionario) + '
'
+ + '
' + $trad(25, i3GEOF.graficointerativo1.dicionario) + '
' +
- + '
'
- + '
'
- + $trad(14, i3GEOF.graficointerativo1.dicionario)
- + ':
'
- + '
'
- + '
'
- + '
'
- + '
'
- + $trad(15, i3GEOF.graficointerativo1.dicionario)
- + ':
'
- + '
'
- + '
'
- + '
'
- + $trad(16, i3GEOF.graficointerativo1.dicionario)
- + ': '
- + $inputText("", "", "i3GEOgraficointerativo1excluir", "", 3,
- "")
- + '
'
- + $trad(17, i3GEOF.graficointerativo1.dicionario)
- + '
'
- + '
'
- + '
'
- + '
'
- + $trad(19, i3GEOF.graficointerativo1.dicionario)
- + '
'
- + '
'
- //propriedades adicionais
- + '
'
- + '
'
- + $trad(20, i3GEOF.graficointerativo1.dicionario)
- + '
'
- + '
'
- + $trad(21, i3GEOF.graficointerativo1.dicionario)
- + '
'
- + '
'
- + $trad(22, i3GEOF.graficointerativo1.dicionario)
- + '
'
- + '
'
- + $trad(23, i3GEOF.graficointerativo1.dicionario)
- + ' (%)
'
- + '
'
- + $trad(24, i3GEOF.graficointerativo1.dicionario)
- + '
'
- + '
'
- + $trad(25, i3GEOF.graficointerativo1.dicionario)
- + '
'
- + '
'
- + $trad(47, i3GEOF.graficointerativo1.dicionario)
- + '
'
- + '
'
- + $trad(48, i3GEOF.graficointerativo1.dicionario)
- + '
'
- + '
'
- + $trad(49, i3GEOF.graficointerativo1.dicionario)
- + '
'
- + '
'
- + $trad(26, i3GEOF.graficointerativo1.dicionario)
- + ' '
- + $trad(27, i3GEOF.graficointerativo1.dicionario)
- + ' '
- + $trad(28, i3GEOF.graficointerativo1.dicionario)
- + '
'
- + '
'
- + $trad(29, i3GEOF.graficointerativo1.dicionario)
- + '
'
- + '
'
- //aqui vai o grafico
- + '
'
- //csv
- + '
'
- + '
'
- //png
- + '
'
- + ' '
- + '
'
- + '
';
+ '
' + $trad(48, i3GEOF.graficointerativo1.dicionario) + '
'
+ + '
' + $trad(49, i3GEOF.graficointerativo1.dicionario) + '
'
+ + '
' + $trad(26, i3GEOF.graficointerativo1.dicionario)
+ + ' ' + $trad(27, i3GEOF.graficointerativo1.dicionario) + ' '
+ + $trad(28, i3GEOF.graficointerativo1.dicionario) + '
'
+ + '
' + $trad(29, i3GEOF.graficointerativo1.dicionario) + '
' + '
'
+ // aqui vai o grafico
+ + ''
+ // csv
+ + '' + '
'
+ // png
+ + ''
+ + ' '
+ + '
' + '
';
return ins;
},
- /*
+ /**
* Function: iniciaJanelaFlutuante
- *
+ *
* Cria a janela flutuante para controle da ferramenta.
- *
+ *
* Parametro
- *
+ *
* dados {JSON} - dados para o gráfico
*/
iniciaJanelaFlutuante : function(dados) {
+ // id utilizado para diferenciar cada janela e seus respectivos
+ // componentes
+ idjanela = "graficoi" + parseInt(Math.random() * 1000000, 10);
+ i3GEOF.graficointerativo1.janelas.push(idjanela);
+ i3GEOF.graficointerativo1.propJanelas[idjanela] = {};
+ i3GEOF.graficointerativo1.propJanelas[idjanela].tema = i3GEO.temaAtivo;
+ i3GEOF.graficointerativo1.propJanelas[idjanela].atualiza = false;
+ i3GEOF.graficointerativo1.propJanelas[idjanela].dados = dados;
+ // guarda para esse grafico alguns valores default obtidos dos
+ // parametros gerais da ferramenta
+ i3GEOF.graficointerativo1.propJanelas[idjanela].acumula = i3GEOF.graficointerativo1.acumula;
+ i3GEOF.graficointerativo1.propJanelas[idjanela].relativa = i3GEOF.graficointerativo1.relativa;
+ i3GEOF.graficointerativo1.propJanelas[idjanela].dadospuros = i3GEOF.graficointerativo1.dadospuros;
+
if (dados) {
- i3GEOF.graficointerativo1.dados = dados;
+ i3GEOF.graficointerativo1.propJanelas[idjanela].dados = dados;
}
var minimiza, cabecalho, janela, divid, temp, titulo;
// cria a janela flutuante
cabecalho = function() {
- i3GEOF.graficointerativo1.ativaFoco();
+ i3GEOF.graficointerativo1.ativaFoco(idjanela);
};
minimiza = function() {
- i3GEO.janela.minimiza("i3GEOF.graficointerativo1");
+ i3GEO.janela.minimiza(idjanela);
};
- mudaTamanhoGrafico = function(){
- var t = $i("i3GEOgraficointerativo1Grafico");
- if(t.style.display === "block"){
- i3GEOF.graficointerativo1.tabela2dados();
+ mudaTamanhoGrafico = function() {
+ var t = $i(idjanela + "i3GEOgraficointerativo1Grafico");
+ if (t.style.display === "block") {
+ i3GEOF.graficointerativo1.tabela2dados(idjanela);
}
};
- titulo = " "
- + $trad("t37b")
- + " ";
- janela = i3GEO.janela.cria(
+ duplica = function() {
+ i3GEOF.graficointerativo1.iniciaJanelaFlutuante();
+ };
+ titulo =
+ " " + $trad("t37b") + " ";
+ janela =
+ i3GEO.janela.cria(
"480px",
- "450px",
- "",
- "",
- "",
+ "450px",
+ "",
+ "",
+ "",
titulo,
- "i3GEOF.graficointerativo1",
- false,
- "hd",
- cabecalho,
- minimiza,
+ idjanela,
+ false,
+ "hd",
+ cabecalho,
+ minimiza,
mudaTamanhoGrafico,
true,
- i3GEO.configura.locaplic+"/imagens/oxygen/16x16/view-statistics.png"
- );
+ i3GEO.configura.locaplic + "/imagens/oxygen/16x16/view-statistics.png",
+ duplica);
divid = janela[2].id;
- i3GEOF.graficointerativo1.aguarde = $i("i3GEOF.graficointerativo1_imagemCabecalho").style;
- $i("i3GEOF.graficointerativo1_corpo").style.backgroundColor = "white";
- $i("i3GEOF.graficointerativo1_corpo").style.overflow = "auto";
- i3GEOF.graficointerativo1.inicia(divid);
+ i3GEOF.graficointerativo1.aguarde = $i(idjanela + "_imagemCabecalho").style;
+ $i(idjanela + "_corpo").style.backgroundColor = "white";
+ $i(idjanela + "_corpo").style.overflow = "auto";
+
+ i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde = $i(idjanela + "_imagemCabecalho").style;
+ i3GEOF.graficointerativo1.propJanelas[idjanela].atualiza = true;
+ // indica se a janela sera atualizada na navegacao
+ temp = 'i3GEOF.graficointerativo1.propJanelas["' + idjanela + '"].atualiza = this.checked';
+ janela[0]
+ .setFooter(" " + $trad(53, i3GEOF.graficointerativo1.dicionario) + " (" + idjanela + ")
");
+
+ i3GEOF.graficointerativo1.inicia(divid, idjanela);
if (i3GEO.Interface) {
- temp = function() {
- if (i3GEO.Interface.ATUAL !== "googlemaps"
- && i3GEO.Interface.ATUAL !== "googleearth") {
- i3GEO.eventos.NAVEGAMAPA
- .remove("i3GEOF.graficointerativo1.obterDados()");
- }
- if (i3GEO.Interface.ATUAL == "googlemaps") {
- google.maps.event.removeListener(graficointerativo1Dragend);
- google.maps.event.removeListener(graficointerativo1Zoomend);
- }
- if (i3GEO.Interface.ATUAL === "googleearth") {
- google.earth.removeEventListener(graficointerativo1Dragend);
- }
- if (i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search(
- "i3GEOF.graficointerativo1.comboTemas()") > 0) {
- i3GEO.eventos.ATUALIZAARVORECAMADAS
- .remove("i3GEOF.graficointerativo1.comboTemas()");
- }
- };
+ temp =
+ function() {
+ if (i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth") {
+ i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.graficointerativo1.obterDados()");
+ }
+ if (i3GEO.Interface.ATUAL == "googlemaps") {
+ google.maps.event.removeListener(graficointerativo1Dragend);
+ google.maps.event.removeListener(graficointerativo1Zoomend);
+ }
+ if (i3GEO.Interface.ATUAL === "googleearth") {
+ google.earth.removeEventListener(graficointerativo1Dragend);
+ }
+ if (i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search(
+ "i3GEOF.graficointerativo1.comboTemas('" + idjanela + "')") > 0) {
+ i3GEO.eventos.ATUALIZAARVORECAMADAS.remove("i3GEOF.graficointerativo1.comboTemas('" + idjanela + "')");
+ }
+ };
YAHOO.util.Event.addListener(janela[0].close, "click", temp);
- if (i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search(
- "i3GEOF.graficointerativo1.comboTemas()") < 0) {
- i3GEO.eventos.ATUALIZAARVORECAMADAS
- .push("i3GEOF.graficointerativo1.comboTemas()");
+ if (i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEOF.graficointerativo1.comboTemas('" + idjanela + "')") < 0) {
+ i3GEO.eventos.ATUALIZAARVORECAMADAS.push("i3GEOF.graficointerativo1.comboTemas('" + idjanela + "')");
}
}
janela[0].bringToTop();
},
- /*
+ /**
* Function: ativaFoco
- *
- * Refaz a interface da ferramenta quando a janela flutuante tem seu foco
- * ativado
+ *
+ * Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado
*/
- ativaFoco : function() {
+ ativaFoco : function(idjanela) {
if (i3GEO.Interface) {
i3GEO.barraDeBotoes.ativaIcone("graficointerativo1");
}
- var i = $i("i3GEOF.graficointerativo1_c").style;
+ var i = $i(idjanela + "_c").style;
i3GEO.janela.ULTIMOZINDEX++;
i.zIndex = i3GEO.janela.ULTIMOZINDEX;
},
- novaJanela : function() {
- var janela = "", divid, g = $i("i3GEOgraficointerativo1guia4objCanvas"), v = g
- .cloneNode(true), cabecalho = function() {
- }, id = YAHOO.util.Dom.generateId(), minimiza = function() {
+ novaJanela : function(idjanela) {
+ var janela = "", divid, g, v, cabecalho, id, minimiza, titulo;
+ g = $i(idjanela + "i3GEOgraficointerativo1guia4objCanvas");
+ v = g.cloneNode(true);
+ cabecalho = function() {
+ };
+ id = YAHOO.util.Dom.generateId();
+ minimiza = function() {
i3GEO.janela.minimiza(id);
- }, titulo = " " + i3GEOF.graficointerativo1.titulo;
- janela = i3GEO.janela.cria("380px", "280px", "", "", "", titulo, id,
- false, "hd", cabecalho, minimiza);
+ };
+ titulo = " " + i3GEOF.graficointerativo1.propJanelas[idjanela].titulo;
+ janela = i3GEO.janela.cria("380px", "280px", "", "", "", titulo, id, false, "hd", cabecalho, minimiza);
divid = janela[2].id;
$i(divid).style.marginTop = "0px";
v.id = id + "ngrafico";
v.style.marginTop = "0px";
$i(divid).appendChild(v);
},
- /*
+ /**
* Function: comboTemas
- *
- * Monta o combo para escolha do tema que será utilizado no
- * gráfico
+ *
+ * Monta o combo para escolha do tema que será utilizado no gráfico
*/
- comboTemas : function() {
+ comboTemas : function(idjanela) {
if (!i3GEO.Interface) {
return;
}
- i3GEO.util
- .comboTemas(
- "i3GEOgraficointerativo1ComboTemasId",
- function(retorno) {
- $i("i3GEOgraficointerativo1ComboTemas").innerHTML = retorno.dados;
- $i("i3GEOgraficointerativo1ComboTemas").style.display = "block";
- if ($i("i3GEOgraficointerativo1ComboTemasId")) {
- $i("i3GEOgraficointerativo1ComboTemasId").onchange = function() {
- i3GEO.mapa
- .ativaTema($i("i3GEOgraficointerativo1ComboTemasId").value);
- i3GEOF.graficointerativo1.comboItensSel();
- };
- }
- if (i3GEO.temaAtivo !== "") {
- $i("i3GEOgraficointerativo1ComboTemasId").value = i3GEO.temaAtivo;
- $i("i3GEOgraficointerativo1ComboTemasId").onchange
- .call();
- }
- }, "i3GEOgraficointerativo1ComboTemas", "", false,
- "ligados", "font-size:12px;width:350px");
+ i3GEO.util.comboTemas(idjanela + "i3GEOgraficointerativo1ComboTemasId", function(retorno) {
+ $i(idjanela + "i3GEOgraficointerativo1ComboTemas").innerHTML = retorno.dados;
+ $i(idjanela + "i3GEOgraficointerativo1ComboTemas").style.display = "block";
+ if ($i(idjanela + "i3GEOgraficointerativo1ComboTemasId")) {
+ $i(idjanela + "i3GEOgraficointerativo1ComboTemasId").onchange = function() {
+ i3GEO.mapa.ativaTema($i(idjanela + "i3GEOgraficointerativo1ComboTemasId").value);
+ i3GEOF.graficointerativo1.comboItensSel(idjanela);
+ };
+ }
+ if (i3GEO.temaAtivo !== "") {
+ $i(idjanela + "i3GEOgraficointerativo1ComboTemasId").value = i3GEO.temaAtivo;
+ $i(idjanela + "i3GEOgraficointerativo1ComboTemasId").onchange.call();
+ }
+ }, idjanela + "i3GEOgraficointerativo1ComboTemas", "", false, "ligados", "font-size:12px;width:350px");
},
- /*
+ /**
* Function: ativaTipo
- *
- * Define a variável com o tipo de gráfico e mostra a guia 2
+ *
+ * Define a variável com o tipo de gráfico e mostra a guia2
*/
- ativaTipo : function(obj) {
- if(obj){
- i3GEOF.graficointerativo1.tipo = obj.value;
+ ativaTipo : function(obj, idjanela) {
+ if (obj) {
+ i3GEOF.graficointerativo1.propJanelas[idjanela].tipo = obj.value;
}
- if(i3GEOF.graficointerativo1.tipo == "ponto_1"){
- $i("i3GEOgraficointerativo1DadosPuros").checked = true;
- }
- else{
- $i("i3GEOgraficointerativo1DadosPuros").checked = false;
+ if (i3GEOF.graficointerativo1.propJanelas[idjanela].tipo == "ponto_1") {
+ $i(idjanela + "i3GEOgraficointerativo1DadosPuros").checked = true;
+ } else {
+ $i(idjanela + "i3GEOgraficointerativo1DadosPuros").checked = false;
}
- if (!$i("i3GEOgraficointerativo1tabeladados") || $i("i3GEOgraficointerativo1tabeladados").innerHTML == "") {
- $i("i3GEOgraficointerativo1guia2").onclick.call();
+ if (!$i(idjanela + "i3GEOgraficointerativo1tabeladados") || $i(idjanela + "i3GEOgraficointerativo1tabeladados").innerHTML == "") {
+ $i(idjanela + "i3GEOgraficointerativo1guia2").onclick.call();
} else {
- $i("i3GEOgraficointerativo1guia4").onclick.call();
+ $i(idjanela + "i3GEOgraficointerativo1guia4").onclick.call();
}
},
- alteraFatorPixel: function(tipo){
- var delta = 20,
- temp = $i("i3GEOgraficointerativo1FatorTamanho"),
- v = parseInt(temp.value,10);
- if(temp.value >= 0){
- if(tipo === "mais"){
+ alteraFatorPixel : function(tipo, idjanela) {
+ var delta = 20, temp = $i(idjanela + "i3GEOgraficointerativo1FatorTamanho"), v = parseInt(temp.value, 10);
+ if (temp.value >= 0) {
+ if (tipo === "mais") {
temp.value = v + delta;
- }
- else{
+ } else {
temp.value = v - delta;
}
}
- if(parseInt(temp.value,10) < 0){
+ if (parseInt(temp.value, 10) < 0) {
temp.value = 0;
}
- $i("i3GEOgraficointerativo1guia4").onclick.call();
+ $i(idjanela + "i3GEOgraficointerativo1guia4").onclick.call();
},
- /*
+ /**
* Function: configuraDados
- *
- * Configura o formulário para obtenção dos dados para
- * cada tipo de gráfico
+ *
+ * Configura o formulário para obtenção dos dados para cada tipo de gráfico
*/
- configuraDados : function() {
+ configuraDados : function(idjanela) {
var ativa = function(comboxlinha, comboylinha, ajudapizza) {
try {
- $i("i3GEOgraficointerativo1ComboXlinha").style.display = comboxlinha;
- $i("i3GEOgraficointerativo1ComboYlinha").style.display = comboylinha;
- $i("i3GEOgraficointerativo1AjudaPizza").style.display = ajudapizza;
- } catch (e) {}
+ $i(idjanela + "i3GEOgraficointerativo1ComboXlinha").style.display = comboxlinha;
+ $i(idjanela + "i3GEOgraficointerativo1ComboYlinha").style.display = comboylinha;
+ $i(idjanela + "i3GEOgraficointerativo1AjudaPizza").style.display = ajudapizza;
+ } catch (e) {
+ }
};
- if (i3GEOF.graficointerativo1.tipo === "") {
- i3GEO.janela.tempoMsg($trad(31,
- i3GEOF.graficointerativo1.dicionario));
- i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativo1guia1",
- "i3GEOgraficointerativo1guia");
+ if (i3GEOF.graficointerativo1.propJanelas[idjanela].tipo === "") {
+ i3GEO.janela.tempoMsg($trad(31, i3GEOF.graficointerativo1.dicionario));
+ i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOgraficointerativo1guia1", idjanela + "i3GEOgraficointerativo1guia");
return;
}
- if (i3GEOF.graficointerativo1.tipo === "pizza2d") {
+ if (i3GEOF.graficointerativo1.propJanelas[idjanela].tipo === "pizza2d") {
ativa.call("block", "block", "block");
}
},
- /*
+ /**
* Function: comboItensSel
- *
+ *
* Cria um combo para selecionar os itens do tema escolhido
- *
+ *
* Veja:
- *
+ *
*
*/
- comboItensSel : function() {
- var adicionaFilho = function(){},
- tema = $i("i3GEOgraficointerativo1ComboTemasId").value;
- i3GEO.util
- .comboItens(
- "i3GEOgraficointerativo1ComboXid",
- tema,
- function(retorno) {
- if (retorno.tipo === "erro") {
- $i("i3GEOgraficointerativo1ComboX").innerHTML = ""
- + $trad(
- 32,
- i3GEOF.graficointerativo1.dicionario)
- + " ";
- $i("i3GEOgraficointerativo1ComboY").innerHTML = ""
- + $trad(
- 32,
- i3GEOF.graficointerativo1.dicionario)
- + " ";
- } else {
- $i("i3GEOgraficointerativo1ComboY").innerHTML = "";
+ comboItensSel : function(idjanela) {
+ var adicionaFilho = function() {
+ }, tema = $i(idjanela + "i3GEOgraficointerativo1ComboTemasId").value;
+ i3GEO.util.comboItens(idjanela + "i3GEOgraficointerativo1ComboXid", tema, function(retorno) {
+ if (retorno.tipo === "erro") {
+ $i(idjanela + "i3GEOgraficointerativo1ComboX").innerHTML =
+ "" + $trad(32, i3GEOF.graficointerativo1.dicionario) + " ";
+ $i(idjanela + "i3GEOgraficointerativo1ComboY").innerHTML =
+ "" + $trad(32, i3GEOF.graficointerativo1.dicionario) + " ";
+ } else {
+ $i(idjanela + "i3GEOgraficointerativo1ComboY").innerHTML =
+ "";
- $i("i3GEOgraficointerativo1ComboXid").id = "i3GEOgraficointerativo1ComboYid";
- $i("i3GEOgraficointerativo1ComboX").innerHTML = ""
- + retorno.dados
- + "
";
- $i("i3GEOgraficointerativo1ComboXid").style.width = "160px";
- $i("i3GEOgraficointerativo1ComboYid").style.width = "160px";
+ $i(idjanela + "i3GEOgraficointerativo1ComboXid").id = idjanela + "i3GEOgraficointerativo1ComboYid";
+ $i(idjanela + "i3GEOgraficointerativo1ComboX").innerHTML =
+ "" + retorno.dados + "
";
+ $i(idjanela + "i3GEOgraficointerativo1ComboXid").style.width = "160px";
+ $i(idjanela + "i3GEOgraficointerativo1ComboYid").style.width = "160px";
- adicionaFilho = function() {
- var no = document.createElement("div"),
- id = "CorG"+parseInt(Math.random()*100000,10),
- novoselect;
- no.innerHTML = retorno.dados
- + " "
- + " "
- + " ";
- novoselect = no.getElementsByTagName("select")[0];
- novoselect.id = "";
- novoselect.onchange = adicionaFilho;
- novoselect.style.width = "160px";
- $i("i3GEOgraficointerativo1ComboY").appendChild(no);
- };
- $i("i3GEOgraficointerativo1ComboYid").onchange = adicionaFilho;
- }
- }, "i3GEOgraficointerativo1ComboX", "");
+ adicionaFilho =
+ function() {
+ var no = document.createElement("div"), id = "CorG" + parseInt(Math.random() * 100000, 10), novoselect;
+ no.innerHTML =
+ retorno.dados + " " + " "
+ + " ";
+ novoselect = no.getElementsByTagName("select")[0];
+ novoselect.id = "";
+ novoselect.onchange = adicionaFilho;
+ novoselect.style.width = "160px";
+ $i(idjanela + "i3GEOgraficointerativo1ComboY").appendChild(no);
+ };
+ $i(idjanela + "i3GEOgraficointerativo1ComboYid").onchange = adicionaFilho;
+ }
+ }, idjanela + "i3GEOgraficointerativo1ComboX", "");
+ },
+ /**
+ * Atualiza as janelas obtendo os dados conforme a navegacao ocorre
+ */
+ atualizaListaDeRegistros : function() {
+ var i, janelas = i3GEOF.graficointerativo1.janelas, propJanelas = i3GEOF.graficointerativo1.propJanelas, n = janelas.length;
+ for (i = 0; i < n; i++) {
+ if (propJanelas[janelas[i]].atualiza === true) {
+ i3GEOF.graficointerativo1.obterDados(janelas[i]);
+ }
+ }
},
- /*
+ /**
* Function: obterDados
- *
+ *
* Obtém os dados que serão utilizados no gráfico
- *
+ *
* Veja:
- *
+ *
*
*/
- obterDados : function() {
+ obterDados : function(idjanela) {
+ // TODO
if (!i3GEO.Interface) {
return;
}
- if (i3GEOF.graficointerativo1.aguarde.visibility === "visible") {
+ if (i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility === "visible") {
return;
}
- var tema = $i("i3GEOgraficointerativo1ComboTemasId").value, excluir = $i("i3GEOgraficointerativo1excluir").value, cp = new cpaint(), tipo = $i("i3GEOgraficointerativo1TipoAgregacao").value, ordenax = "sim", monta, p, x, y, i, n, temp;
+ var tema, excluir, cp, tipo, ordenax, monta, p, x, y, i, n, temp;
+
+ tema = $i(idjanela + "i3GEOgraficointerativo1ComboTemasId").value;
+ excluir = $i(idjanela + "i3GEOgraficointerativo1excluir").value;
+ cp = new cpaint();
+ tipo = $i(idjanela + "i3GEOgraficointerativo1TipoAgregacao").value;
+ ordenax = "sim";
// pega os itens
- temp = $i("i3GEOgraficointerativo1ComboX");
+ temp = $i(idjanela + "i3GEOgraficointerativo1ComboX");
x = temp.getElementsByTagName("select")[0].value;
- temp = $i("i3GEOgraficointerativo1ComboY");
+ temp = $i(idjanela + "i3GEOgraficointerativo1ComboY");
temp = temp.getElementsByTagName("select");
n = temp.length;
if (n === 1) {
@@ -768,243 +752,209 @@ i3GEOF.graficointerativo1 = {
}
y = y.join(",");
}
- p = i3GEO.configura.locaplic
- + "/ferramentas/graficointerativo1/exec.php?g_sid="
- + i3GEO.configura.sid + "&funcao=graficoSelecao&tema=" + tema
- + "&itemclasses=" + x + "&itemvalores=" + y + "&exclui="
- + excluir + "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
+ p =
+ i3GEO.configura.locaplic + "/ferramentas/graficointerativo1/exec.php?g_sid=" + i3GEO.configura.sid
+ + "&funcao=graficoSelecao&tema=" + tema + "&itemclasses=" + x + "&itemvalores=" + y + "&exclui=" + excluir + "&ext="
+ + i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
- if ($i("i3GEOgraficointerativo1DadosPuros").checked) {
+ if ($i(idjanela + "i3GEOgraficointerativo1DadosPuros").checked) {
tipo = "nenhum";
} else {
if (x === y) {
tipo = "conta";
}
}
- if (!$i("i3GEOgraficointerativo1OrdenaX").checked) {
+ if (!$i(idjanela + "i3GEOgraficointerativo1OrdenaX").checked) {
ordenax = "nao";
}
if (tema === "") {
- i3GEO.janela.tempoMsg($trad(34,
- i3GEOF.graficointerativo1.dicionario));
+ i3GEO.janela.tempoMsg($trad(34, i3GEOF.graficointerativo1.dicionario));
return;
}
if (x === "") {
- i3GEO.janela.tempoMsg($trad(35,
- i3GEOF.graficointerativo1.dicionario));
+ i3GEO.janela.tempoMsg($trad(35, i3GEOF.graficointerativo1.dicionario));
return;
}
if (y === "") {
- i3GEO.janela.tempoMsg($trad(36,
- i3GEOF.graficointerativo1.dicionario));
+ i3GEO.janela.tempoMsg($trad(36, i3GEOF.graficointerativo1.dicionario));
return;
}
monta = function(retorno) {
- i3GEOF.graficointerativo1.aguarde.visibility = "hidden";
- i3GEOF.graficointerativo1.montaTabelaDados(retorno);
- $i("i3GEOgraficointerativo1guia4").onclick.call();
- // verifica para nao ficar mostrando a janela toda vez que redesenha
- // o mapa
- if ($i("i3GEOFgraficointerativo1ativaNavegacao").checked == false) {
- i3GEO.janela.tempoMsg($trad(37,
- i3GEOF.graficointerativo1.dicionario));
- }
+ i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "hidden";
+ i3GEOF.graficointerativo1.montaTabelaDados(idjanela, retorno);
+ $i(idjanela + "i3GEOgraficointerativo1guia4").onclick.call();
};
- i3GEOF.graficointerativo1.aguarde.visibility = "visible";
+ i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "visible";
cp.set_response_type("JSON");
- cp.call(p + "&tipo=" + tipo + "&ordenax=" + ordenax, "graficoSelecao",
- monta);
+ cp.call(p + "&tipo=" + tipo + "&ordenax=" + ordenax, "graficoSelecao", monta);
},
- /*
+ /**
* Pega os nomes das colunas
*/
- nomesColunas: function(){
- //pega os nomes das clunas
- var i,n,p,
- temp = $i("i3GEOgraficointerativo1ComboX"),
- colunas,
- cores,
- alias;
- if(temp.getElementsByTagName("select")[0]){
+ nomesColunas : function(idjanela) {
+ // pega os nomes das clunas
+ var i, n, p, temp = $i(idjanela + "i3GEOgraficointerativo1ComboX"), colunas, cores, alias;
+ if (temp.getElementsByTagName("select")[0]) {
cores = [];
- colunas = [temp.getElementsByTagName("select")[0].value];
- alias = [temp.getElementsByTagName("input")[0].value];
- }
- else{
- //caso os dados tenham sido definidos como parametros
- colunas = ["-","-"];
+ colunas = [
+ temp.getElementsByTagName("select")[0].value
+ ];
+ alias = [
+ temp.getElementsByTagName("input")[0].value
+ ];
+ } else {
+ // caso os dados tenham sido definidos como parametros
+ colunas = [
+ "-",
+ "-"
+ ];
alias = colunas;
- cores = ["#29C152","#29C152"];
+ cores = [
+ "#29C152",
+ "#29C152"
+ ];
}
- temp = $i("i3GEOgraficointerativo1ComboY");
+ temp = $i(idjanela + "i3GEOgraficointerativo1ComboY");
temp = temp.getElementsByTagName("select");
n = temp.length;
- for(i=0;i"
- + $trad(38, i3GEOF.graficointerativo1.dicionario)
- + "
");
- //pega os nomes das clunas
- colunas = i3GEOF.graficointerativo1.nomesColunas()[0];
+ ins.push("" + $trad(38, i3GEOF.graficointerativo1.dicionario) + "
");
+ // pega os nomes das clunas
+ colunas = i3GEOF.graficointerativo1.nomesColunas(idjanela)[0];
ncolunas = colunas.length;
- for(i=0;i "
- + colunas[i]
- + "");
+ for (i = 0; i < ncolunas; i++) {
+ ins
+ .push(" " + colunas[i] + " ");
}
- ins.push(""
- + $trad(41, i3GEOF.graficointerativo1.dicionario)
- + " ");
+ ins.push("" + $trad(41, i3GEOF.graficointerativo1.dicionario) + " ");
n = dados.length;
for (i = 1; i < n; i++) {
v = dados[i].split(";");
// ins += v[0]+" "+v[1];
- id = "i3GEOgraficointerativo1Dados" + i; // layer+indice da classe
+ id = idjanela + "i3GEOgraficointerativo1Dados" + i; // layer+indice da classe
ins.push("");
ins.push(" ");
+ + i3GEO.configura.locaplic + "/imagens/x.gif' title='" + $trad(42, i3GEOF.graficointerativo1.dicionario) + "' />");
ins.push("");
- for(j=0;j");
- ins.push($inputText("", "", id + colunas[j], $trad(43,
- i3GEOF.graficointerativo1.dicionario), 20, v[j], colunas[j]));
+ ins.push($inputText("", "", id + colunas[j], $trad(43, i3GEOF.graficointerativo1.dicionario), 20, v[j], colunas[j]));
ins.push("");
}
ins.push("");
- if ($i("i3GEOgraficointerativo1CoresA").checked) {
+ if ($i(idjanela + "i3GEOgraficointerativo1CoresA").checked) {
cor = i3GEO.util.rgb2hex(i3GEO.util.randomRGB());
}
- // verifica se no objeto com os dados existe um terceiro valor com
+ // verifica se no objeto com os dados existe um terceiro
+ // valor com
// as cores
if (v[ncolunas + 1]) {
cor = i3GEO.util.rgb2hex(v[ncolunas + 1]);
}
- ins.push($inputText("", "", id + "_cor", "", 12, cor, $trad(41,
- i3GEOF.graficointerativo1.dicionario)));
+ ins.push($inputText("", "", id + "_cor", "", 12, cor, $trad(41, i3GEOF.graficointerativo1.dicionario)));
ins.push(" ");
- ins.push(" ");
+ ins.push(" ");
ins.push(" ");
}
ins.push("
");
- $i("i3GEOgraficointerativo1Dados").innerHTML = ins.join("");
+ $i(idjanela + "i3GEOgraficointerativo1Dados").innerHTML = ins.join("");
},
- /*
+ /**
* Function: tabela2csv
- *
+ *
* Obtém os dados da tabela em CSV
*/
- tabela2csv : function() {
- var colunas = i3GEOF.graficointerativo1.nomesColunas(),
- ncolunas = colunas[0].length,
- inputs = $i("i3GEOgraficointerativo1Dados").getElementsByTagName("input"),
- ninputs = inputs.length,
- i,j,
- temp,
- csv = [];
+ tabela2csv : function(idjanela) {
+ var colunas = i3GEOF.graficointerativo1.nomesColunas(idjanela), ncolunas = colunas[0].length, inputs =
+ $i(idjanela + "i3GEOgraficointerativo1Dados").getElementsByTagName("input"), ninputs = inputs.length, i, j, temp, csv = [];
csv.push(colunas[0].join(";"));
- for (i = 0; i < ninputs; i = (i + 1 + ncolunas)){
+ for (i = 0; i < ninputs; i = (i + 1 + ncolunas)) {
temp = [];
- for(j=0;j 0){
+ if (ninputs > 0) {
menor = inputs[1].value * 1;
}
- if ($i("i3GEOgraficointerativo1ComboTemasId")) {
- titulo = $i("i3GEOgraficointerativo1ComboTemasId").options[$i("i3GEOgraficointerativo1ComboTemasId").options.selectedIndex].text;
+ if ($i(idjanela + "i3GEOgraficointerativo1ComboTemasId")) {
+ titulo =
+ $i(idjanela + "i3GEOgraficointerativo1ComboTemasId").options[$i(idjanela + "i3GEOgraficointerativo1ComboTemasId").options.selectedIndex].text;
}
if (i3GEOF.graficointerativo1.titulo != "") {
titulo = i3GEOF.graficointerativo1.titulo;
}
- if ($i("i3GEOgraficointerativo1ComboXid")) {
- legendaX = $i("i3GEOgraficointerativo1ComboXidTitulo").value;
+ if ($i(idjanela + "i3GEOgraficointerativo1ComboXid")) {
+ legendaX = $i(idjanela + "i3GEOgraficointerativo1ComboXidTitulo").value;
}
- if ($i("i3GEOgraficointerativo1ComboYid")) {
- legendaY = $i("i3GEOgraficointerativo1ComboYidTitulo").value;
+ if ($i(idjanela + "i3GEOgraficointerativo1ComboYid")) {
+ legendaY = $i(idjanela + "i3GEOgraficointerativo1ComboYidTitulo").value;
}
- if(ncolunas === 2){
+ if (ncolunas === 2) {
for (i = 0; i < ninputs; i = i + 3) {
temp = inputs[i + 1].value * 1;
total += temp;
@@ -1022,23 +972,25 @@ i3GEOF.graficointerativo1 = {
menor = temp;
}
temp = inputs[i + 1].value * 1;
- if ($i("i3GEOgraficointerativo1Acumula").checked) {
+ if ($i(idjanela + "i3GEOgraficointerativo1Acumula").checked) {
temp = acum;
}
- if ($i("i3GEOgraficointerativo1Relativa").checked) {
+ if ($i(idjanela + "i3GEOgraficointerativo1Relativa").checked) {
temp = (temp * 100) / total;
}
- par.push([ inputs[i].value + " ", temp ]);
+ par.push([
+ inputs[i].value + " ",
+ temp
+ ]);
}
- if ($i("i3GEOgraficointerativo1Acumula").checked) {
+ if ($i(idjanela + "i3GEOgraficointerativo1Acumula").checked) {
maior = 0;
}
- }
- else{
+ } else {
total = 0;
- for (i = 0; i < ninputs; i = (i + 1 + ncolunas)){
+ for (i = 0; i < ninputs; i = (i + 1 + ncolunas)) {
temp = [];
- for(j=0;j 0);
p.parentNode.removeChild(p);
},
- /*
+ /**
* Function: corj
- *
+ *
* Abre a janela para o usuário selecionar uma cor interativamente
*/
corj : function(obj) {
i3GEO.util.abreCor("", obj, "hex");
},
- /*
+ /**
* Function: ordenaColuna
- *
+ *
* Ordena uma coluna da tabela
*/
ordenaColuna : function(coluna, cid) {
- var tabela = $i("i3GEOgraficointerativo1Dados").getElementsByTagName(
- "table")[0], trs, ntrs = 0, psort = [], t = 0, ins = "", p = 0, e, temp, chaves = [], numero = false;
+ var tabela = $i(idjanela + "i3GEOgraficointerativo1Dados").getElementsByTagName("table")[0], trs, ntrs = 0, psort = [], t = 0, ins =
+ "", p = 0, e, temp, chaves = [], numero = false;
trs = tabela.getElementsByTagName("tr");
ntrs = trs.length;
@@ -1163,133 +1106,110 @@ i3GEOF.graficointerativo1 = {
}
tabela.innerHTML = ins;
},
- /*
+ /**
* Function: ativaNavegacao
- *
- * Ativa ou desativa a atualização automática ao
- * navegar no mapa
+ *
+ * Ativa a atualização automática ao navegar no mapa
*/
- ativaNavegacao : function(obj) {
+ ativaNavegacao : function() {
if (!i3GEO.Interface) {
return;
}
- if (obj === true) {
- if (i3GEO.Interface.ATUAL !== "googlemaps"
- && i3GEO.Interface.ATUAL !== "googleearth") {
- i3GEO.eventos.NAVEGAMAPA
- .push("i3GEOF.graficointerativo1.obterDados()");
- }
- if (i3GEO.Interface.ATUAL === "googlemaps") {
- graficointerativo1Dragend = GEvent.addListener(i3GeoMap,
- "dragend", function() {
- i3GEOF.graficointerativo1.obterDados();
- });
- graficointerativo1Zoomend = GEvent.addListener(i3GeoMap,
- "zoomend", function() {
- i3GEOF.graficointerativo1.obterDados();
- });
- }
- if (i3GEO.Interface.ATUAL === "googleearth") {
- graficointerativo1Dragend = google.earth.addEventListener(
- i3GeoMap.getView(), "viewchangeend", function() {
- i3GEOF.graficointerativo1.obterDados();
- });
- }
- } else {
- if (i3GEO.Interface.ATUAL !== "googlemaps"
- && i3GEO.Interface.ATUAL !== "googleearth") {
- i3GEO.eventos.NAVEGAMAPA
- .remove("i3GEOF.graficointerativo1.obterDados()");
- }
- if (i3GEO.Interface.ATUAL === "googlemaps") {
- GEvent.removeListener(graficointerativo1Dragend);
- GEvent.removeListener(graficointerativo1Zoomend);
- }
- if (i3GEO.Interface.ATUAL === "googleearth") {
- google.earth.removeEventListener(graficointerativo1Dragend);
- }
+ i3GEO.janela.tempoMsg($trad(37, i3GEOF.graficointerativo1.dicionario));
+ if (i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth") {
+ i3GEO.eventos.NAVEGAMAPA.push("i3GEOF.graficointerativo1.atualizaListaDeRegistros()");
+ }
+ if (i3GEO.Interface.ATUAL === "googlemaps") {
+ graficointerativo1Dragend = GEvent.addListener(i3GeoMap, "dragend", function() {
+ i3GEOF.graficointerativo1.atualizaListaDeRegistros();
+ });
+ graficointerativo1Zoomend = GEvent.addListener(i3GeoMap, "zoomend", function() {
+ i3GEOF.graficointerativo1.atualizaListaDeRegistros();
+ });
}
+ if (i3GEO.Interface.ATUAL === "googleearth") {
+ graficointerativo1Dragend = google.earth.addEventListener(i3GeoMap.getView(), "viewchangeend", function() {
+ i3GEOF.graficointerativo1.atualizaListaDeRegistros();
+ });
+ }
+
},
- configDefault : function(dados, maior, cores, legendaY, legendaX) {
- var temp,config = {
- canvas : "i3GEOgraficointerativo1guia4objCanvas",
- height : parseInt($i("i3GEOF.graficointerativo1_corpo").style.height, 10) - 80,
- orthoAxisTitle : legendaY,
- valuesFont : 'normal 9px sans-serif ',
- baseAxisTitle : legendaX,
- baseAxisTitleAlign : 'center',
- tooltipEnabled : true,
- tooltipArrowVisible : true,
- tooltipFade : false,
- tooltipFollowMouse : false,
- tooltipFormat : function(scene) {
- var cat = this.scene.datum.atoms['category'].value, val = this.scene.datum.atoms['value'].value;
- return "" + cat + " "
- + format("#.###,", val);
- },
- baseAxisTitleFont : '9px sans-serif',
- yAxisTickFormatter : function(valor) {
- valor = valor + "";
- valor = format("#.###,", valor);
- return valor;
- },
- valueFormat : function(valor) {
- valor = valor + "";
- valor = format("#.###,", valor);
- return valor;
- },
- valuesAnchor : 'top',
- valuesVisible : false,
- orthoAxisOriginIsZero : false,
- titleAlign : 'center',
- titleFont: 'bold 14px sans-serif',
- baseAxisTitleFont : '12px sans-serif',
- orthoAxisTitleFont : '12px sans-serif',
- titlePosition: "top",
- orientation : 'vertical',
- baseAxisTicks : true,
- stacked : false,
- animate : true,
- hoverable : false,
- axisGrid : true,
- contentMargins : 5,
- axisOffset : 0.02,
- panelSizeRatio : 0.8,
- orthoAxisLabelSpacingMin : 2,
- selectable : false,
- extensionPoints : {
- continuousAxisTicks_strokeStyle : 'gray',
- axisGrid_strokeStyle : 'lightgray',
- xAxisLabel_textStyle : 'black',
- label_textBaseline : "bottom",
- xAxisLabel_font : 'normal 10px sans-serif'
- }
+ configDefault : function(idjanela, dados, maior, cores, legendaY, legendaX) {
+ var temp, config = {
+ canvas : idjanela + "i3GEOgraficointerativo1guia4objCanvas",
+ height : parseInt($i(idjanela + "_corpo").style.height, 10) - 80,
+ orthoAxisTitle : legendaY,
+ valuesFont : 'normal 9px sans-serif ',
+ baseAxisTitle : legendaX,
+ baseAxisTitleAlign : 'center',
+ tooltipEnabled : true,
+ tooltipArrowVisible : true,
+ tooltipFade : false,
+ tooltipFollowMouse : false,
+ tooltipFormat : function(scene) {
+ var cat = this.scene.datum.atoms['category'].value, val = this.scene.datum.atoms['value'].value;
+ return "" + cat + " " + format("#.###,", val);
+ },
+ baseAxisTitleFont : '9px sans-serif',
+ yAxisTickFormatter : function(valor) {
+ valor = valor + "";
+ valor = format("#.###,", valor);
+ return valor;
+ },
+ valueFormat : function(valor) {
+ valor = valor + "";
+ valor = format("#.###,", valor);
+ return valor;
+ },
+ valuesAnchor : 'top',
+ valuesVisible : false,
+ orthoAxisOriginIsZero : false,
+ titleAlign : 'center',
+ titleFont : 'bold 14px sans-serif',
+ baseAxisTitleFont : '12px sans-serif',
+ orthoAxisTitleFont : '12px sans-serif',
+ titlePosition : "top",
+ orientation : 'vertical',
+ baseAxisTicks : true,
+ stacked : false,
+ animate : true,
+ hoverable : false,
+ axisGrid : true,
+ contentMargins : 5,
+ axisOffset : 0.02,
+ panelSizeRatio : 0.8,
+ orthoAxisLabelSpacingMin : 2,
+ selectable : false,
+ extensionPoints : {
+ continuousAxisTicks_strokeStyle : 'gray',
+ axisGrid_strokeStyle : 'lightgray',
+ xAxisLabel_textStyle : 'black',
+ label_textBaseline : "bottom",
+ xAxisLabel_font : 'normal 10px sans-serif'
+ }
};
- if(maior > 0){
+ if (maior > 0) {
config.orthoAxisFixedMax = maior;
}
- if($i("i3GEOgraficointerativo1Titulo").value != ""){
- config.title = $i("i3GEOgraficointerativo1Titulo").value;
+ if ($i(idjanela + "i3GEOgraficointerativo1Titulo").value != "") {
+ config.title = $i(idjanela + "i3GEOgraficointerativo1Titulo").value;
}
- if($i("i3GEOgraficointerativo1TituloX").value != ""){
- config.baseAxisTitle = $i("i3GEOgraficointerativo1TituloX").value;
+ if ($i(idjanela + "i3GEOgraficointerativo1TituloX").value != "") {
+ config.baseAxisTitle = $i(idjanela + "i3GEOgraficointerativo1TituloX").value;
}
- if($i("i3GEOgraficointerativo1TituloY").value != ""){
- config.orthoAxisTitle = $i("i3GEOgraficointerativo1TituloY").value;
+ if ($i(idjanela + "i3GEOgraficointerativo1TituloY").value != "") {
+ config.orthoAxisTitle = $i(idjanela + "i3GEOgraficointerativo1TituloY").value;
}
- temp = $i("i3GEOgraficointerativo1FatorTamanho");
- if(temp && temp.value > 0){
+ temp = $i(idjanela + "i3GEOgraficointerativo1FatorTamanho");
+ if (temp && temp.value > 0) {
config.width = dados.resultset.length * temp.value;
- }
- else{
- config.width = parseInt($i("i3GEOF.graficointerativo1").style.width,10) - 20;
+ } else {
+ config.width = parseInt($i(idjanela).style.width, 10) - 20;
}
return config;
},
- barras : function(dados, maior, cores, legendaY, legendaX, xInclinado, tipo) {
- var ct = true,
- sr = false,
- config = i3GEOF.graficointerativo1.configDefault(dados, maior, cores,legendaY, legendaX);
+ barras : function(idjanela, dados, maior, cores, legendaY, legendaX, xInclinado, tipo) {
+ var ct = true, sr = false, config = i3GEOF.graficointerativo1.configDefault(idjanela, dados, maior, cores, legendaY, legendaX);
if (tipo === "horizontal") {
config.orientation = 'horizontal';
}
@@ -1298,15 +1218,14 @@ i3GEOF.graficointerativo1 = {
config.extensionPoints.xAxisLabel_textBaseline = 'top';
config.extensionPoints.xAxisLabel_textAlign = 'right';
}
- if(dados.resultset[0].length > 2){
- config.stacked = $i("i3GEOFgraficointerativo1ativaStacked").checked;
+ if (dados.resultset[0].length > 2) {
+ config.stacked = $i(idjanela + "i3GEOFgraficointerativo1ativaStacked").checked;
config.legend = true;
ct = true;
- sr = $i("i3GEOFgraficointerativo1ativaRowsInColumns").checked;
+ sr = $i(idjanela + "i3GEOFgraficointerativo1ativaRowsInColumns").checked;
config.colors = cores;
- }
- else{
- if(cores != ""){
+ } else {
+ if (cores != "") {
config.extensionPoints.bar_fillStyle = function(d) {
return cores[this.index];
};
@@ -1314,15 +1233,12 @@ i3GEOF.graficointerativo1 = {
}
new pvc.BarChart(config).setData(dados, {
crosstabMode : ct,
- seriesInRows: sr
+ seriesInRows : sr
}).render();
- i3GEOF.graficointerativo1.aguarde.visibility = "hidden";
+ i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "hidden";
},
- linhas : function(dados, maior, cores, legendaY, legendaX, xInclinado, tipo) {
- var ct = false,
- sr = false,
- config = i3GEOF.graficointerativo1.configDefault(dados, maior, cores,
- legendaY, legendaX);
+ linhas : function(idjanela, dados, maior, cores, legendaY, legendaX, xInclinado, tipo) {
+ var ct = false, sr = false, config = i3GEOF.graficointerativo1.configDefault(idjanela, dados, maior, cores, legendaY, legendaX);
if (xInclinado == true) {
config.extensionPoints.xAxisLabel_textAngle = -Math.PI / 3;
config.extensionPoints.xAxisLabel_textBaseline = 'top';
@@ -1330,24 +1246,21 @@ i3GEOF.graficointerativo1 = {
}
config.dotsVisible = true;
- if(dados.resultset[0].length > 2){
- config.stacked = $i("i3GEOFgraficointerativo1ativaStacked").checked;
+ if (dados.resultset[0].length > 2) {
+ config.stacked = $i(idjanela + "i3GEOFgraficointerativo1ativaStacked").checked;
config.legend = true;
ct = true;
- sr = $i("i3GEOFgraficointerativo1ativaRowsInColumns").checked;
+ sr = $i(idjanela + "i3GEOFgraficointerativo1ativaRowsInColumns").checked;
config.colors = cores;
}
new pvc.LineChart(config).setData(dados, {
crosstabMode : ct,
- seriesInRows: sr
+ seriesInRows : sr
}).render();
- i3GEOF.graficointerativo1.aguarde.visibility = "hidden";
+ i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "hidden";
},
- areas : function(dados, maior, cores, legendaY, legendaX, xInclinado, tipo) {
- var ct = false,
- sr = false,
- config = i3GEOF.graficointerativo1.configDefault(dados, maior, cores,
- legendaY, legendaX);
+ areas : function(idjanela, dados, maior, cores, legendaY, legendaX, xInclinado, tipo) {
+ var ct = false, sr = false, config = i3GEOF.graficointerativo1.configDefault(idjanela, dados, maior, cores, legendaY, legendaX);
if (xInclinado == true) {
config.extensionPoints.xAxisLabel_textAngle = -Math.PI / 3;
config.extensionPoints.xAxisLabel_textBaseline = 'top';
@@ -1356,107 +1269,102 @@ i3GEOF.graficointerativo1 = {
config.dotsVisible = true;
config.areasVisible = true;
- if(dados.resultset[0].length > 2){
- config.stacked = $i("i3GEOFgraficointerativo1ativaStacked").checked;
+ if (dados.resultset[0].length > 2) {
+ config.stacked = $i(idjanela + "i3GEOFgraficointerativo1ativaStacked").checked;
config.legend = true;
ct = true;
- sr = $i("i3GEOFgraficointerativo1ativaRowsInColumns").checked;
+ sr = $i(idjanela + "i3GEOFgraficointerativo1ativaRowsInColumns").checked;
config.colors = cores;
}
new pvc.LineChart(config).setData(dados, {
crosstabMode : ct,
- seriesInRows: sr
+ seriesInRows : sr
}).render();
- i3GEOF.graficointerativo1.aguarde.visibility = "hidden";
+ i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "hidden";
},
- arvores : function(dados, maior, cores, legendaY, legendaX, tipo) {
+ arvores : function(idjanela, dados, maior, cores, legendaY, legendaX, tipo) {
config = {
- canvas : "i3GEOgraficointerativo1guia4objCanvas",
- title : legendaY,
- titleFont : 'italic 14px sans-serif',
- selectable : true,
- hoverable : true,
- legend : false,
- tooltipEnabled : true,
- legendPosition : 'right',
- rootCategoryLabel : legendaX,
- tooltipFormat : function(scene) {
- var cat = this.scene.datum.atoms['category'].value, val = this.scene.datum.atoms.size.value;
- return "" + cat + " "
- + format("#.###,", val);
- }
+ canvas : idjanela + "i3GEOgraficointerativo1guia4objCanvas",
+ title : legendaY,
+ titleFont : 'italic 14px sans-serif',
+ selectable : true,
+ hoverable : true,
+ legend : false,
+ tooltipEnabled : true,
+ legendPosition : 'right',
+ rootCategoryLabel : legendaX,
+ tooltipFormat : function(scene) {
+ var cat = this.scene.datum.atoms['category'].value, val = this.scene.datum.atoms.size.value;
+ return "" + cat + " " + format("#.###,", val);
+ }
};
- if(cores != ""){
+ if (cores != "") {
config.colors = cores;
}
new pvc.TreemapChart(config).setData(dados, {
crosstabMode : false
}).render();
- i3GEOF.graficointerativo1.aguarde.visibility = "hidden";
+ i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "hidden";
},
- pizzas : function(dados, maior, cores, legendaY, legendaX, tipo) {
- config = i3GEOF.graficointerativo1.configDefault(dados, maior, cores,
- legendaY, legendaX);
+ pizzas : function(idjanela, dados, maior, cores, legendaY, legendaX, tipo) {
+ config = i3GEOF.graficointerativo1.configDefault(idjanela, dados, maior, cores, legendaY, legendaX);
var config = {
- canvas : "i3GEOgraficointerativo1guia4objCanvas",
- animate : true,
- selectable : true,
- hoverable : true,
- valuesVisible : true,
- valuesLabelStyle : 'inside',
- valuesMask : "{category}",
- tooltipFormat : function(scene) {
- var cat = this.scene.datum.atoms['category'].value, val = this.scene.datum.atoms['value'].value;
- return "" + cat + " "
- + format("#.###,", val);
- },
- extensionPoints : {
- slice_strokeStyle : 'white'
- }
+ canvas : idjanela + "i3GEOgraficointerativo1guia4objCanvas",
+ animate : true,
+ selectable : true,
+ hoverable : true,
+ valuesVisible : true,
+ valuesLabelStyle : 'inside',
+ valuesMask : "{category}",
+ tooltipFormat : function(scene) {
+ var cat = this.scene.datum.atoms['category'].value, val = this.scene.datum.atoms['value'].value;
+ return "" + cat + " " + format("#.###,", val);
+ },
+ extensionPoints : {
+ slice_strokeStyle : 'white'
+ }
};
- if(cores != ""){
+ if (cores != "") {
config.colors = cores;
}
new pvc.PieChart(config).setData(dados, {
crosstabMode : false
}).render();
- i3GEOF.graficointerativo1.aguarde.visibility = "hidden";
+ i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "hidden";
},
- pontos: function(dados, maior, cores, legendaY, legendaX, tipo) {
- config = i3GEOF.graficointerativo1.configDefault(dados, maior, cores,
- legendaY, legendaX);
+ pontos : function(idjanela, dados, maior, cores, legendaY, legendaX, tipo) {
+ config = i3GEOF.graficointerativo1.configDefault(idjanela, dados, maior, cores, legendaY, legendaX);
var config = {
- canvas : "i3GEOgraficointerativo1guia4objCanvas",
- animate : true,
- selectable : true,
- hoverable : true,
- valuesVisible : false,
- orthoAxisTitle : legendaY,
- valuesFont : 'normal 9px sans-serif ',
- baseAxisTitle : legendaX,
- yAxisTickFormatter : function(valor) {
- valor = valor + "";
- valor = format("#.###,", valor);
- return valor;
- },
- valueFormat : function(valor) {
- valor = valor + "";
- valor = format("#.###,", valor);
- return valor;
- },
- tooltipFormat : function(scene) {
- var cat = this.scene.datum.atoms['category'].value, val = this.scene.datum.atoms['value'].value;
- return "X: " + cat + " Y: "
- + format("#.###,", val);
- }
+ canvas : idjanela + "i3GEOgraficointerativo1guia4objCanvas",
+ animate : true,
+ selectable : true,
+ hoverable : true,
+ valuesVisible : false,
+ orthoAxisTitle : legendaY,
+ valuesFont : 'normal 9px sans-serif ',
+ baseAxisTitle : legendaX,
+ yAxisTickFormatter : function(valor) {
+ valor = valor + "";
+ valor = format("#.###,", valor);
+ return valor;
+ },
+ valueFormat : function(valor) {
+ valor = valor + "";
+ valor = format("#.###,", valor);
+ return valor;
+ },
+ tooltipFormat : function(scene) {
+ var cat = this.scene.datum.atoms['category'].value, val = this.scene.datum.atoms['value'].value;
+ return "X: " + cat + " Y: " + format("#.###,", val);
+ }
};
- if(cores != ""){
+ if (cores != "") {
config.colors = cores;
}
new pvc.DotChart(config).setData(dados, {
crosstabMode : false
}).render();
- i3GEOF.graficointerativo1.aguarde.visibility = "hidden";
+ i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "hidden";
}
-};
+ };
diff --git a/ferramentas/tabela/index.js b/ferramentas/tabela/index.js
index 8802123..c58617a 100644
--- a/ferramentas/tabela/index.js
+++ b/ferramentas/tabela/index.js
@@ -1,590 +1,809 @@
-if(typeof(i3GEOF) === 'undefined'){
+if (typeof (i3GEOF) === 'undefined') {
var i3GEOF = {};
}
/*
-Classe: i3GEOF.tabela
+ * Classe: i3GEOF.tabela
*/
-i3GEOF.tabela = {
+i3GEOF.tabela =
+ {
/**
* Array com os ids das janelas ja criadas
*/
- janelas: [],
- propJanelas: {},
+ janelas : [],
+ propJanelas : {},
/*
- Para efeitos de compatibilidade antes da versão 4.7 que não tinha dicionário
+ * Para efeitos de compatibilidade antes da versão 4.7 que não tinha dicionário
*/
- criaJanelaFlutuante: function(){
+ criaJanelaFlutuante : function() {
i3GEOF.tabela.iniciaDicionario();
},
/*
- Function: iniciaDicionario
-
- Carrega o dicionário e chama a função que inicia a ferramenta
-
- O Javascript é carregado com o id i3GEOF.nomedaferramenta.dicionario_script
+ * Function: iniciaDicionario
+ *
+ * Carrega o dicionário e chama a função que inicia a ferramenta
+ *
+ * O Javascript é carregado com o id i3GEOF.nomedaferramenta.dicionario_script
*/
- iniciaDicionario: function(){
- if(typeof(i3GEOF.tabela.dicionario) === 'undefined'){
+ iniciaDicionario : function() {
+ if (typeof (i3GEOF.tabela.dicionario) === 'undefined') {
i3GEO.util.scriptTag(
- i3GEO.configura.locaplic+"/ferramentas/tabela/dicionario.js",
- "i3GEOF.tabela.iniciaJanelaFlutuante()",
- "i3GEOF.tabela.dicionario_script"
- );
- }
- else{
+ i3GEO.configura.locaplic + "/ferramentas/tabela/dicionario.js",
+ "i3GEOF.tabela.iniciaJanelaFlutuante()",
+ "i3GEOF.tabela.dicionario_script");
+ } else {
i3GEOF.tabela.iniciaJanelaFlutuante();
}
},
/*
- Function: inicia
-
- Inicia a ferramenta. É chamado por criaJanelaFlutuante
-
- Parametro:
-
- iddiv {String} - id do div que receberá o conteudo HTML da ferramenta
+ * Function: inicia
+ *
+ * Inicia a ferramenta. É chamado por criaJanelaFlutuante
+ *
+ * Parametro:
+ *
+ * iddiv {String} - id do div que receberá o conteudo HTML da ferramenta
*/
- inicia: function(iddiv,idjanela){
- var onButtonClick = function (p_sType, p_aArgs, botao) {
+ inicia : function(iddiv, idjanela) {
+ var onButtonClick = function(p_sType, p_aArgs, botao) {
var oMenuItem = p_aArgs[1];
if (oMenuItem) {
- if(oMenuItem.value != ""){
+ if (oMenuItem.value != "") {
i3GEO.mapa.ativaTema(oMenuItem.value);
- botao.set("label", "" + oMenuItem.cfg.getProperty("text") + " ");
+ botao.set(
+ "label",
+ "" + oMenuItem.cfg.getProperty("text") + " ");
i3GEOF.tabela.propJanelas[idjanela].tema = oMenuItem.value;
- $i(idjanela+"_corpo").innerHTML = "";
- i3GEOF.tabela.inicia(iddiv,idjanela);
+ $i(idjanela + "_corpo").innerHTML = "";
+ i3GEOF.tabela.inicia(
+ iddiv,
+ idjanela);
}
}
};
- i3GEO.janela.comboCabecalhoTemas(idjanela+"i3GEOFtabelaComboCabeca",idjanela+"i3GEOFtabelaComboCabecaSel","tabela","ligadosComTabela",onButtonClick);
- if(i3GEOF.tabela.propJanelas[idjanela].tema === ""){
- $i(iddiv).innerHTML = "";//''+$trad("x33")+'
';
+ i3GEO.janela.comboCabecalhoTemas(
+ idjanela + "i3GEOFtabelaComboCabeca",
+ idjanela + "i3GEOFtabelaComboCabecaSel",
+ "tabela",
+ "ligadosComTabela",
+ onButtonClick);
+ if (i3GEOF.tabela.propJanelas[idjanela].tema === "") {
+ $i(iddiv).innerHTML = "";// ''+$trad("x33")+'
';
return;
}
- try{
+ try {
$i(iddiv).innerHTML = i3GEOF.tabela.html(idjanela);
- i3GEO.guias.mostraGuiaFerramenta(idjanela+"i3GEOtabelaguia1",idjanela+"i3GEOtabelaguia");
- //eventos das guias
- $i(idjanela+"i3GEOtabelaguia6").onclick = function(){
- i3GEO.guias.mostraGuiaFerramenta(idjanela+"i3GEOtabelaguia6",idjanela+"i3GEOtabelaguia");
+ i3GEO.guias.mostraGuiaFerramenta(
+ idjanela + "i3GEOtabelaguia1",
+ idjanela + "i3GEOtabelaguia");
+ // eventos das guias
+ $i(idjanela + "i3GEOtabelaguia6").onclick = function() {
+ i3GEO.guias.mostraGuiaFerramenta(
+ idjanela + "i3GEOtabelaguia6",
+ idjanela + "i3GEOtabelaguia");
};
- $i(idjanela+"i3GEOtabelaguia1").onclick = function(){
- i3GEO.guias.mostraGuiaFerramenta(idjanela+"i3GEOtabelaguia1",idjanela+"i3GEOtabelaguia");
+ $i(idjanela + "i3GEOtabelaguia1").onclick = function() {
+ i3GEO.guias.mostraGuiaFerramenta(
+ idjanela + "i3GEOtabelaguia1",
+ idjanela + "i3GEOtabelaguia");
};
- $i(idjanela+"i3GEOtabelaguia3").onclick = function(){
- i3GEO.guias.mostraGuiaFerramenta(idjanela+"i3GEOtabelaguia3",idjanela+"i3GEOtabelaguia");
- if(!$i(idjanela+"i3GEOtabelaComboItensGuia3")){
+ $i(idjanela + "i3GEOtabelaguia3").onclick = function() {
+ i3GEO.guias.mostraGuiaFerramenta(
+ idjanela + "i3GEOtabelaguia3",
+ idjanela + "i3GEOtabelaguia");
+ if (!$i(idjanela + "i3GEOtabelaComboItensGuia3")) {
i3GEOF.tabela.comboItensEstat(idjanela);
}
};
- //relatorio
- $i(idjanela+"i3GEOtabelaguia5").onclick = function(){
- i3GEO.guias.mostraGuiaFerramenta(idjanela+"i3GEOtabelaguia5",idjanela+"i3GEOtabelaguia");
+ // relatorio
+ $i(idjanela + "i3GEOtabelaguia5").onclick = function() {
+ i3GEO.guias.mostraGuiaFerramenta(
+ idjanela + "i3GEOtabelaguia5",
+ idjanela + "i3GEOtabelaguia");
i3GEO.util.checkItensEditaveis(
- i3GEOF.tabela.propJanelas[idjanela].tema,
- function(retorno){
- if (retorno.tipo === "dados"){
- $i(idjanela+"i3GEOtabelaitensrelatorio").innerHTML = retorno.dados;
- }
- },
- idjanela+"i3GEOtabelaitensrelatorio",
- "320px",
- "",
- "sim"
- );
+ i3GEOF.tabela.propJanelas[idjanela].tema,
+ function(retorno) {
+ if (retorno.tipo === "dados") {
+ $i(idjanela + "i3GEOtabelaitensrelatorio").innerHTML = retorno.dados;
+ }
+ },
+ idjanela + "i3GEOtabelaitensrelatorio",
+ "320px",
+ "",
+ "sim");
i3GEO.util.comboItens(
- idjanela+"i3GEOtabelaagrupaItem",
- i3GEOF.tabela.propJanelas[idjanela].tema,
- function(retorno){
- if(retorno.tipo === "erro"){
- $i(idjanela+"i3GEOtabelaagrupamento").innerHTML = ""+$trad(2,i3GEOF.tabela.dicionario)+" ";
- }
- else{
- $i(idjanela+"i3GEOtabelaagrupamento").innerHTML = retorno.dados;
- }
- },
- idjanela+"i3GEOtabelaagrupamento",
- ""
- );
+ idjanela + "i3GEOtabelaagrupaItem",
+ i3GEOF.tabela.propJanelas[idjanela].tema,
+ function(retorno) {
+ if (retorno.tipo === "erro") {
+ $i(idjanela + "i3GEOtabelaagrupamento").innerHTML = "" + $trad(
+ 2,
+ i3GEOF.tabela.dicionario) + " ";
+ } else {
+ $i(idjanela + "i3GEOtabelaagrupamento").innerHTML = retorno.dados;
+ }
+ },
+ idjanela + "i3GEOtabelaagrupamento",
+ "");
};
new YAHOO.widget.Button(
- idjanela+"i3GEOtabelabotao2",
- {onclick:{fn: function(){
- i3GEOF.tabela.ativaSelecao(idjanela);
- }}}
- );
+ idjanela + "i3GEOtabelabotao2",
+ {
+ onclick : {
+ fn : function() {
+ i3GEOF.tabela.ativaSelecao(idjanela);
+ }
+ }
+ });
new YAHOO.widget.Button(
- idjanela+"i3GEOtabelabotao3",
- {onclick:{fn: function(){
- i3GEOF.tabela.limpaSelecao(idjanela);
- }}}
- );
+ idjanela + "i3GEOtabelabotao3",
+ {
+ onclick : {
+ fn : function() {
+ i3GEOF.tabela.limpaSelecao(idjanela);
+ }
+ }
+ });
new YAHOO.widget.Button(
- idjanela+"i3GEOtabelabotao6",
- {onclick:{fn: function(){
- i3GEOF.tabela.criaNovoTema(idjanela);
- }}}
- );
+ idjanela + "i3GEOtabelabotao6",
+ {
+ onclick : {
+ fn : function() {
+ i3GEOF.tabela.criaNovoTema(idjanela);
+ }
+ }
+ });
new YAHOO.widget.Button(
- idjanela+"i3GEOtabelabotaoLista",
- {onclick:{fn: function(){
- i3GEOF.tabela.pegaRegistros(idjanela);
- }}}
- );
+ idjanela + "i3GEOtabelabotaoLista",
+ {
+ onclick : {
+ fn : function() {
+ i3GEOF.tabela.pegaRegistros(idjanela);
+ }
+ }
+ });
new YAHOO.widget.Button(
- idjanela+"i3GEOtabelaGraficoI",
- {onclick:{fn: function(){
- i3GEO.mapa.ativaTema(i3GEOF.tabela.propJanelas[idjanela].tema);
- i3GEO.analise.dialogo.graficoInterativo1();
+ idjanela + "i3GEOtabelaGraficoI",
+ {
+ onclick : {
+ fn : function() {
+ i3GEO.mapa.ativaTema(i3GEOF.tabela.propJanelas[idjanela].tema);
+ i3GEO.analise.dialogo.graficoInterativo1();
+ }
}
- }}
- );
- $i(idjanela+"i3GEOtabelabotaoLista-button").style.minHeight = "1em";
- $i(idjanela+"i3GEOtabelabotaoLista-button").style.padding = "0px 15px";
- $i(idjanela+"i3GEOtabelabotaoLista-button").style.lineHeight = "1.3";
- $i(idjanela+"i3GEOtabelabotaoLista").style.position = "relative";
- $i(idjanela+"i3GEOtabelabotaoLista").style.top = "2px";
+ });
+ $i(idjanela + "i3GEOtabelabotaoLista-button").style.minHeight = "1em";
+ $i(idjanela + "i3GEOtabelabotaoLista-button").style.padding = "0px 15px";
+ $i(idjanela + "i3GEOtabelabotaoLista-button").style.lineHeight = "1.3";
+ $i(idjanela + "i3GEOtabelabotaoLista").style.position = "relative";
+ $i(idjanela + "i3GEOtabelabotaoLista").style.top = "2px";
new YAHOO.widget.Button(
- idjanela+"i3GEOtabelabotao4",
- {onclick:{fn: function(){
- i3GEOF.tabela.estatistica(idjanela);
- }}}
- );
+ idjanela + "i3GEOtabelabotao4",
+ {
+ onclick : {
+ fn : function() {
+ i3GEOF.tabela.estatistica(idjanela);
+ }
+ }
+ });
new YAHOO.widget.Button(
- idjanela+"i3GEOtabelabotao7",
- {onclick:{fn: function(){
- i3GEOF.tabela.relatorioTabela(idjanela);
- }}}
- );
+ idjanela + "i3GEOtabelabotao7",
+ {
+ onclick : {
+ fn : function() {
+ i3GEOF.tabela.relatorioTabela(idjanela);
+ }
+ }
+ });
new YAHOO.widget.Button(
- idjanela+"i3GEOtabelabotao5",
- {onclick:{fn: function(){
- i3GEOF.tabela.relatorioTexto(idjanela);
- }}}
- );
+ idjanela + "i3GEOtabelabotao5",
+ {
+ onclick : {
+ fn : function() {
+ i3GEOF.tabela.relatorioTexto(idjanela);
+ }
+ }
+ });
new YAHOO.widget.Button(
- idjanela+"i3GEOtabelabotaoVinculos",
- {onclick:{fn: function(){
- i3GEOF.tabela.vinculos.iniciaJanelaFlutuante();
- }}}
- );
- i3GEO.util.mensagemAjuda(idjanela+"i3GEOtabelamen1",$i(idjanela+"i3GEOtabelamen1").innerHTML);
+ idjanela + "i3GEOtabelabotaoVinculos",
+ {
+ onclick : {
+ fn : function() {
+ i3GEOF.tabela.vinculos.iniciaJanelaFlutuante();
+ }
+ }
+ });
+ i3GEO.util.mensagemAjuda(
+ idjanela + "i3GEOtabelamen1",
+ $i(idjanela + "i3GEOtabelamen1").innerHTML);
- if (i3GEO.parametros.r.toLowerCase() !== "sim"){
- $i(idjanela+"i3GEOtabelaguia4obj").innerHTML = $trad("x22");
+ if (i3GEO.parametros.r.toLowerCase() !== "sim") {
+ $i(idjanela + "i3GEOtabelaguia4obj").innerHTML = $trad("x22");
}
i3GEOF.tabela.pegaRegistros(idjanela);
+ } catch (erro) {
+ i3GEO.janela.tempoMsg(erro);
}
- catch(erro){i3GEO.janela.tempoMsg(erro);}
},
/*
- Function: html
-
- Gera o código html para apresentação das opções da ferramenta
-
- Retorno:
-
- String com o código html
+ * Function: html
+ *
+ * Gera o código html para apresentação das opções da ferramenta
+ *
+ * Retorno:
+ *
+ * String com o código html
*/
- html:function(idjanela){
- var ins = '';//
- ins += '
';
+ html : function(idjanela) {
+ var ins = '';//
+ ins += '
';
- ins += '
';
- //propriedades
- ins += '
';
+ ins +=
+ '
';
+ // propriedades
+ ins += '
';
- ins += '
';
- ins += '
';
+ ins += '
';
+ ins += '
';
ins += '
';
- ins += '
';
- ins += '
';
- ins += '
';
- ins += '
';
- ins += '
';
+ ins += '
';
+ ins += '
';
+ ins += '
';
+ ins += '
';
+ ins += '
';
- ins += '
';
- ins += ' '+$trad(16,i3GEOF.tabela.dicionario)+'
';
- ins += $inputText("","",idjanela+"i3GEOtabelainicio","",5,"1");
- ins += ' '+$trad(17,i3GEOF.tabela.dicionario)+" ";
- ins += '
';
- ins += $inputText("","",idjanela+"i3GEOtabelafim","",5,"20");
- ins += '
';
- ins += '
';
- //ins += '
'+$trad(36,i3GEOF.tabela.dicionario)+' ';
+ ins +=
+ '
';
+ ins +=
+ ' ' + $trad(
+ 16,
+ i3GEOF.tabela.dicionario) + '
';
+ ins += $inputText(
+ "",
+ "",
+ idjanela + "i3GEOtabelainicio",
+ "",
+ 5,
+ "1");
+ ins += ' ' + $trad(
+ 17,
+ i3GEOF.tabela.dicionario) + " ";
+ ins +=
+ '
';
+ ins += $inputText(
+ "",
+ "",
+ idjanela + "i3GEOtabelafim",
+ "",
+ 5,
+ "20");
+ ins +=
+ '
';
+ ins +=
+ '
';
+ // ins += '
'+$trad(36,i3GEOF.tabela.dicionario)+' ';
ins += '
';
- ins += '
';
+ ins += '
';
ins += '
';
ins += '
';
- ins += '
';
- ins += '
'+$trad(20,i3GEOF.tabela.dicionario)+': ';
- ins += '
'+$trad(21,i3GEOF.tabela.dicionario)+': ';
- ins += $inputText("","",idjanela+"i3GEOtabelafiltro1","",5,"");
- ins += '
';
- ins += '
';
+ ins += '
';
+ ins += '
' + $trad(
+ 20,
+ i3GEOF.tabela.dicionario) + ': ';
+ ins += '
' + $trad(
+ 21,
+ i3GEOF.tabela.dicionario) + ': ';
+ ins += $inputText(
+ "",
+ "",
+ idjanela + "i3GEOtabelafiltro1",
+ "",
+ 5,
+ "");
+ ins += '
';
+ ins +=
+ '
';
ins += '
';
- ins += '
';
- ins += '
'+$trad(23,i3GEOF.tabela.dicionario);
+ ins += '
';
+ ins += '
' + $trad(
+ 23,
+ i3GEOF.tabela.dicionario);
ins += '
';
ins += '
';
- //relatorios
- ins += '
';
- ins += '
'+$trad(24,i3GEOF.tabela.dicionario)+':';
- ins += '
';
+ // relatorios
+ ins += '
';
+ ins += '
' + $trad(
+ 24,
+ i3GEOF.tabela.dicionario) + ':';
+ ins +=
+ '
';
ins += '
';
- ins += '
'+$trad(25,i3GEOF.tabela.dicionario)+':';
- ins += '
';
return ins;
},
/*
- Function: criaJanelaFlutuante
-
- Cria a janela flutuante para controle da ferramenta.
+ * Function: criaJanelaFlutuante
+ *
+ * Cria a janela flutuante para controle da ferramenta.
*/
- iniciaJanelaFlutuante: function(){
- var minimiza,cabecalho,janela,divid,temp,titulo,
- id = "tabela"+parseInt(Math.random()*1000000,10);
- //i3GEO.janela.tempoMsg($trad(38,i3GEOF.tabela.dicionario));
+ iniciaJanelaFlutuante : function() {
+ var minimiza, cabecalho, janela, divid, temp, titulo, id = "tabela" + parseInt(
+ Math.random() * 1000000,
+ 10);
+ // i3GEO.janela.tempoMsg($trad(38,i3GEOF.tabela.dicionario));
i3GEOF.tabela.janelas.push(id);
i3GEOF.tabela.propJanelas[id] = {};
- i3GEOF.tabela.propJanelas[id].colunas = {"itens":[],"alias":[]};
+ i3GEOF.tabela.propJanelas[id].colunas = {
+ "itens" : [],
+ "alias" : []
+ };
i3GEOF.tabela.propJanelas[id].registros = [];
i3GEOF.tabela.propJanelas[id].tema = i3GEO.temaAtivo;
i3GEOF.tabela.propJanelas[id].atualiza = false;
- cabecalho = function(){
+ cabecalho = function() {
i3GEOF.tabela.ativaFoco(id);
};
- minimiza = function(){
+ minimiza = function() {
i3GEO.janela.minimiza(id);
};
- duplica = function(){
+ duplica = function() {
i3GEOF.tabela.iniciaJanelaFlutuante();
};
- //cria a janela flutuante
- titulo = "
"+$trad(1,i3GEOF.tabela.dicionario)+"
";
+ // cria a janela flutuante
+ titulo =
+ "
" + $trad(
+ 1,
+ i3GEOF.tabela.dicionario) + "
";
janela = i3GEO.janela.cria(
- "500px",
- "400px",
- "",
- "",
- "",
- titulo,
- id,
- false,
- "hd",
- cabecalho,
- minimiza,
- "",
- true,
- i3GEO.configura.locaplic+"/imagens/oxygen/16x16/view-form-table.png",
- duplica
- );
+ "500px",
+ "400px",
+ "",
+ "",
+ "",
+ titulo,
+ id,
+ false,
+ "hd",
+ cabecalho,
+ minimiza,
+ "",
+ true,
+ i3GEO.configura.locaplic + "/imagens/oxygen/16x16/view-form-table.png",
+ duplica);
divid = janela[2].id;
- if(i3GEOF.tabela.janelas.length > 1){
+ if (i3GEOF.tabela.janelas.length > 1) {
temp = janela[0].cfg.config;
- janela[0].moveTo(temp.x.value + (i3GEOF.tabela.janelas.length * 50),temp.y.value + (i3GEOF.tabela.janelas.length * 15));
+ janela[0].moveTo(
+ temp.x.value + (i3GEOF.tabela.janelas.length * 50),
+ temp.y.value + (i3GEOF.tabela.janelas.length * 15));
}
- $i(id+"_corpo").style.backgroundColor = "white";
- i3GEOF.tabela.propJanelas[id].aguarde = $i(id+"_imagemCabecalho").style;
+ $i(id + "_corpo").style.backgroundColor = "white";
+ i3GEOF.tabela.propJanelas[id].aguarde = $i(id + "_imagemCabecalho").style;
i3GEOF.tabela.propJanelas[id].atualiza = true;
- //indica se a janela sera atualizada na navegacao
- temp = 'i3GEOF.tabela.propJanelas["'+id+'"].atualiza = this.checked';
- janela[0].setFooter("
"+$trad(41,i3GEOF.tabela.dicionario)+" ("+id+")
");
-
+ // indica se a janela sera atualizada na navegacao
+ temp = 'i3GEOF.tabela.propJanelas["' + id + '"].atualiza = this.checked';
+ janela[0]
+ .setFooter("
" + $trad(
+ 41,
+ i3GEOF.tabela.dicionario) + " (" + id + ")
");
- i3GEOF.tabela.inicia(divid,id);
- //inicia os eventos
- if(i3GEO.Interface.ATUAL === "openlayers"){
- if(i3GEO.eventos.NAVEGAMAPA.toString().search('i3GEOF.tabela.atualizaListaDeRegistros()') < 0){
+ i3GEOF.tabela.inicia(
+ divid,
+ id);
+ // inicia os eventos
+ if (i3GEO.Interface.ATUAL === "openlayers") {
+ if (i3GEO.eventos.NAVEGAMAPA.toString().search(
+ 'i3GEOF.tabela.atualizaListaDeRegistros()') < 0) {
i3GEO.eventos.NAVEGAMAPA.push("i3GEOF.tabela.atualizaListaDeRegistros()");
}
}
- if(i3GEO.Interface.ATUAL === "googlemaps" && !tabelaDragend){
- tabelaDragend = google.maps.event.addListener(i3GeoMap, "dragend", function() {i3GEOF.tabela.atualizaListaDeRegistros();});
- tabelaZoomend = google.maps.event.addListener(i3GeoMap, "zoomend", function() {i3GEOF.tebela.atualizaListaDeRegistros();});
+ if (i3GEO.Interface.ATUAL === "googlemaps" && !tabelaDragend) {
+ tabelaDragend = google.maps.event.addListener(
+ i3GeoMap,
+ "dragend",
+ function() {
+ i3GEOF.tabela.atualizaListaDeRegistros();
+ });
+ tabelaZoomend = google.maps.event.addListener(
+ i3GeoMap,
+ "zoomend",
+ function() {
+ i3GEOF.tebela.atualizaListaDeRegistros();
+ });
}
- if(i3GEO.Interface.ATUAL === "googleearth" && !tabelaDragend){
- tabelaDragend = google.earth.addEventListener(i3GeoMap.getView(), "viewchangeend", function() {i3GEOF.tabela.atualizaListaDeRegistros();});
+ if (i3GEO.Interface.ATUAL === "googleearth" && !tabelaDragend) {
+ tabelaDragend = google.earth.addEventListener(
+ i3GeoMap.getView(),
+ "viewchangeend",
+ function() {
+ i3GEOF.tabela.atualizaListaDeRegistros();
+ });
}
- temp = function(){
+ temp = function() {
i3GEOF.tabela.janelas.remove(id);
i3GEOF.tabela.propJanelas[id] = null;
- if(i3GEOF.tabela.janelas.length === 0){
- if(i3GEO.Interface.ATUAL === "openlayers"){
+ if (i3GEOF.tabela.janelas.length === 0) {
+ if (i3GEO.Interface.ATUAL === "openlayers") {
i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.tabela.atualizaListaDeRegistros()");
}
- if(i3GEO.Interface.ATUAL === "googlemaps"){
+ if (i3GEO.Interface.ATUAL === "googlemaps") {
google.maps.event.removeListener(tabelaDragend);
google.maps.event.removeListener(tabelaZoomend);
}
- if(i3GEO.Interface.ATUAL === "googleearth"){
+ if (i3GEO.Interface.ATUAL === "googleearth") {
google.earth.removeEventListener(tabelaDragend);
}
}
};
- YAHOO.util.Event.addListener(janela[0].close, "click", temp);
+ YAHOO.util.Event.addListener(
+ janela[0].close,
+ "click",
+ temp);
},
- atualizaCombosCabecalhos: function(){
- var i,id,
- n = i3GEOF.tabela.janelas.length;
- for(i=0;i
";
+ vinculos : {
+ ligacoes : [],
+ iniciaJanelaFlutuante : function() {
+ var janela, titulo;
+ // cria a janela flutuante
+ titulo =
+ " " + $trad(
+ 44,
+ i3GEOF.tabela.dicionario) + " ";
janela = i3GEO.janela.cria(
- "300px",
- "300px",
- "",
- "",
- "",
- titulo,
- "i3GEOFtabelaVinculos",
- true,
- "hd",
- "",
- "",
- "",
- true,
- i3GEO.configura.locaplic+"/imagens/oxygen/16x16/edit-table-cell-merge.png"
- );
+ "300px",
+ "300px",
+ "",
+ "",
+ "",
+ titulo,
+ "i3GEOFtabelaVinculos",
+ true,
+ "hd",
+ "",
+ "",
+ "",
+ true,
+ i3GEO.configura.locaplic + "/imagens/oxygen/16x16/edit-table-cell-merge.png");
divid = janela[2].id;
- if(i3GEOF.tabela.janelas.length > 1){
+ if (i3GEOF.tabela.janelas.length > 1) {
temp = janela[0].cfg.config;
- janela[0].moveTo(temp.x.value + (i3GEOF.tabela.janelas.length * 50),temp.y.value + (i3GEOF.tabela.janelas.length * 15));
+ janela[0].moveTo(
+ temp.x.value + (i3GEOF.tabela.janelas.length * 50),
+ temp.y.value + (i3GEOF.tabela.janelas.length * 15));
}
$i("i3GEOFtabelaVinculos_corpo").style.backgroundColor = "white";
i3GEOF.tabela.vinculos.inicia();
},
- html: function(){
- var ins = "" +
- " " +
- " " + $trad(45,i3GEOF.tabela.dicionario) + " " +
- i3GEOF.tabela.comboJanelas("i3GEOFTabelaOpcoesAdicionaVinculoT1","i3GEOF.tabela.vinculos.comboColunasT1()") +
- "
" +
- " " + $trad(46,i3GEOF.tabela.dicionario) + " " +
- i3GEOF.tabela.comboJanelas("i3GEOFTabelaOpcoesAdicionaVinculoT2","i3GEOF.tabela.vinculos.comboColunasT2()") +
- "
" +
- "
" +
- " " +
- " " +
- " ";
+ html : function() {
+ var ins =
+ "" + " " + " " + $trad(
+ 45,
+ i3GEOF.tabela.dicionario) + " " + i3GEOF.tabela.comboJanelas(
+ "i3GEOFTabelaOpcoesAdicionaVinculoT1",
+ "i3GEOF.tabela.vinculos.comboColunasT1()") +
+ "
" + " " +
+ $trad(
+ 46,
+ i3GEOF.tabela.dicionario) + " " + i3GEOF.tabela.comboJanelas(
+ "i3GEOFTabelaOpcoesAdicionaVinculoT2",
+ "i3GEOF.tabela.vinculos.comboColunasT2()") +
+ "
" +
+ "
" + " " +
+ " " + " ";
return ins;
},
- inicia: function(){
+ inicia : function() {
$i("i3GEOFtabelaVinculos_corpo").innerHTML = i3GEOF.tabela.vinculos.html();
new YAHOO.widget.Button(
- "i3GEOFTabelaVinculoBotaoCriar",
- {onclick:{fn: function(){
- var t1 = $i("i3GEOFTabelaOpcoesAdicionaVinculoT1").value,
- t2 = $i("i3GEOFTabelaOpcoesAdicionaVinculoT2").value,
- c1 = $i("i3GEOFTabelaOpcoesAdicionaVinculoColunaT1").value,
- c2 = $i("i3GEOFTabelaOpcoesAdicionaVinculoColunaT1").value;
- if(t1 != "" && t2 != "" && c1 != "" && c2 != ""){
- i3GEOF.tabela.vinculos.ligacoes.push({
- "t1": t1,
- "t2": t2,
- "c1": c1,
- "c2": c2
- });
+ "i3GEOFTabelaVinculoBotaoCriar",
+ {
+ onclick : {
+ fn : function() {
+ var t1 = $i("i3GEOFTabelaOpcoesAdicionaVinculoT1").value, t2 =
+ $i("i3GEOFTabelaOpcoesAdicionaVinculoT2").value, c1 =
+ $i("i3GEOFTabelaOpcoesAdicionaVinculoColunaT1").value, c2 =
+ $i("i3GEOFTabelaOpcoesAdicionaVinculoColunaT1").value;
+ if (t1 != "" && t2 != "" && c1 != "" && c2 != "") {
+ i3GEOF.tabela.vinculos.ligacoes.push({
+ "t1" : t1,
+ "t2" : t2,
+ "c1" : c1,
+ "c2" : c2
+ });
+ }
+ i3GEOF.tabela.vinculos.lista();
}
- i3GEOF.tabela.vinculos.lista();
- }}}
- );
+ }
+ });
i3GEOF.tabela.vinculos.lista();
},
- comboColunasT1: function(){
+ comboColunasT1 : function() {
var colunas = i3GEOF.tabela.comboColunas(
- $i("i3GEOFTabelaOpcoesAdicionaVinculoT1").value,
- "i3GEOFTabelaOpcoesAdicionaVinculoColunaT1"
- ),
- ins = "";
- ins = " " + $trad(48,i3GEOF.tabela.dicionario) + " " + colunas;
+ $i("i3GEOFTabelaOpcoesAdicionaVinculoT1").value,
+ "i3GEOFTabelaOpcoesAdicionaVinculoColunaT1"), ins = "";
+ ins = "
" + $trad(
+ 48,
+ i3GEOF.tabela.dicionario) + " " + colunas;
$i("i3GEOFTabelaVinculoT1Colunas").innerHTML = ins;
},
- comboColunasT2: function(){
+ comboColunasT2 : function() {
var colunas = i3GEOF.tabela.comboColunas(
- $i("i3GEOFTabelaOpcoesAdicionaVinculoT2").value,
- "i3GEOFTabelaOpcoesAdicionaVinculoColunaT2"
- ),
- ins = "";
- ins = "
" + $trad(48,i3GEOF.tabela.dicionario) + " " + colunas;
- $i("i3GEOFTabelaVinculoT2Colunas").innerHTML = ins;
+ $i("i3GEOFTabelaOpcoesAdicionaVinculoT2").value,
+ "i3GEOFTabelaOpcoesAdicionaVinculoColunaT2"), ins = "";
+ ins = "
" + $trad(
+ 48,
+ i3GEOF.tabela.dicionario) + " " + colunas;
+ $i("i3GEOFTabelaVinculoT2Colunas").innerHTML = ins;
},
- lista: function(){
- var v = i3GEOF.tabela.vinculos.ligacoes,
- n = v.length,
- ins = "
" + $trad(44,i3GEOF.tabela.dicionario) + "
",
- i;
- for(i=0;i " + v[i].t1 + " " + v[i].c1 +" -> " + v[i].t2 + " " + v[i].c2 + "";
+ lista : function() {
+ var v = i3GEOF.tabela.vinculos.ligacoes, n = v.length, ins = "
" + $trad(
+ 44,
+ i3GEOF.tabela.dicionario) + "
", i;
+ for (i = 0; i < n; i++) {
+ ins +=
+ " " + v[i].t1 + " " + v[i].c1 + " -> " + v[i].t2 + " " + v[i].c2 + "
";
}
$i("i3GEOFtabelaVinculosLista").innerHTML = ins;
},
- excluir: function(i){
- i3GEOF.tabela.vinculos.ligacoes.splice(parseInt(i,10),1);
+ excluir : function(i) {
+ i3GEOF.tabela.vinculos.ligacoes.splice(
+ parseInt(
+ i,
+ 10),
+ 1);
i3GEOF.tabela.vinculos.lista();
},
- atualizaVinculos: function(tabelaOrigem,registro,marcado){
- var v = i3GEOF.tabela.vinculos.ligacoes,
- n = v.length,
- i,valor;
- if(n > 0){
- for(i=0;i 0) {
+ for (i = 0; i < n; i++) {
+ // verifica se o vinculo existe
+ if (v[i].t1 === tabelaOrigem) {
+ // pega o valor do registro na tabela origem
+ valor = i3GEOF.tabela.vinculos.pegaValorRegistro(
+ v[i].t1,
+ v[i].c1,
+ registro);
+ // marca o registro na tabela destino
+ i3GEOF.tabela.vinculos.registro(
+ v[i].t2,
+ v[i].c2,
+ valor,
+ marcado);
}
- if(v[i].t2 === tabelaOrigem){
- //pega o valor do registro na tabela origem
- valor = i3GEOF.tabela.vinculos.pegaValorRegistro(v[i].t2,v[i].c2,registro);
- //marca o registro na tabela destino
- i3GEOF.tabela.vinculos.registro(v[i].t1,v[i].c1,valor,marcado);
+ if (v[i].t2 === tabelaOrigem) {
+ // pega o valor do registro na tabela origem
+ valor = i3GEOF.tabela.vinculos.pegaValorRegistro(
+ v[i].t2,
+ v[i].c2,
+ registro);
+ // marca o registro na tabela destino
+ i3GEOF.tabela.vinculos.registro(
+ v[i].t1,
+ v[i].c1,
+ valor,
+ marcado);
}
}
}
},
- //verifica qtas colunas devem ser puladas em cada linha
- colunasVazias: function(idjanela){
- var tabela = $i(idjanela+"i3GEOtabelatabelai"),
- linhas = tabela.getElementsByTagName("tr"),
- pular = 0,
- colunas,n,i;
+ // verifica qtas colunas devem ser puladas em cada linha
+ colunasVazias : function(idjanela) {
+ var tabela = $i(idjanela + "i3GEOtabelatabelai"), linhas = tabela.getElementsByTagName("tr"), pular = 0, colunas, n, i;
colunas = linhas[0].getElementsByTagName("td");
n = colunas.length;
- for(i=0;i 0){
+ // retorna o indice de uma coluna que contem a tag input na tabela
+ // com a lista de valores
+ indiceColunaInput : function(idjanela) {
+ var tabela = $i(idjanela + "i3GEOtabelatabelai"), linhas = tabela.getElementsByTagName("tr"), linha = linhas[1], colunas =
+ linha.getElementsByTagName("td"), indice = 0, n = colunas.length, i;
+ for (i = 0; i < n; i++) {
+ if (colunas[i].getElementsByTagName("input").length > 0) {
return i;
}
}
return indice;
},
- //pega o valor da coluna em uma tabela com a lista de valores com base no codigo do registro
- pegaValorRegistro: function(idjanela,coluna,registro){
- var tabela = $i(idjanela+"i3GEOtabelatabelai"),
- linhas = tabela.getElementsByTagName("tr"),
- n = linhas.length,
- indiceColuna = i3GEOF.tabela.vinculos.indiceColuna(idjanela,coluna),
- indiceColunaInput = i3GEOF.tabela.vinculos.indiceColunaInput(idjanela),
- i,linha,colunas;
- for(i=1;i" +
- " --- ";
- for(i=0;i" +
+ " --- ";
+ for (i = 0; i < n; i++) {
ins += "" + i3GEOF.tabela.janelas[i] + " ";
}
ins += "";
return ins;
},
- comboColunas: function(idJanela,idcombo,funcao,w){
- var i,
- c = i3GEOF.tabela.propJanelas[idJanela].colunas,
- n = c.itens.length;
- if(!funcao){
+ comboColunas : function(idJanela, idcombo, funcao, w) {
+ var i, c = i3GEOF.tabela.propJanelas[idJanela].colunas, n = c.itens.length;
+ if (!funcao) {
funcao = "";
}
- if(!w){
+ if (!w) {
w = 250;
}
- ins = "" +
- " " +
- " --- ";
- for(i=0;i" +
+ " --- ";
+ for (i = 0; i < n; i++) {
ins += "" + c.alias[i] + " ";
}
ins += " ";
return ins;
},
/*
- Function: ativaAutoAtualiza
-
- Ativa ou desativa a atualização automática da tabela quando o usuário navega no mapa
+ * Function: ativaAutoAtualiza
+ *
+ * Ativa ou desativa a atualização automática da tabela quando o usuário navega no mapa
*/
- atualizaListaDeRegistros:function(){
- var i,
- janelas = i3GEOF.tabela.janelas,
- propJanelas = i3GEOF.tabela.propJanelas,
- n = janelas.length;
- for(i=0;i
+ * Function: pegaRegistros
+ *
+ * Pega os registros da tabela de atributos do tema
+ *
+ * Veja:
+ *
+ *
*/
- pegaRegistros: function(idjanela,tipolista,dadosDaClasse,inicio,fim,funcao){
- if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible")
- {return;}
- if(!idjanela){
+ pegaRegistros : function(idjanela, tipolista, dadosDaClasse, inicio, fim, funcao) {
+ if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") {
+ return;
+ }
+ if (!idjanela) {
idjanela = "";
}
i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible";
- $i(idjanela+"i3GEOtabelaregistros").innerHTML = "";
- var p,ext,
- tiporeg = "brasil",
- cp = new cpaint();
- //verifica se esta no modo de atualizacao automatica
- if(i3GEOF.tabela.propJanelas[idjanela].atualiza === true){
+ $i(idjanela + "i3GEOtabelaregistros").innerHTML = "";
+ var p, ext, tiporeg = "brasil", cp = new cpaint();
+ // verifica se esta no modo de atualizacao automatica
+ if (i3GEOF.tabela.propJanelas[idjanela].atualiza === true) {
tiporeg = "mapa";
}
- if(!tipolista){
- if ($i(idjanela+"i3GEOtabelatipolista").checked){
+ if (!tipolista) {
+ if ($i(idjanela + "i3GEOtabelatipolista").checked) {
tipolista = "selecionados";
- }
- else{
+ } else {
tipolista = "tudo";
}
}
- if(!dadosDaClasse){
- if ($i(idjanela+"i3GEOtabelalegenda").checked){
+ if (!dadosDaClasse) {
+ if ($i(idjanela + "i3GEOtabelalegenda").checked) {
dadosDaClasse = "sim";
- }
- else{
+ } else {
dadosDaClasse = "nao";
}
}
- if(!inicio){
- inicio = $i(idjanela+"i3GEOtabelainicio").value - 1;
- }
- else{
+ if (!inicio) {
+ inicio = $i(idjanela + "i3GEOtabelainicio").value - 1;
+ } else {
inicio = "";
}
- if(!fim){
- fim = $i(idjanela+"i3GEOtabelafim").value - 1;
- }
- else{
+ if (!fim) {
+ fim = $i(idjanela + "i3GEOtabelafim").value - 1;
+ } else {
fim = "";
}
- if(!funcao){
- funcao = function(retorno){
+ if (!funcao) {
+ funcao = function(retorno) {
i3GEOF.tabela.propJanelas[idjanela].registros = [];
- i3GEOF.tabela.montaTabela(retorno,idjanela);
+ i3GEOF.tabela.montaTabela(
+ retorno,
+ idjanela);
};
}
ext = i3GEO.parametros.mapexten;
ext = i3GEO.util.extOSM2Geo(ext);
- p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+
- "&funcao=listaregistros"+
- "&inicio="+inicio+
- "&fim="+fim+
- "&tema="+i3GEOF.tabela.propJanelas[idjanela].tema+
- "&tipo="+tiporeg+
- "&tipolista="+tipolista+
- "&ext="+ext+
- "&dadosDaClasse="+dadosDaClasse;
+ p =
+ i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" + i3GEO.configura.sid + "&funcao=listaregistros" +
+ "&inicio=" + inicio + "&fim=" + fim + "&tema=" + i3GEOF.tabela.propJanelas[idjanela].tema + "&tipo=" + tiporeg +
+ "&tipolista=" + tipolista + "&ext=" + ext + "&dadosDaClasse=" + dadosDaClasse;
cp.set_response_type("JSON");
- cp.call(p,"listaRegistros",funcao);
+ cp.call(
+ p,
+ "listaRegistros",
+ funcao);
},
/*
- Function: montaTabela
-
- Monta a visualização da tabela de atributos
+ * Function: montaTabela
+ *
+ * Monta a visualização da tabela de atributos
*/
- montaTabela: function(retorno,idjanela){
- if (retorno.data !== undefined){
- var ins,
- i,
- vals,
- cor,
- j,
- n,
- stat,
- imagem,
- registros = i3GEOF.tabela.propJanelas[idjanela].registros,
- i3GEOtabelalegenda = $i(idjanela+"i3GEOtabelalegenda").checked;
- //cabecalho da tabela
- ins = "";
- ins += " ";
+ montaTabela : function(retorno, idjanela) {
+ if (retorno.data !== undefined) {
+ var ins, i, vals, cor, j, n, stat, imagem, registros = i3GEOF.tabela.propJanelas[idjanela].registros, i3GEOtabelalegenda =
+ $i(idjanela + "i3GEOtabelalegenda").checked;
+ // cabecalho da tabela
+ ins = "";
+ ins +=
+ " ";
i3GEOF.tabela.propJanelas[idjanela].colunas = {
- "itens": retorno.data[0].itens,
- "alias": retorno.data[0].alias
+ "itens" : retorno.data[0].itens,
+ "alias" : retorno.data[0].alias
};
n = retorno.data[0].itens.length;
- for (i=0;i" +
- " " +
- " "+retorno.data[0].alias[i]+" ";
+ for (i = 0; i < n; i++) {
+ ins +=
+ "" +
+ " " +
+ " " +
+ retorno.data[0].alias[i] + " ";
}
ins += " ";
cor = "linha";
n = retorno.data[1].registros.length;
- if($i(idjanela+"i3GEOtabelafim").value === ""){
- $i(idjanela+"i3GEOtabelafim").value = n - 1;
+ if ($i(idjanela + "i3GEOtabelafim").value === "") {
+ $i(idjanela + "i3GEOtabelafim").value = n - 1;
}
- for (i=0;i ";
+ for (i = 0; i < n; i++) {
+ ins +=
+ " ";
ins += "";
- if(retorno.data[1].registros[i].ext && retorno.data[1].registros[i].ext != ""){
- ins += " ";
+ if (retorno.data[1].registros[i].ext && retorno.data[1].registros[i].ext != "") {
+ ins +=
+ " ";
}
ins += " ";
stat = "";
- if(retorno.data[1].registros[i].status === "CHECKED"){
+ if (retorno.data[1].registros[i].status === "CHECKED") {
stat = "CHECKED";
}
- if(registros[retorno.data[1].registros[i].indice]){
- if(registros[retorno.data[1].registros[i].indice] === true){
+ if (registros[retorno.data[1].registros[i].indice]) {
+ if (registros[retorno.data[1].registros[i].indice] === true) {
stat = "CHECKED";
- }
- else{
+ } else {
stat = "";
}
}
- ins += " ";
- if(i3GEOtabelalegenda == true){
+ ins +=
+ " ";
+ if (i3GEOtabelalegenda == true) {
imagem = retorno.data.legenda[retorno.data[1].registros[i].classe["indice"]];
- ins += " ";
+ ins += " ";
+ } else {
+ ins += " ";
}
- else
- {ins += " ";}
- if(stat === "CHECKED"){
+ if (stat === "CHECKED") {
registros[retorno.data[1].registros[i].indice] = true;
}
vals = retorno.data[1].registros[i].valores;
- for (j=0;j"+vals[j].valor+"";
+ for (j = 0; j < vals.length; j++) {
+ ins += "" + vals[j].valor + " ";
}
- if (cor === "linha"){
+ if (cor === "linha") {
cor = "linha1";
- }
- else{
+ } else {
cor = "linha";
}
}
- $i(idjanela+"i3GEOtabelaregistros").innerHTML = ins;
+ $i(idjanela + "i3GEOtabelaregistros").innerHTML = ins;
}
i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
},
/*
- Function: mais
-
- Avança o contador de registros para a listagem
+ * Function: mais
+ *
+ * Avança o contador de registros para a listagem
*/
- mais:function(idjanela){
- if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible")
- {return;}
- var i = $i(idjanela+"i3GEOtabelainicio").value * 1,
- f = $i(idjanela+"i3GEOtabelafim").value * 1,
- d = f - i;
- $i(idjanela+"i3GEOtabelainicio").value = f + 1;
- $i(idjanela+"i3GEOtabelafim").value = f + d + 1;
+ mais : function(idjanela) {
+ if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") {
+ return;
+ }
+ var i = $i(idjanela + "i3GEOtabelainicio").value * 1, f = $i(idjanela + "i3GEOtabelafim").value * 1, d = f - i;
+ $i(idjanela + "i3GEOtabelainicio").value = f + 1;
+ $i(idjanela + "i3GEOtabelafim").value = f + d + 1;
i3GEOF.tabela.pegaRegistros(idjanela);
},
/*
- Function: todos
-
- Avança o contador de registros para o fim da listagem
+ * Function: todos
+ *
+ * Avança o contador de registros para o fim da listagem
*/
- todos:function(idjanela){
- if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible")
- {return;}
- $i(idjanela+"i3GEOtabelainicio").value = 1;
- $i(idjanela+"i3GEOtabelafim").value = "";
- i3GEOF.tabela.pegaRegistros(idjanela,false,false,false,1,true);
+ todos : function(idjanela) {
+ if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") {
+ return;
+ }
+ $i(idjanela + "i3GEOtabelainicio").value = 1;
+ $i(idjanela + "i3GEOtabelafim").value = "";
+ i3GEOF.tabela.pegaRegistros(
+ idjanela,
+ false,
+ false,
+ false,
+ 1,
+ true);
},
/*
- Function: menos
-
- Retrocede o contador de registros para a listagem
+ * Function: menos
+ *
+ * Retrocede o contador de registros para a listagem
*/
- menos: function(idjanela){
- if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible")
- {return;}
- var i = $i(idjanela+"i3GEOtabelainicio").value * 1,
- f = $i(idjanela+"i3GEOtabelafim").value * 1,
- d = f - i;
- $i(idjanela+"i3GEOtabelainicio").value = i - d - 1;
- $i(idjanela+"i3GEOtabelafim").value = i - 1;
- if ($i(idjanela+"i3GEOtabelainicio").value < 1){
- $i(idjanela+"i3GEOtabelainicio").value = 1;
- $i(idjanela+"i3GEOtabelafim").value = 1 + d;
+ menos : function(idjanela) {
+ if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") {
+ return;
+ }
+ var i = $i(idjanela + "i3GEOtabelainicio").value * 1, f = $i(idjanela + "i3GEOtabelafim").value * 1, d = f - i;
+ $i(idjanela + "i3GEOtabelainicio").value = i - d - 1;
+ $i(idjanela + "i3GEOtabelafim").value = i - 1;
+ if ($i(idjanela + "i3GEOtabelainicio").value < 1) {
+ $i(idjanela + "i3GEOtabelainicio").value = 1;
+ $i(idjanela + "i3GEOtabelafim").value = 1 + d;
}
i3GEOF.tabela.pegaRegistros(idjanela);
},
/*
- Function: excluiColuna
-
- Exclui uma coluna da visualização da tabela
+ * Function: excluiColuna
+ *
+ * Exclui uma coluna da visualização da tabela
*/
- excluiColuna: function(coluna,cid,idjanela){
+ excluiColuna : function(coluna, cid, idjanela) {
i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible";
- try{
- var tabela = $i(idjanela+"i3GEOtabelatabelai"),
- trs,
- tds,
- i,
- t,
- nt,
- ni;
- //pega o indice correto
+ try {
+ var tabela = $i(idjanela + "i3GEOtabelatabelai"), trs, tds, i, t, nt, ni;
+ // pega o indice correto
tds = coluna.parentNode.parentNode.getElementsByTagName("td");
nt = tds.length;
- for (t=0;t";
+ ins = "";
npsortfim = psortfim.length;
- for (p=0;p" + trs[e].innerHTML + "";}
+ if (trs[e] !== undefined) {
+ ins += "" + trs[e].innerHTML + " ";
+ }
}
- $i(idjanela+"i3GEOtabelaregistros").innerHTML = ins+"
";
+ $i(idjanela + "i3GEOtabelaregistros").innerHTML = ins + "
";
i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
- }
- catch(e){
+ } catch (e) {
i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
- if(typeof(console) !== 'undefined'){console.error(e);}
+ if (typeof (console) !== 'undefined') {
+ console.error(e);
+ }
}
},
- excluiLinha: function(celula){
+ excluiLinha : function(celula) {
var p = celula.parentNode.parentNode;
- do{
+ do {
p.removeChild(p.childNodes[0]);
} while (p.childNodes.length > 0);
p.parentNode.removeChild(p);
},
- zoomExt: function(ext,idjanela){
- if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible")
- {return;}
+ zoomExt : function(ext, idjanela) {
+ if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") {
+ return;
+ }
i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible";
- var funcao = function(){
+ var funcao = function() {
i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
i3GEOF.tabela.pegaRegistros(idjanela);
i3GEO.atualiza();
};
- i3GEO.php.mudaext(funcao,"nenhum",ext);
+ i3GEO.php.mudaext(
+ funcao,
+ "nenhum",
+ ext);
},
- registraLinha: function(linha,idjanela){
+ registraLinha : function(linha, idjanela) {
i3GEOF.tabela.propJanelas[idjanela].registros[linha.name] = linha.checked;
- i3GEOF.tabela.vinculos.atualizaVinculos(idjanela,linha.name,linha.checked);
+ i3GEOF.tabela.vinculos.atualizaVinculos(
+ idjanela,
+ linha.name,
+ linha.checked);
},
/*
- Function: listaMarcados
-
- Retorna um array com os índices dos registros que estão marcados.
+ * Function: listaMarcados
+ *
+ * Retorna um array com os índices dos registros que estão marcados.
*/
- listaMarcados: function(idjanela){
- var lista = [],
- registros = i3GEOF.tabela.propJanelas[idjanela].registros,
- i,
- n = registros.length;
- for (i=0;i
+ * Function: ativaSelecao
+ *
+ * Seleciona no mapa os elementos que estiverem marcados na guia 2
+ *
+ * Veja:
+ *
+ *
*/
- ativaSelecao: function(idjanela){
- if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible")
- {return;}
+ ativaSelecao : function(idjanela) {
+ if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") {
+ return;
+ }
i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible";
- var lista = i3GEOF.tabela.listaMarcados(idjanela),
- p,
- cp,
- temp = function(retorno){
- if(retorno){
- i3GEO.Interface.atualizaTema(retorno,i3GEOF.tabela.propJanelas[idjanela].tema);
+ var lista = i3GEOF.tabela.listaMarcados(idjanela), p, cp, temp = function(retorno) {
+ if (retorno) {
+ i3GEO.Interface.atualizaTema(
+ retorno,
+ i3GEOF.tabela.propJanelas[idjanela].tema);
i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
}
};
- p = i3GEO.configura.locaplic+"/ferramentas/tabela/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=incluisel&tema="+i3GEOF.tabela.propJanelas[idjanela].tema+"&ids="+lista.toString();
+ p =
+ i3GEO.configura.locaplic + "/ferramentas/tabela/exec.php?g_sid=" + i3GEO.configura.sid + "&funcao=incluisel&tema=" +
+ i3GEOF.tabela.propJanelas[idjanela].tema + "&ids=" + lista.toString();
cp = new cpaint();
cp.set_response_type("JSON");
- cp.call(p,"incluiSel",temp);
+ cp.call(
+ p,
+ "incluiSel",
+ temp);
},
/*
- Function: limpaSelecao
-
- Limpa a seleção do tema da tabela
+ * Function: limpaSelecao
+ *
+ * Limpa a seleção do tema da tabela
*/
- limpaSelecao: function(idjanela){
- if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible")
- {return;}
+ limpaSelecao : function(idjanela) {
+ if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") {
+ return;
+ }
i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible";
i3GEO.tema.limpasel(i3GEOF.tabela.propJanelas[idjanela].tema);
i3GEOF.tabela.propJanelas[idjanela].registros = [];
- var lista = $i(idjanela+"i3GEOtabelatabelai").getElementsByTagName("input"),
- n = lista.length,
- i;
- for(i=0;i"+$trad(32,i3GEOF.tabela.dicionario)+" ";
- }
- else{
- $i(idjanela+"i3GEOtabelaitensGuia3").innerHTML = retorno.dados;
- }
- },
- idjanela+"i3GEOtabelaitensGuia3",
- ""
- );
+ idjanela + "i3GEOtabelaComboItensGuia3",
+ tema,
+ function(retorno) {
+ if (retorno.tipo === "erro") {
+ $i(idjanela + "i3GEOtabelaitensGuia3").innerHTML = "" + $trad(
+ 32,
+ i3GEOF.tabela.dicionario) + " ";
+ } else {
+ $i(idjanela + "i3GEOtabelaitensGuia3").innerHTML = retorno.dados;
+ }
+ },
+ idjanela + "i3GEOtabelaitensGuia3",
+ "");
},
- estatistica: function(idjanela){
- if($i(idjanela+"i3GEOtabelaComboItensGuia3").value === ""){
+ estatistica : function(idjanela) {
+ if ($i(idjanela + "i3GEOtabelaComboItensGuia3").value === "") {
i3GEO.janela.tempoMsg("Escolha um item!");
return;
}
- if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible")
- {return;}
+ if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") {
+ return;
+ }
i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible";
- try{
- var monta = function (retorno){
- var ins = "",
- nome,
- valor,
- i,
- n;
- if(retorno.data.indices !== undefined){
- if (retorno.data.indices){
+ try {
+ var monta = function(retorno) {
+ var ins = "", nome, valor, i, n;
+ if (retorno.data.indices !== undefined) {
+ if (retorno.data.indices) {
n = retorno.data.indices.length;
- for (i=0;i "+nome+": "+valor+"";
+ for (i = 0; i < n; i++) {
+ nome = eval("retorno.data.variaveis." + retorno.data.indices[i]);
+ valor = eval("retorno.data.valores." + retorno.data.indices[i]);
+ ins += " " + nome + ": " + valor + "
";
}
}
- }
- else{
+ } else {
ins = retorno.data;
}
- $i(idjanela+"i3GEOtabelaoperacoes").innerHTML = ins + " ";
+ $i(idjanela + "i3GEOtabelaoperacoes").innerHTML = ins + " ";
i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
- },
- exclui = "",
- cp = new cpaint(),
- p;
- if ($i(idjanela+"i3GEOtabelafiltro1").value !== "")
- {exclui = $i("i3GEOtabelafiltro1").value;}
- p = i3GEO.configura.locaplic+
- "/ferramentas/tabela/exec.php?g_sid="+i3GEO.configura.sid+
- "&funcao=estatistica&item="+$i(idjanela+"i3GEOtabelaComboItensGuia3").value+
- "&tema="+i3GEOF.tabela.propJanelas[idjanela].tema+
- "&exclui="+exclui+
- "&ext="+i3GEO.parametros.mapexten;
+ }, exclui = "", cp = new cpaint(), p;
+ if ($i(idjanela + "i3GEOtabelafiltro1").value !== "") {
+ exclui = $i("i3GEOtabelafiltro1").value;
+ }
+ p =
+ i3GEO.configura.locaplic + "/ferramentas/tabela/exec.php?g_sid=" + i3GEO.configura.sid + "&funcao=estatistica&item=" +
+ $i(idjanela + "i3GEOtabelaComboItensGuia3").value + "&tema=" + i3GEOF.tabela.propJanelas[idjanela].tema +
+ "&exclui=" + exclui + "&ext=" + i3GEO.parametros.mapexten;
cp.set_response_type("JSON");
- cp.call(p,"estatDescritivas",monta);
- }catch(e){
+ cp.call(
+ p,
+ "estatDescritivas",
+ monta);
+ } catch (e) {
i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
- $i("operacoes").innerHTML = "Ocorreu um erro: "+e;
+ $i("operacoes").innerHTML = "Ocorreu um erro: " + e;
}
},
- tabelaTexto:function(){
+ tabelaTexto : function() {
},
/*
- Function: relatorioTabela
-
- Monta o relatório padrão em uma nova janela
+ * Function: relatorioTabela
+ *
+ * Monta o relatório padrão em uma nova janela
*/
- relatorioTabela: function(idjanela){
- try{
- $i(idjanela+"i3GEOtabelatiporelh").value = "";
- $i(idjanela+"i3GEOtabelaarearelh").value = $i(idjanela+"i3GEOtabelacalculaarea").checked;
- $i(idjanela+"i3GEOtabelastatrelh").value = $i(idjanela+"i3GEOtabelacalculaestat").checked;
- $i(idjanela+"i3GEOtabelaexcluirvalorh").value = $i(idjanela+"i3GEOtabelaexcestat").value;
- $i(idjanela+"i3GEOtabelatemarelh").value=i3GEOF.tabela.propJanelas[idjanela].tema;
- $i(idjanela+"i3GEOtabelag_sidh").value=i3GEO.configura.sid;
- $i(idjanela+"i3GEOtabelaitemagruparelh").value=$i(idjanela+"i3GEOtabelaagrupaItem").value;
- var inputs = $i(idjanela+"i3GEOtabelaitensrelatorio").getElementsByTagName("input"),
- listai = [],
- listaordem = [],
- listanomes = [],
- nome,ordem,
- i,temp,
- n = inputs.length;
- for (i=0;i
-
+
@@ -50,7 +50,7 @@
-
+
@@ -58,7 +58,7 @@
-
+
@@ -73,7 +73,7 @@
-
+
@@ -88,7 +88,7 @@
-
+
@@ -144,9 +144,9 @@
-
+
-
+
--
libgit2 0.21.2