Commit 3ffa38aa6cf26bbac6cf7a625098a2c1f713f434

Authored by Edmar Moretti
1 parent 53173340

Reformulação da ferramenta gráfico interativo para permitir abertura em mais de uma janela

ferramentas/graficointerativo1/dicionario.js
1 1 //+$trad(1,i3GEOF.graficointerativo1.dicionario)+
2   -i3GEOF.graficointerativo1.dicionario = {
3   - 1: [{
4   - pt:"Tipo",
5   - en:"",
6   - es:"",
7   - it:""
8   - }],
9   - 2: [{
10   - pt:"Dados",
11   - en:"",
12   - es:"",
13   - it:""
14   - }],
15   - 3: [{
16   - pt:"Gráfico",
17   - en:"",
18   - es:"",
19   - it:""
20   - }],
21   - 4: [{
22   - pt:"Escolha o tipo de gráfico",
23   - en:"",
24   - es:"",
25   - it:""
26   - }],
27   - 5: [{
28   - pt:"pizza 2d",
29   - en:"",
30   - es:"",
31   - it:""
32   - }],
33   - 6: [{
34   - pt:"área simples",
35   - en:"",
36   - es:"",
37   - it:""
38   - }],
39   - 7: [{
40   - pt:"distribuição de pontos",
41   - en:"",
42   - es:"",
43   - it:""
44   - }],
45   - 8: [{
46   - pt:"linhas simples",
47   - en:"",
48   - es:"",
49   - it:""
50   - }],
51   - 9: [{
52   - pt:"Árvore",
53   - en:"",
54   - es:"",
55   - it:""
56   - }],
57   - 10: [{
58   - pt:"barras verticais",
59   - en:"",
60   - es:"",
61   - it:""
62   - }],
63   - 11: [{
64   - pt:"barras horizontais",
65   - en:"",
66   - es:"",
67   - it:""
68   - }],
69   - 12: [{
70   - pt:"Configuração do gráfico",
71   - en:"",
72   - es:"",
73   - it:""
74   - }],
75   - 13: [{
76   - pt:"Tema",
77   - en:"",
78   - es:"",
79   - it:""
80   - }],
81   - 14: [{
82   - pt:"Item com as classes ou eixo X",
83   - en:"",
84   - es:"",
85   - it:""
86   - }],
87   - 15: [{
88   - pt:"Item(ns) com os valores ou eixo Y",
89   - en:"",
90   - es:"",
91   - it:""
92   - }],
93   - 16: [{
94   - pt:"Excluir o seguinte valor",
95   - en:"",
96   - es:"",
97   - it:""
98   - }],
99   - 17: [{
100   - pt:"gera cores aleatórias",
101   - en:"",
102   - es:"",
103   - it:""
104   - }],
105   - 18: [{
106   - pt:"Obter dados",
107   - en:"",
108   - es:"",
109   - it:""
110   - }],
111   - 19: [{
112   - 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.",
113   - en:"",
114   - es:"",
115   - it:""
116   - }],
117   - 20: [{
118   - pt:"Inclina os textos do eixo X",
119   - en:"",
120   - es:"",
121   - it:""
122   - }],
123   - 21: [{
124   - pt:"Adiciona as linhas em gráficos de barras",
125   - en:"",
126   - es:"",
127   - it:""
128   - }],
129   - 22: [{
130   - pt:"Utiliza valores acumulados",
131   - en:"",titleFont: 'bold 14px sans-serif',
132   - titlePosition: "top",
133   - es:"",
134   - it:""
135   - }],
136   - 23: [{
137   - pt:"Utiliza valores relativos",
138   - en:"",
139   - es:"",
140   - it:""
141   - }],
142   - 24: [{
143   - pt:"Ordena o eixo X",
144   - en:"",
145   - es:"",
146   - it:""
147   - }],
148   - 25: [{
149   - 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",
150   - en:"",
151   - es:"",
152   - it:""
153   - }],
154   - 26: [{
155   - pt:"Soma",
156   - en:"",
157   - es:"",
158   - it:""
159   - }],
160   - 27: [{
161   - pt:"Média",
162   - en:"",
163   - es:"",
164   - it:""
165   - }],
166   - 28: [{
167   - pt:"Tipo de agregação dos valores do eixo Y",
168   - en:"",
169   - es:"",
170   - it:""
171   - }],
172   - 29: [{
173   - 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.",
174   - en:"",
175   - es:"",
176   - it:""
177   - }],
178   - 30: [{
179   - pt:"abrir em uma janela separada",
180   - en:"",
181   - es:"",
182   - it:""
183   - }],
184   - 31: [{
185   - pt:"Escolha um tipo de grafico",
186   - en:"",
187   - es:"",
188   - it:""
189   - }],
190   - 32: [{
191   - pt:"erro ao ler os itens do tema de origem",
192   - en:"",
193   - es:"",
194   - it:""
195   - }],
196   - 33: [{
197   - pt:"Digite o título para legenda",
198   - en:"",
199   - es:"",
200   - it:""
201   - }],
202   - 34: [{
203   - pt:"Escolha um tema",
204   - en:"",
205   - es:"",
206   - it:""
207   - }],
208   - 35: [{
209   - pt:"Escolha um item para X",
210   - en:"",
211   - es:"",
212   - it:""
213   - }],
214   - 36: [{
215   - pt:"Escolha um item para Y",
216   - en:"",
217   - es:"",
218   - it:""
219   - }],
220   - 37: [{
221   - pt:"Os dados utilizados referem-se apenas à região atual mostrada no mapa",
222   - en:"",
223   - es:"",
224   - it:""
225   - }],
226   - 38: [{
227   - pt:"Tabela de dados para o gráfico. Os valores podem ser editados",
228   - en:"",
229   - es:"",
230   - it:""
231   - }],
232   - 39: [{
233   - pt:"nome",
234   - en:"",
235   - es:"",
236   - it:""
237   - }],
238   - 40: [{
239   - pt:"valor",
240   - en:"",
241   - es:"",
242   - it:""
243   - }],
244   - 41: [{
245   - pt:"cor",
246   - en:"",
247   - es:"",
248   - it:""
249   - }],
250   - 42: [{
251   - pt:"excluir",
252   - en:"",
253   - es:"",
254   - it:""
255   - }],
256   - 43: [{
257   - pt:"digite o novo nome",
258   - en:"",
259   - es:"",
260   - it:""
261   - }],
262   - 44: [{
263   - pt:"digite o novo valor",
264   - en:"",
265   - es:"",
266   - it:""
267   - }],
268   - 45: [{
269   - pt:"casos",
270   - en:"",
271   - es:"",
272   - it:""
273   - }],
274   - 46: [{
275   - pt:"n. de casos",
276   - en:"",
277   - es:"",
278   - it:""
279   - }],
280   - 47: [{
281   - pt:"Atualiza o gráfico ao navegar pelo mapa",
282   - en:"",
283   - es:"",
284   - it:""
285   - }],
286   - 48: [{
287   - pt:"Utiliza barras divididas entre os valores (stacked)",
288   - en:"",
289   - es:"",
290   - it:""
291   - }],
292   - 49: [{
293   - pt:"As linhas de dados ficam nas colunas",
294   - en:"",
295   - es:"",
296   - it:""
297   - }],
298   - 50: [{
299   - pt:"Título",
300   - en:"",
301   - es:"",
302   - it:""
303   - }],
304   - 51: [{
305   - pt:"Título do eixo X",
306   - en:"",
307   - es:"",
308   - it:""
309   - }],
310   - 52: [{
311   - pt:"Título do eixo Y",
312   - en:"",
313   - es:"",
314   - it:""
315   - }]
316   -};
317 2 \ No newline at end of file
  3 +i3GEOF.graficointerativo1.dicionario =
  4 + {
  5 + 1 : [
  6 + {
  7 + pt : "Tipo",
  8 + en : "",
  9 + es : "",
  10 + it : ""
  11 + }
  12 + ],
  13 + 2 : [
  14 + {
  15 + pt : "Dados",
  16 + en : "",
  17 + es : "",
  18 + it : ""
  19 + }
  20 + ],
  21 + 3 : [
  22 + {
  23 + pt : "Gráfico",
  24 + en : "",
  25 + es : "",
  26 + it : ""
  27 + }
  28 + ],
  29 + 4 : [
  30 + {
  31 + pt : "Escolha o tipo de gráfico",
  32 + en : "",
  33 + es : "",
  34 + it : ""
  35 + }
  36 + ],
  37 + 5 : [
  38 + {
  39 + pt : "pizza 2d",
  40 + en : "",
  41 + es : "",
  42 + it : ""
  43 + }
  44 + ],
  45 + 6 : [
  46 + {
  47 + pt : "área simples",
  48 + en : "",
  49 + es : "",
  50 + it : ""
  51 + }
  52 + ],
  53 + 7 : [
  54 + {
  55 + pt : "distribuição de pontos",
  56 + en : "",
  57 + es : "",
  58 + it : ""
  59 + }
  60 + ],
  61 + 8 : [
  62 + {
  63 + pt : "linhas simples",
  64 + en : "",
  65 + es : "",
  66 + it : ""
  67 + }
  68 + ],
  69 + 9 : [
  70 + {
  71 + pt : "Árvore",
  72 + en : "",
  73 + es : "",
  74 + it : ""
  75 + }
  76 + ],
  77 + 10 : [
  78 + {
  79 + pt : "barras verticais",
  80 + en : "",
  81 + es : "",
  82 + it : ""
  83 + }
  84 + ],
  85 + 11 : [
  86 + {
  87 + pt : "barras horizontais",
  88 + en : "",
  89 + es : "",
  90 + it : ""
  91 + }
  92 + ],
  93 + 12 : [
  94 + {
  95 + pt : "Configuração do gráfico",
  96 + en : "",
  97 + es : "",
  98 + it : ""
  99 + }
  100 + ],
  101 + 13 : [
  102 + {
  103 + pt : "Tema",
  104 + en : "",
  105 + es : "",
  106 + it : ""
  107 + }
  108 + ],
  109 + 14 : [
  110 + {
  111 + pt : "Item com as classes ou eixo X",
  112 + en : "",
  113 + es : "",
  114 + it : ""
  115 + }
  116 + ],
  117 + 15 : [
  118 + {
  119 + pt : "Item(ns) com os valores ou eixo Y",
  120 + en : "",
  121 + es : "",
  122 + it : ""
  123 + }
  124 + ],
  125 + 16 : [
  126 + {
  127 + pt : "Excluir o seguinte valor",
  128 + en : "",
  129 + es : "",
  130 + it : ""
  131 + }
  132 + ],
  133 + 17 : [
  134 + {
  135 + pt : "gera cores aleatórias",
  136 + en : "",
  137 + es : "",
  138 + it : ""
  139 + }
  140 + ],
  141 + 18 : [
  142 + {
  143 + pt : "Obter dados",
  144 + en : "",
  145 + es : "",
  146 + it : ""
  147 + }
  148 + ],
  149 + 19 : [
  150 + {
  151 + 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.",
  152 + en : "",
  153 + es : "",
  154 + it : ""
  155 + }
  156 + ],
  157 + 20 : [
  158 + {
  159 + pt : "Inclina os textos do eixo X",
  160 + en : "",
  161 + es : "",
  162 + it : ""
  163 + }
  164 + ],
  165 + 21 : [
  166 + {
  167 + pt : "Adiciona as linhas em gráficos de barras",
  168 + en : "",
  169 + es : "",
  170 + it : ""
  171 + }
  172 + ],
  173 + 22 : [
  174 + {
  175 + pt : "Utiliza valores acumulados",
  176 + en : "",
  177 + titleFont : 'bold 14px sans-serif',
  178 + titlePosition : "top",
  179 + es : "",
  180 + it : ""
  181 + }
  182 + ],
  183 + 23 : [
  184 + {
  185 + pt : "Utiliza valores relativos",
  186 + en : "",
  187 + es : "",
  188 + it : ""
  189 + }
  190 + ],
  191 + 24 : [
  192 + {
  193 + pt : "Ordena o eixo X",
  194 + en : "",
  195 + es : "",
  196 + it : ""
  197 + }
  198 + ],
  199 + 25 : [
  200 + {
  201 + 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",
  202 + en : "",
  203 + es : "",
  204 + it : ""
  205 + }
  206 + ],
  207 + 26 : [
  208 + {
  209 + pt : "Soma",
  210 + en : "",
  211 + es : "",
  212 + it : ""
  213 + }
  214 + ],
  215 + 27 : [
  216 + {
  217 + pt : "Média",
  218 + en : "",
  219 + es : "",
  220 + it : ""
  221 + }
  222 + ],
  223 + 28 : [
  224 + {
  225 + pt : "Tipo de agregação dos valores do eixo Y",
  226 + en : "",
  227 + es : "",
  228 + it : ""
  229 + }
  230 + ],
  231 + 29 : [
  232 + {
  233 + 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.",
  234 + en : "",
  235 + es : "",
  236 + it : ""
  237 + }
  238 + ],
  239 + 30 : [
  240 + {
  241 + pt : "abrir em uma janela separada",
  242 + en : "",
  243 + es : "",
  244 + it : ""
  245 + }
  246 + ],
  247 + 31 : [
  248 + {
  249 + pt : "Escolha um tipo de grafico",
  250 + en : "",
  251 + es : "",
  252 + it : ""
  253 + }
  254 + ],
  255 + 32 : [
  256 + {
  257 + pt : "erro ao ler os itens do tema de origem",
  258 + en : "",
  259 + es : "",
  260 + it : ""
  261 + }
  262 + ],
  263 + 33 : [
  264 + {
  265 + pt : "Digite o título para legenda",
  266 + en : "",
  267 + es : "",
  268 + it : ""
  269 + }
  270 + ],
  271 + 34 : [
  272 + {
  273 + pt : "Escolha um tema",
  274 + en : "",
  275 + es : "",
  276 + it : ""
  277 + }
  278 + ],
  279 + 35 : [
  280 + {
  281 + pt : "Escolha um item para X",
  282 + en : "",
  283 + es : "",
  284 + it : ""
  285 + }
  286 + ],
  287 + 36 : [
  288 + {
  289 + pt : "Escolha um item para Y",
  290 + en : "",
  291 + es : "",
  292 + it : ""
  293 + }
  294 + ],
  295 + 37 : [
  296 + {
  297 + pt : "Os dados utilizados referem-se apenas à região atual mostrada no mapa",
  298 + en : "",
  299 + es : "",
  300 + it : ""
  301 + }
  302 + ],
  303 + 38 : [
  304 + {
  305 + pt : "Tabela de dados para o gráfico. Os valores podem ser editados",
  306 + en : "",
  307 + es : "",
  308 + it : ""
  309 + }
  310 + ],
  311 + 39 : [
  312 + {
  313 + pt : "nome",
  314 + en : "",
  315 + es : "",
  316 + it : ""
  317 + }
  318 + ],
  319 + 40 : [
  320 + {
  321 + pt : "valor",
  322 + en : "",
  323 + es : "",
  324 + it : ""
  325 + }
  326 + ],
  327 + 41 : [
  328 + {
  329 + pt : "cor",
  330 + en : "",
  331 + es : "",
  332 + it : ""
  333 + }
  334 + ],
  335 + 42 : [
  336 + {
  337 + pt : "excluir",
  338 + en : "",
  339 + es : "",
  340 + it : ""
  341 + }
  342 + ],
  343 + 43 : [
  344 + {
  345 + pt : "digite o novo nome",
  346 + en : "",
  347 + es : "",
  348 + it : ""
  349 + }
  350 + ],
  351 + 44 : [
  352 + {
  353 + pt : "digite o novo valor",
  354 + en : "",
  355 + es : "",
  356 + it : ""
  357 + }
  358 + ],
  359 + 45 : [
  360 + {
  361 + pt : "casos",
  362 + en : "",
  363 + es : "",
  364 + it : ""
  365 + }
  366 + ],
  367 + 46 : [
  368 + {
  369 + pt : "n. de casos",
  370 + en : "",
  371 + es : "",
  372 + it : ""
  373 + }
  374 + ],
  375 + 47 : [
  376 + {
  377 + pt : "Atualiza o gráfico ao navegar pelo mapa",
  378 + en : "",
  379 + es : "",
  380 + it : ""
  381 + }
  382 + ],
  383 + 48 : [
  384 + {
  385 + pt : "Utiliza barras divididas entre os valores (stacked)",
  386 + en : "",
  387 + es : "",
  388 + it : ""
  389 + }
  390 + ],
  391 + 49 : [
  392 + {
  393 + pt : "As linhas de dados ficam nas colunas",
  394 + en : "",
  395 + es : "",
  396 + it : ""
  397 + }
  398 + ],
  399 + 50 : [
  400 + {
  401 + pt : "Título",
  402 + en : "",
  403 + es : "",
  404 + it : ""
  405 + }
  406 + ],
  407 + 51 : [
  408 + {
  409 + pt : "Título do eixo X",
  410 + en : "",
  411 + es : "",
  412 + it : ""
  413 + }
  414 + ],
  415 + 52 : [
  416 + {
  417 + pt : "Título do eixo Y",
  418 + en : "",
  419 + es : "",
  420 + it : ""
  421 + }
  422 + ],
  423 + 53 : [
  424 + {
  425 + pt : "Atualiza ao navegar",
  426 + en : "",
  427 + es : "",
  428 + it : ""
  429 + }
  430 + ]
  431 + };
318 432 \ No newline at end of file
... ...
ferramentas/graficointerativo1/index.js
1   -/*
2   -Title: Gráfico interativo 1
3   -
4   -Representação gráfica de dados. O gráfico é construído tendo como base os atributos de um tema e é modificado
5   -conforme o usuário navega pelo mapa. A renderização do gráfico é feito pelo navegador por meio do aplicativo openflashchart.
6   -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
7   -de atributos e editada pelo usuário. Os dados podem também ser inseridos como par�metros na inicialização da ferramenta,
8   -permitindo que o gráfico seja utilizado por outras ferramentas.
9   -
10   -Veja:
11   -
12   -<i3GEO.analise.dialogo.graficointerativo1>
13   -
14   -Arquivo:
15   -
16   -i3geo/ferramentas/graficointerativo1/index.js.php
17   -
18   -Licenca:
19   -
20   -GPL2
21   -
22   -i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet
23   -
24   -Direitos Autorais Reservados (c) 2006 Minist&eacute;rio do Meio Ambiente Brasil
25   -Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com
26   -
27   -Este programa &eacute; software livre; voc&ecirc; pode redistribu&iacute;-lo
28   -e/ou modific&aacute;-lo sob os termos da Licen&ccedil;a P&uacute;blica Geral
29   -GNU conforme publicada pela Free Software Foundation;
30   -
31   -Este programa &eacute; distribu&iacute;do na expectativa de que seja &uacute;til,
32   -por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita
33   -de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA.
34   -Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes.
35   -Voc&ecirc; deve ter recebido uma c&oacute;pia da Licen&ccedil;a P&uacute;blica Geral do
36   -GNU junto com este programa; se n&atilde;o, escreva para a
37   -Free Software Foundation, Inc., no endere&ccedil;o
38   -59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
  1 +/**
  2 + * Title: Gr&aacute;fico interativo 1
  3 + *
  4 + * Representa&ccedil;&atilde;o gr&aacute;fica de dados. O gr&aacute;fico &eacute; constru&iacute;do tendo como base os atributos de um tema
  5 + * e &eacute; modificado conforme o usu&aacute;rio navega pelo mapa. A renderiza&ccedil;&atilde;o do gr&aacute;fico &eacute; feito pelo
  6 + * navegador por meio do aplicativo openflashchart. Os dados que ser&atilde;o utilizados no gr&aacute;fico s&atilde;o baseados em um
  7 + * elemento TABLE. Esse elemento pode ser montado com base na tabela de atributos e editada pelo usu&aacute;rio. Os dados podem
  8 + * tamb&eacute;m ser inseridos como par&acirc;metros na inicializa&ccedil;&atilde;o da ferramenta, permitindo que o gr&aacute;fico seja
  9 + * utilizado por outras ferramentas.
  10 + *
  11 + * Veja:
  12 + *
  13 + * <i3GEO.analise.dialogo.graficointerativo1>
  14 + *
  15 + * Arquivo:
  16 + *
  17 + * i3geo/ferramentas/graficointerativo1/index.js.php
  18 + *
  19 + * Licenca:
  20 + *
  21 + * GPL2
  22 + *
  23 + * i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet
  24 + *
  25 + * Direitos Autorais Reservados (c) 2006 Minist&eacute;rio do Meio Ambiente Brasil Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com
  26 + *
  27 + * Este programa &eacute; software livre; voc&ecirc; pode redistribu&iacute;-lo e/ou modific&aacute;-lo sob os termos da Licen&ccedil;a
  28 + * P&uacute;blica Geral GNU conforme publicada pela Free Software Foundation;
  29 + *
  30 + * Este programa &eacute; distribu&iacute;do na expectativa de que seja &uacute;til, por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a
  31 + * garantia impl&iacute;cita de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA. Consulte a Licen&ccedil;a
  32 + * P&uacute;blica Geral do GNU para mais detalhes. Voc&ecirc; deve ter recebido uma c&oacute;pia da Licen&ccedil;a P&uacute;blica Geral do
  33 + * GNU junto com este programa; se n&atilde;o, escreva para a Free Software Foundation, Inc., no endere&ccedil;o 59 Temple Street, Suite
  34 + * 330, Boston, MA 02111-1307 USA.
39 35 */
40 36 if (typeof (i3GEOF) === 'undefined') {
41 37 var i3GEOF = {};
42 38 }
43   -/*
  39 +/**
44 40 * Classe: i3GEOF.graficointerativo1
45   - *
  41 + *
46 42 */
47   -i3GEOF.graficointerativo1 = {
48   - /*
49   - * Variavel: aguarde
50   - *
51   - * Estilo do objeto DOM com a imagem de aguarde existente no
52   - * cabe&ccedil;alho da janela.
  43 +i3GEOF.graficointerativo1 =
  44 + {
  45 + /**
  46 + * Array com os ids das janelas ja criadas
53 47 */
54   - aguarde : "",
55   - /*
  48 + janelas : [],
  49 + propJanelas : {},
  50 + /**
56 51 * Propriedade: dados
57   - *
  52 + *
58 53 * Dados que serao utilizados. Pode ser passado como parametro.
59   - *
  54 + *
60 55 * Default: {false}
61 56 */
62 57 dados : false,
63   - /*
  58 + /**
64 59 * Propriedade: titulo
65   - *
66   - * T&iacute;tulo do gr&aacute;fico. Se for vazio, ser&aacute; obtido do nome
67   - * do tema selecionado
  60 + *
  61 + * T&iacute;tulo do gr&aacute;fico. Se for vazio, ser&aacute; obtido do nome do tema selecionado
68 62 */
69 63 titulo : "",
70   - /*
  64 + /**
71 65 * Propriedade: tipo
72   - *
  66 + *
73 67 * Tipo de gr&aacute;fico escolhido pelo usu&aacute;rio.
74 68 */
75 69 tipo : "",
76   - /*
  70 + /**
77 71 * Propriedade: acumula
78   - *
  72 + *
79 73 * Acumula os valores ao gerar o gr&aacute;fico
80   - *
  74 + *
81 75 * Type: {boolean}
82   - *
  76 + *
83 77 * Default: {false}
84 78 */
85 79 acumula : false,
86   - /*
  80 + /**
87 81 * Propriedade: relativa
88   - *
  82 + *
89 83 * Utiliza valores relativos ao criar o gr&aacute;fico
90   - *
  84 + *
91 85 * Type: {boolean}
92   - *
  86 + *
93 87 * Default: {false}
94 88 */
95 89 relativa : false,
96   - /*
  90 + /**
97 91 * Propriedade: dadospuros
98   - *
99   - * N&atilde;o faz nenhum tipo de processamento nos dados antes de gerar o
100   - * gr&aacute;fico
101   - *
  92 + *
  93 + * N&atilde;o faz nenhum tipo de processamento nos dados antes de gerar o gr&aacute;fico
  94 + *
102 95 * Type: {boolean}
103   - *
  96 + *
104 97 * Default: {false}
105 98 */
106 99 dadospuros : false,
107   - /*
  100 + /**
108 101 * Propriedade: navegacao
109   - *
110   - * Ativa ou n&atilde;o a navega&ccedil;&atilde;o din�mica do mapa
111   - *
  102 + *
  103 + * Ativa ou n&atilde;o a navega&ccedil;&atilde;o din&acirc;mica do mapa
  104 + *
112 105 * Type: {boolean}
113   - *
  106 + *
114 107 * Default: {false}
115 108 */
116 109 navegacao : false,
117 110  
118   - /*
119   - * Para efeitos de compatibilidade antes da vers&atilde;o 4.7 que n&atilde;o
120   - * tinha dicion&aacute;rio
  111 + /**
  112 + * Para efeitos de compatibilidade antes da vers&atilde;o 4.7 que n&atilde;o tinha dicion&aacute;rio
121 113 */
122 114 criaJanelaFlutuante : function(dados) {
123 115 if (dados) {
... ... @@ -125,636 +117,628 @@ i3GEOF.graficointerativo1 = {
125 117 }
126 118 i3GEOF.graficointerativo1.iniciaDicionario();
127 119 },
128   - /*
  120 + /**
129 121 * Function: iniciaDicionario
130   - *
131   - * Carrega o dicion&aacute;rio e chama a fun&ccedil;&atilde;o que inicia a
132   - * ferramenta
133   - *
134   - * O Javascript &eacute; carregado com o id
135   - * i3GEOF.nomedaferramenta.dicionario_script
  122 + *
  123 + * Carrega o dicion&aacute;rio e chama a fun&ccedil;&atilde;o que inicia a ferramenta
  124 + *
  125 + * O Javascript &eacute; carregado com o id i3GEOF.nomedaferramenta.dicionario_script
136 126 */
137 127 iniciaDicionario : function(dados) {
138 128 if (dados) {
139 129 i3GEOF.graficointerativo1.dados = dados;
140 130 }
  131 + var temp = function() {
  132 + i3GEOF.graficointerativo1.ativaNavegacao();
  133 + i3GEOF.graficointerativo1.iniciaJanelaFlutuante(dados);
  134 + };
141 135 if (typeof (i3GEOF.graficointerativo1.dicionario) === 'undefined') {
142   - i3GEO.util.scriptTag(i3GEO.configura.locaplic
143   - + "/ferramentas/graficointerativo1/dependencias.php",
144   - "i3GEOF.graficointerativo1.iniciaJanelaFlutuante()",
145   - "i3GEOF.graficointerativo1.dicionario_script");
  136 + i3GEO.util.scriptTag(
  137 + i3GEO.configura.locaplic + "/ferramentas/graficointerativo1/dependencias.php",
  138 + temp,
  139 + "i3GEOF.graficointerativo1.dicionario_script");
146 140 } else {
147 141 i3GEOF.graficointerativo1.iniciaJanelaFlutuante(dados);
148 142 }
149 143 },
150   - /*
  144 + /**
151 145 * Function: inicia
152   - *
  146 + *
153 147 * Inicia a ferramenta. &Eacute; chamado por criaJanelaFlutuante
154   - *
  148 + *
155 149 * Parametros:
156   - *
157   - * iddiv {String} - id do div que receber&aacute; o conteudo HTML da
158   - * ferramenta
159   - *
  150 + *
  151 + * iddiv {String} - id do div que receber&aacute; o conteudo HTML da ferramenta
  152 + *
160 153 * dados {JSON} - dados para o gr&aacute;fico (opcional) exemplo
161 154 * ["n;x","'Argentina';33796870","'Paraguay';4773464","'Brazil';151525400","'Chile';13772710"]
162 155 */
163   - inicia : function(iddiv) {
  156 + inicia : function(iddiv, idjanela) {
164 157 // try{
165   - $i(iddiv).innerHTML += i3GEOF.graficointerativo1.html();
166   - $i("i3GEOgraficointerativo1Acumula").checked = i3GEOF.graficointerativo1.acumula;
167   - $i("i3GEOgraficointerativo1Relativa").checked = i3GEOF.graficointerativo1.relativa;
168   - $i("i3GEOgraficointerativo1DadosPuros").checked = i3GEOF.graficointerativo1.dadospuros;
169   - if (i3GEOF.graficointerativo1.navegacao === true) {
170   - i3GEOF.graficointerativo1.ativaNavegacao(true);
171   - }
172   - // eventos das guias
173   -
174   - //tipos de graficos
175   - $i("i3GEOgraficointerativo1guia1").onclick = function() {
176   - i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativo1guia1",
177   - "i3GEOgraficointerativo1guia");
178   - $i("i3GEOgraficointerativo1Grafico").style.display = "none";
  158 + $i(iddiv).innerHTML += i3GEOF.graficointerativo1.html(idjanela);
  159 + $i(idjanela + "i3GEOgraficointerativo1Acumula").checked = i3GEOF.graficointerativo1.propJanelas[idjanela].acumula;
  160 + $i(idjanela + "i3GEOgraficointerativo1Relativa").checked = i3GEOF.graficointerativo1.propJanelas[idjanela].relativa;
  161 + $i(idjanela + "i3GEOgraficointerativo1DadosPuros").checked = i3GEOF.graficointerativo1.propJanelas[idjanela].dadospuros;
  162 + // tipos de graficos
  163 + $i(idjanela + "i3GEOgraficointerativo1guia1").onclick = function() {
  164 + i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOgraficointerativo1guia1", idjanela + "i3GEOgraficointerativo1guia");
  165 + $i(idjanela + "i3GEOgraficointerativo1Grafico").style.display = "none";
179 166 };
180   - //dados para o grafico
181   - $i("i3GEOgraficointerativo1guia2").onclick = function() {
182   - if(i3GEOF.graficointerativo1.tipo === ""){
  167 + // dados para o grafico
  168 + $i(idjanela + "i3GEOgraficointerativo1guia2").onclick = function() {
  169 + if (i3GEOF.graficointerativo1.propJanelas[idjanela].tipo === "") {
183 170 alert($trad(4, i3GEOF.graficointerativo1.dicionario));
184 171 return;
185 172 }
186   - i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativo1guia2","i3GEOgraficointerativo1guia");
187   - i3GEOF.graficointerativo1.configuraDados();
188   - $i("i3GEOgraficointerativo1Grafico").style.display = "none";
  173 + i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOgraficointerativo1guia2", idjanela + "i3GEOgraficointerativo1guia");
  174 + i3GEOF.graficointerativo1.configuraDados(idjanela);
  175 + $i(idjanela + "i3GEOgraficointerativo1Grafico").style.display = "none";
189 176 };
190   - //propriedades adicionais
191   - $i("i3GEOgraficointerativo1guia3").onclick = function() {
192   - i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativo1guia3",
193   - "i3GEOgraficointerativo1guia");
194   - $i("i3GEOgraficointerativo1Grafico").style.display = "none";
  177 + // propriedades adicionais
  178 + $i(idjanela + "i3GEOgraficointerativo1guia3").onclick = function() {
  179 + i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOgraficointerativo1guia3", idjanela + "i3GEOgraficointerativo1guia");
  180 + $i(idjanela + "i3GEOgraficointerativo1Grafico").style.display = "none";
195 181 };
196   - //mostra o grafico
197   - $i("i3GEOgraficointerativo1guia4").onclick = function() {
198   - if(i3GEOF.graficointerativo1.tipo === ""){
  182 + // mostra o grafico
  183 + $i(idjanela + "i3GEOgraficointerativo1guia4").onclick = function() {
  184 + if (i3GEOF.graficointerativo1.propJanelas[idjanela].tipo === "") {
199 185 alert($trad(4, i3GEOF.graficointerativo1.dicionario));
200 186 return;
201 187 }
202   - if($i("i3GEOgraficointerativo1Dados").innerHTML === ""){
  188 + if ($i(idjanela + "i3GEOgraficointerativo1Dados").innerHTML === "") {
203 189 return;
204 190 }
205   - i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativo1guia4","i3GEOgraficointerativo1guia");
206   - var t = $i("i3GEOgraficointerativo1Grafico");
  191 + i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOgraficointerativo1guia4", idjanela + "i3GEOgraficointerativo1guia");
  192 + var t = $i(idjanela + "i3GEOgraficointerativo1Grafico");
207 193 t.style.display = "block";
208 194 t.style.position = "relative";
209 195 t.style.top = "-5px";
210 196 t.visibility = "visible";
211   - i3GEOF.graficointerativo1.tabela2dados();
212   - };
213   - $i("i3GEOgraficointerativo1guia5").onclick = function() {
214   - if(i3GEOF.graficointerativo1.tipo === ""){
215   - alert($trad(4, i3GEOF.graficointerativo1.dicionario));
216   - return;
217   - }
218   - if($i("i3GEOgraficointerativo1Dados").innerHTML === ""){
219   - return;
220   - }
221   - i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativo1guia5","i3GEOgraficointerativo1guia");
222   - $i("i3GEOgraficointerativo1Grafico").style.display = "none";
223   - $i("i3GEOgraficointerativo1guia5obj").innerHTML = "<textarea rows='20' cols='52' >"
224   - + (i3GEOF.graficointerativo1.tabela2csv()).join("\n")
225   - + "</textarea>";
226   - };
227   - $i("i3GEOgraficointerativo1guia6").onclick = function() {
228   - if(i3GEOF.graficointerativo1.tipo === ""){
229   - alert($trad(4, i3GEOF.graficointerativo1.dicionario));
230   - return;
231   - }
232   - if($i("i3GEOgraficointerativo1Dados").innerHTML === ""){
233   - return;
234   - }
235   - var w,h,form = $i("i3GEOgraficointerativo1PNG"),
236   - isvg = form.getElementsByTagName("input")[0],
237   - svg = $i("i3GEOgraficointerativo1guia4objCanvas").firstChild;
238   - h = svg.getAttributeNS(null, 'height');
239   - w = svg.getAttributeNS(null, 'width');
240   - if (typeof XMLSerializer != "undefined"){
241   - svg = (new XMLSerializer()).serializeToString(svg);
242   - } else {
243   - svg = svg.html();
244   - }
245   - isvg.value = svg;
246   - form.action = form.action+"?"+"w="+w+"&h="+h;
247   - form.submit();
  197 + i3GEOF.graficointerativo1.tabela2dados(idjanela);
248 198 };
249   - i3GEOF.graficointerativo1.ativaFoco();
250   - i3GEOF.graficointerativo1.comboTemas();
251   - new YAHOO.widget.Button("i3GEOgraficointerativo1botao1", {
  199 + $i(idjanela + "i3GEOgraficointerativo1guia5").onclick =
  200 + function() {
  201 + if (i3GEOF.graficointerativo1.tipo === "") {
  202 + alert($trad(4, i3GEOF.graficointerativo1.dicionario));
  203 + return;
  204 + }
  205 + if ($i(idjanela + "i3GEOgraficointerativo1Dados").innerHTML === "") {
  206 + return;
  207 + }
  208 + i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOgraficointerativo1guia5", idjanela + "i3GEOgraficointerativo1guia");
  209 + $i(idjanela + "i3GEOgraficointerativo1Grafico").style.display = "none";
  210 + $i(idjanela + "i3GEOgraficointerativo1guia5obj").innerHTML =
  211 + "<textarea rows='20' cols='52' >" + (i3GEOF.graficointerativo1.tabela2csv()).join("\n") + "</textarea>";
  212 + };
  213 + $i(idjanela + "i3GEOgraficointerativo1guia6").onclick =
  214 + function() {
  215 + if (i3GEOF.graficointerativo1.tipo === "") {
  216 + alert($trad(4, i3GEOF.graficointerativo1.dicionario));
  217 + return;
  218 + }
  219 + if ($i(idjanela + "i3GEOgraficointerativo1Dados").innerHTML === "") {
  220 + return;
  221 + }
  222 + var w, h, form = $i(idjanela + "i3GEOgraficointerativo1PNG"), isvg = form.getElementsByTagName("input")[0], svg =
  223 + $i(idjanela + "i3GEOgraficointerativo1guia4objCanvas").firstChild;
  224 + h = svg.getAttributeNS(null, 'height');
  225 + w = svg.getAttributeNS(null, 'width');
  226 + if (typeof XMLSerializer != "undefined") {
  227 + svg = (new XMLSerializer()).serializeToString(svg);
  228 + } else {
  229 + svg = svg.html();
  230 + }
  231 + isvg.value = svg;
  232 + form.action = form.action + "?" + "w=" + w + "&h=" + h;
  233 + form.submit();
  234 + };
  235 + i3GEOF.graficointerativo1.ativaFoco(idjanela);
  236 + i3GEOF.graficointerativo1.comboTemas(idjanela);
  237 + new YAHOO.widget.Button(idjanela + "i3GEOgraficointerativo1botao1", {
252 238 onclick : {
253   - fn : i3GEOF.graficointerativo1.obterDados
  239 + fn : function() {
  240 + i3GEOF.graficointerativo1.obterDados(idjanela);
  241 + }
254 242 }
255 243 });
256   - if (i3GEOF.graficointerativo1.dados && i3GEOF.graficointerativo1.dados != "undefined") {
257   - i3GEOF.graficointerativo1.montaTabelaDados(i3GEOF.graficointerativo1.dados);
258   - $i("i3GEOgraficointerativo1guia4").onclick.call();
259   - }
260   - else{
261   - i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativo1guia1","i3GEOgraficointerativo1guia");
  244 + if (i3GEOF.graficointerativo1.propJanelas[idjanela].dados
  245 + && i3GEOF.graficointerativo1.propJanelas[idjanela].dados != "undefined") {
  246 + i3GEOF.graficointerativo1.montaTabelaDados(idjanela, i3GEOF.graficointerativo1.propJanelas[idjanela].dados);
  247 + $i(idjanela + "i3GEOgraficointerativo1guia4").onclick.call();
  248 + } else {
  249 + i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOgraficointerativo1guia1", idjanela + "i3GEOgraficointerativo1guia");
262 250 }
263 251 },
264   - /*
  252 + /**
265 253 * Function: html
266   - *
267   - * Gera o c&oacute;digo html para apresenta&ccedil;&atilde;o das
268   - * op&ccedil;&otilde;es da ferramenta
269   - *
  254 + *
  255 + * Gera o c&oacute;digo html para apresenta&ccedil;&atilde;o das op&ccedil;&otilde;es da ferramenta
  256 + *
270 257 * Retorno:
271   - *
  258 + *
272 259 * String com o c&oacute;digo html
273 260 */
274   - html : function() {
275   - var locaplic = i3GEO.configura.locaplic, ins = ''
276   - + '<div id=i3GEOgraficointerativo1guiasYUI class="yui-navset" style="top:0px;cursor:pointer;left:0px;">'
277   - + ' <ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;">'
278   - + ' <li><a ><em><div id="i3GEOgraficointerativo1guia3" style="text-align:center;left:0px;" ><img class="ticPropriedades2" style="height:14px" title="'
279   - + $trad("p13")
280   - + '" src="'
281   - + i3GEO.configura.locaplic
282   - + '/imagens/visual/default/branco.gif"></div></em></a></li>'
283   - + ' <li><a ><em><div id="i3GEOgraficointerativo1guia1" style="text-align:center;left:0px;" >'
284   - + $trad(1, i3GEOF.graficointerativo1.dicionario)
285   - + '</div></em></a></li>'
286   - + ' <li><a ><em><div id="i3GEOgraficointerativo1guia2" style="text-align:center;left:0px;" >'
287   - + $trad(2, i3GEOF.graficointerativo1.dicionario)
288   - + '</div></em></a></li>'
289   - + ' <li><a ><em><div id="i3GEOgraficointerativo1guia4" style="text-align:center;left:0px;" >'
290   - + $trad(3, i3GEOF.graficointerativo1.dicionario)
291   - + '</div></em></a></li>'
292   - + ' <li><a ><em><div id="i3GEOgraficointerativo1guia5" style="text-align:center;left:0px;" >CSV'
293   - + '</div></em></a></li>'
294   - + ' <li><a ><em><div id="i3GEOgraficointerativo1guia6" style="text-align:center;left:0px;" >PNG'
295   - + '</div></em></a></li>'
296   - + ' </ul>'
297   - + '</div><br>'
298   - //tipos de grafico
299   - + '<div class=guiaobj id="i3GEOgraficointerativo1guia1obj" style="left:1px;display:none;">'
300   - + ' <p class=paragrafo >'
301   - + $trad(4, i3GEOF.graficointerativo1.dicionario)
302   - + ': </p>'
303   - + ' <table class=lista6 >'
304   - + ' <tr><td><img style=cursor:text; src="'
305   - + locaplic
306   - + '/imagens/oxygen/22x22/Actions-office-chart-pie-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo1.ativaTipo(this)" value="pizza_1" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>'
307   - + $trad(5, i3GEOF.graficointerativo1.dicionario)
308   - + '</td></tr>'
309   - + ' <tr><td>&nbsp;</td></tr>'
310   - + ' <tr><td><img style=cursor:text; src="'
311   - + locaplic
312   - + '/imagens/oxygen/22x22/Actions-office-chart-area-stacked-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo1.ativaTipo(this)" value="area_1" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>'
313   - + $trad(6, i3GEOF.graficointerativo1.dicionario)
314   - + '</td></tr>'
315   - + ' <tr><td>&nbsp;</td></tr>'
316   - + ' <tr><td><img style=cursor:text; src="'
317   - + locaplic
318   - + '/imagens/oxygen/22x22/Actions-office-chart-scatter-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo1.ativaTipo(this)" value="ponto_1" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>'
319   - + $trad(7, i3GEOF.graficointerativo1.dicionario)
320   - + '</td></tr>'
321   - + ' <tr><td>&nbsp;</td></tr>'
322   - + ' <tr><td><img style=cursor:text; src="'
323   - + locaplic
324   - + '/imagens/oxygen/22x22/Actions-office-chart-line-stacked-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo1.ativaTipo(this)" value="linha_1" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>'
325   - + $trad(8, i3GEOF.graficointerativo1.dicionario)
326   - + '</td></tr>'
327   - + ' <tr><td>&nbsp;</td></tr>'
328   - + ' <tr><td><img style=cursor:text; src="'
329   - + locaplic
330   - + '/imagens/oxygen/22x22/Actions-office-chart-bar-icon-t.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo1.ativaTipo(this)" value="arvore_1" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>'
331   - + $trad(9, i3GEOF.graficointerativo1.dicionario)
332   - + '</td></tr>'
333   - + ' <tr><td>&nbsp;</td></tr>'
334   - + ' <tr><td><img style=cursor:text; src="'
335   - + locaplic
336   - + '/imagens/oxygen/22x22/Actions-office-chart-bar-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo1.ativaTipo(this)" value="bar_1" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>'
337   - + $trad(10, i3GEOF.graficointerativo1.dicionario)
338   - + '</td></tr>'
339   - + ' <tr><td>&nbsp;</td></tr>'
340   - + ' <tr><td><img style=cursor:text; src="'
341   - + locaplic
342   - + '/imagens/oxygen/22x22/Actions-office-chart-bar-icon-h.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo1.ativaTipo(this)" value="bar_2" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>'
343   - + $trad(11, i3GEOF.graficointerativo1.dicionario)
344   - + '</td></tr>'
345   - + ' </table>'
346   - + '</div> '
347   - //obtencao dos dados e parametros
348   - + '<div class=guiaobj id="i3GEOgraficointerativo1guia2obj" style="left:1px;display:none;top:-5px">'
349   - + ' <p class=paragrafo >'
350   - + $trad(12, i3GEOF.graficointerativo1.dicionario)
351   - + ': </p>'
352   - + ' <p class=paragrafo >'
353   - + $trad(13, i3GEOF.graficointerativo1.dicionario)
354   - + ':</p>'
355   - + ' <div class=paragrafo id=i3GEOgraficointerativo1ComboTemas ></div>'
356   - + ' <p class=paragrafo >'
357   - + $trad(50, i3GEOF.graficointerativo1.dicionario)
358   - + ':<br>'
359   - + $inputText("", "", "i3GEOgraficointerativo1Titulo", "", 40,"")
360   - + ' <p class=paragrafo >'
361   - + $trad(51, i3GEOF.graficointerativo1.dicionario)
362   - + ':<br>'
363   - + $inputText("", "", "i3GEOgraficointerativo1TituloX", "", 40,"")
364   - + ' <p class=paragrafo >'
365   - + $trad(52, i3GEOF.graficointerativo1.dicionario)
366   - + ':<br>'
367   - + $inputText("", "", "i3GEOgraficointerativo1TituloY", "", 40,"")
  261 + html : function(idjanela) {
  262 + var locaplic = i3GEO.configura.locaplic, ins = '';
  263 + ins =
  264 + '<div id="'
  265 + + idjanela
  266 + + 'i3GEOgraficointerativo1guiasYUI" class="yui-navset" style="top:0px;cursor:pointer;left:0px;">'
  267 + + ' <ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;">'
  268 + + ' <li><a ><em><div id="'
  269 + + idjanela
  270 + + 'i3GEOgraficointerativo1guia3" style="text-align:center;left:0px;" ><img class="ticPropriedades2" style="height:14px" title="'
  271 + + $trad("p13")
  272 + + '" src="'
  273 + + i3GEO.configura.locaplic
  274 + + '/imagens/visual/default/branco.gif"></div></em></a></li>'
  275 + + ' <li><a ><em><div id="'
  276 + + idjanela
  277 + + 'i3GEOgraficointerativo1guia1" style="text-align:center;left:0px;" >'
  278 + + $trad(1, i3GEOF.graficointerativo1.dicionario)
  279 + + '</div></em></a></li>'
  280 + + ' <li><a ><em><div id="'
  281 + + idjanela
  282 + + 'i3GEOgraficointerativo1guia2" style="text-align:center;left:0px;" >'
  283 + + $trad(2, i3GEOF.graficointerativo1.dicionario)
  284 + + '</div></em></a></li>'
  285 + + ' <li><a ><em><div id="'
  286 + + idjanela
  287 + + 'i3GEOgraficointerativo1guia4" style="text-align:center;left:0px;" >'
  288 + + $trad(3, i3GEOF.graficointerativo1.dicionario)
  289 + + '</div></em></a></li>'
  290 + + ' <li><a ><em><div id="'
  291 + + idjanela
  292 + + 'i3GEOgraficointerativo1guia5" style="text-align:center;left:0px;" >CSV'
  293 + + '</div></em></a></li>'
  294 + + ' <li><a ><em><div id="'
  295 + + idjanela
  296 + + 'i3GEOgraficointerativo1guia6" style="text-align:center;left:0px;" >PNG'
  297 + + '</div></em></a></li>'
  298 + + ' </ul>'
  299 + + '</div><br>'
  300 + // tipos de grafico
  301 + + '<div class=guiaobj id="'
  302 + + idjanela
  303 + + 'i3GEOgraficointerativo1guia1obj" style="left:1px;display:none;">'
  304 + + ' <p class=paragrafo >'
  305 + + $trad(4, i3GEOF.graficointerativo1.dicionario)
  306 + + ': </p>'
  307 + + ' <table class=lista6 >'
  308 + + ' <tr><td><img style=cursor:text; src="'
  309 + + locaplic
  310 + + '/imagens/oxygen/22x22/Actions-office-chart-pie-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo1.ativaTipo(this,\''
  311 + + idjanela
  312 + + '\')" value="pizza_1" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>'
  313 + + $trad(5, i3GEOF.graficointerativo1.dicionario)
  314 + + '</td></tr>'
  315 + + ' <tr><td>&nbsp;</td></tr>'
  316 + + ' <tr><td><img style=cursor:text; src="'
  317 + + locaplic
  318 + + '/imagens/oxygen/22x22/Actions-office-chart-area-stacked-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo1.ativaTipo(this,\''
  319 + + idjanela
  320 + + '\')" value="area_1" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>'
  321 + + $trad(6, i3GEOF.graficointerativo1.dicionario)
  322 + + '</td></tr>'
  323 + + ' <tr><td>&nbsp;</td></tr>'
  324 + + ' <tr><td><img style=cursor:text; src="'
  325 + + locaplic
  326 + + '/imagens/oxygen/22x22/Actions-office-chart-scatter-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo1.ativaTipo(this,\''
  327 + + idjanela
  328 + + '\')" value="ponto_1" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>'
  329 + + $trad(7, i3GEOF.graficointerativo1.dicionario)
  330 + + '</td></tr>'
  331 + + ' <tr><td>&nbsp;</td></tr>'
  332 + + ' <tr><td><img style=cursor:text; src="'
  333 + + locaplic
  334 + + '/imagens/oxygen/22x22/Actions-office-chart-line-stacked-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo1.ativaTipo(this,\''
  335 + + idjanela
  336 + + '\')" value="linha_1" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>'
  337 + + $trad(8, i3GEOF.graficointerativo1.dicionario)
  338 + + '</td></tr>'
  339 + + ' <tr><td>&nbsp;</td></tr>'
  340 + + ' <tr><td><img style=cursor:text; src="'
  341 + + locaplic
  342 + + '/imagens/oxygen/22x22/Actions-office-chart-bar-icon-t.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo1.ativaTipo(this,\''
  343 + + idjanela
  344 + + '\')" value="arvore_1" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>'
  345 + + $trad(9, i3GEOF.graficointerativo1.dicionario)
  346 + + '</td></tr>'
  347 + + ' <tr><td>&nbsp;</td></tr>'
  348 + + ' <tr><td><img style=cursor:text; src="'
  349 + + locaplic
  350 + + '/imagens/oxygen/22x22/Actions-office-chart-bar-icon.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo1.ativaTipo(this,\''
  351 + + idjanela
  352 + + '\')" value="bar_1" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>'
  353 + + $trad(10, i3GEOF.graficointerativo1.dicionario)
  354 + + '</td></tr>'
  355 + + ' <tr><td>&nbsp;</td></tr>'
  356 + + ' <tr><td><img style=cursor:text; src="'
  357 + + locaplic
  358 + + '/imagens/oxygen/22x22/Actions-office-chart-bar-icon-h.png" /></td><td><input type=radio onclick="i3GEOF.graficointerativo1.ativaTipo(this,\''
  359 + + idjanela + '\')" value="bar_2" name="tipoGrafico" style="border:0px solid white;cursor:pointer" > </td><td>'
  360 + + $trad(11, i3GEOF.graficointerativo1.dicionario) + '</td></tr>' + ' </table>' + '</div> '
  361 + // obtencao dos dados e parametros
  362 + + '<div class=guiaobj id="' + idjanela + 'i3GEOgraficointerativo1guia2obj" style="left:1px;display:none;top:-5px">'
  363 + + ' <p class=paragrafo >' + $trad(12, i3GEOF.graficointerativo1.dicionario) + ': </p>' + ' <p class=paragrafo >'
  364 + + $trad(13, i3GEOF.graficointerativo1.dicionario) + ':</p>' + ' <div class=paragrafo id="' + idjanela
  365 + + 'i3GEOgraficointerativo1ComboTemas" ></div>' + ' <p class=paragrafo >'
  366 + + $trad(50, i3GEOF.graficointerativo1.dicionario) + ':<br>'
  367 + + $inputText("", "", idjanela + "i3GEOgraficointerativo1Titulo", "", 40, "") + ' <p class=paragrafo >'
  368 + + $trad(51, i3GEOF.graficointerativo1.dicionario) + ':<br>'
  369 + + $inputText("", "", idjanela + "i3GEOgraficointerativo1TituloX", "", 40, "") + ' <p class=paragrafo >'
  370 + + $trad(52, i3GEOF.graficointerativo1.dicionario) + ':<br>'
  371 + + $inputText("", "", idjanela + "i3GEOgraficointerativo1TituloY", "", 40, "") + ' <div class=paragrafo id="' + idjanela
  372 + + 'i3GEOgraficointerativo1ComboXlinha" >' + ' <p class=paragrafo >' + $trad(14, i3GEOF.graficointerativo1.dicionario)
  373 + + ':</p>' + ' <div class=paragrafo id="' + idjanela + 'i3GEOgraficointerativo1ComboX" ></div>' + ' </div>'
  374 + + ' <div id="' + idjanela + 'i3GEOgraficointerativo1ComboYlinha" style=display:block >' + ' <p class=paragrafo >'
  375 + + $trad(15, i3GEOF.graficointerativo1.dicionario) + ': </p>' + ' <div class=paragrafo id="' + idjanela
  376 + + 'i3GEOgraficointerativo1ComboY" ></div>' + ' </div>' + ' <p class=paragrafo >'
  377 + + $trad(16, i3GEOF.graficointerativo1.dicionario) + ': '
  378 + + $inputText("", "", idjanela + "i3GEOgraficointerativo1excluir", "", 3, "")
  379 + + ' <p class=paragrafo ><input type=checkbox style="cursor:pointer;top:3px;position:relative;" id="' + idjanela
  380 + + 'i3GEOgraficointerativo1CoresA" /> ' + $trad(17, i3GEOF.graficointerativo1.dicionario) + '</p>'
  381 + + ' <p class=paragrafo ><input id="' + idjanela + 'i3GEOgraficointerativo1botao1" type="buttom" value="'
  382 + + $trad(18, i3GEOF.graficointerativo1.dicionario) + '" /></p>' + ' <div id="' + idjanela
  383 + + 'i3GEOgraficointerativo1Dados" ></div>' + ' <div class=paragrafo id="' + idjanela
  384 + + 'i3GEOgraficointerativo1AjudaPizza" >' + $trad(19, i3GEOF.graficointerativo1.dicionario) + '</div>' + '</div>'
  385 + // propriedades adicionais
  386 + + '<div class=guiaobj id="' + idjanela + 'i3GEOgraficointerativo1guia3obj" style="left:1px;display:none;top:-5px">'
  387 + + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id="' + idjanela
  388 + + 'i3GEOgraficointerativo1xInclinado" checked /> ' + $trad(20, i3GEOF.graficointerativo1.dicionario) + '</p>'
  389 + + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id="' + idjanela
  390 + + 'i3GEOgraficointerativo1AdLinhas" checked /> ' + $trad(21, i3GEOF.graficointerativo1.dicionario) + '</p>'
  391 + + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id="' + idjanela
  392 + + 'i3GEOgraficointerativo1Acumula" /> ' + $trad(22, i3GEOF.graficointerativo1.dicionario) + '</p>'
  393 + + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id="' + idjanela
  394 + + 'i3GEOgraficointerativo1Relativa" /> ' + $trad(23, i3GEOF.graficointerativo1.dicionario) + ' (%)</p>'
  395 + + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id="' + idjanela
  396 + + 'i3GEOgraficointerativo1OrdenaX" checked /> ' + $trad(24, i3GEOF.graficointerativo1.dicionario) + '</p>'
  397 + + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id="' + idjanela
  398 + + 'i3GEOgraficointerativo1DadosPuros" /> ' + $trad(25, i3GEOF.graficointerativo1.dicionario) + '</p>' +
368 399  
369   - + ' <div class=paragrafo id=i3GEOgraficointerativo1ComboXlinha >'
370   - + ' <p class=paragrafo >'
371   - + $trad(14, i3GEOF.graficointerativo1.dicionario)
372   - + ':</p>'
373   - + ' <div class=paragrafo id=i3GEOgraficointerativo1ComboX ></div>'
374   - + ' </div>'
375   - + ' <div id=i3GEOgraficointerativo1ComboYlinha style=display:block >'
376   - + ' <p class=paragrafo >'
377   - + $trad(15, i3GEOF.graficointerativo1.dicionario)
378   - + ': </p>'
379   - + ' <div class=paragrafo id=i3GEOgraficointerativo1ComboY ></div>'
380   - + ' </div>'
381   - + ' <p class=paragrafo >'
382   - + $trad(16, i3GEOF.graficointerativo1.dicionario)
383   - + ': '
384   - + $inputText("", "", "i3GEOgraficointerativo1excluir", "", 3,
385   - "")
386   - + ' <p class=paragrafo ><input type=checkbox style="cursor:pointer;top:3px;position:relative;" id=i3GEOgraficointerativo1CoresA /> '
387   - + $trad(17, i3GEOF.graficointerativo1.dicionario)
388   - + '</p>'
389   - + ' <p class=paragrafo ><input id=i3GEOgraficointerativo1botao1 type="buttom" value="'
390   - + $trad(18, i3GEOF.graficointerativo1.dicionario)
391   - + '" /></p>'
392   - + ' <div id=i3GEOgraficointerativo1Dados ></div>'
393   - + ' <div class=paragrafo id=i3GEOgraficointerativo1AjudaPizza >'
394   - + $trad(19, i3GEOF.graficointerativo1.dicionario)
395   - + '</div>'
396   - + '</div>'
397   - //propriedades adicionais
398   - + '<div class=guiaobj id="i3GEOgraficointerativo1guia3obj" style="left:1px;display:none;top:-5px">'
399   - + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOgraficointerativo1xInclinado checked /> '
400   - + $trad(20, i3GEOF.graficointerativo1.dicionario)
401   - + '</p>'
402   - + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOgraficointerativo1AdLinhas checked /> '
403   - + $trad(21, i3GEOF.graficointerativo1.dicionario)
404   - + '</p>'
405   - + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOgraficointerativo1Acumula /> '
406   - + $trad(22, i3GEOF.graficointerativo1.dicionario)
407   - + '</p>'
408   - + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOgraficointerativo1Relativa /> '
409   - + $trad(23, i3GEOF.graficointerativo1.dicionario)
410   - + ' (%)</p>'
411   - + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOgraficointerativo1OrdenaX checked /> '
412   - + $trad(24, i3GEOF.graficointerativo1.dicionario)
413   - + '</p>'
414   - + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOgraficointerativo1DadosPuros /> '
415   - + $trad(25, i3GEOF.graficointerativo1.dicionario)
416   - + '</p>'
417   - + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOFgraficointerativo1ativaNavegacao onclick="i3GEOF.graficointerativo1.ativaNavegacao(this.checked)" /> '
418   - + $trad(47, i3GEOF.graficointerativo1.dicionario)
419   - + '</p>'
420   - + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOFgraficointerativo1ativaStacked /> '
421   - + $trad(48, i3GEOF.graficointerativo1.dicionario)
422   - + '</p>'
423   - + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id=i3GEOFgraficointerativo1ativaRowsInColumns /> '
424   - + $trad(49, i3GEOF.graficointerativo1.dicionario)
425   - + '</p>'
426   - + ' <p class=paragrafo ><select onchange="i3GEOF.graficointerativo1.obterDados()" id="i3GEOgraficointerativo1TipoAgregacao" ><option value="soma">'
427   - + $trad(26, i3GEOF.graficointerativo1.dicionario)
428   - + '</option><option value="media">'
429   - + $trad(27, i3GEOF.graficointerativo1.dicionario)
430   - + '</option></select> '
431   - + $trad(28, i3GEOF.graficointerativo1.dicionario)
432   - + '</p>'
433   - + ' <p class=paragrafo ><input style=cursor:pointer;width:50px; value=0 type=text id=i3GEOgraficointerativo1FatorTamanho /> '
434   - + $trad(29, i3GEOF.graficointerativo1.dicionario)
435   - + '</p>'
436   - + '</div>'
437   - //aqui vai o grafico
438   - + '<div class=guiaobj id="i3GEOgraficointerativo1guia4obj" style="left:1px;display:none;top:-10px">'
439   - + ' <a style=position:absolute;left:50px; href="#" onclick="i3GEOF.graficointerativo1.novaJanela()" >'
440   - + $trad(30, i3GEOF.graficointerativo1.dicionario)
441   - + '</a>'
442   - + ' <img onclick="i3GEOF.graficointerativo1.alteraFatorPixel(\'menos\')" style=position:absolute; src="'+i3GEO.configura.locaplic+'/imagens/player_volta.png" />'
443   - + ' <img onclick="i3GEOF.graficointerativo1.alteraFatorPixel(\'mais\')" style=position:absolute;left:20px; src="'+i3GEO.configura.locaplic+'/imagens/player_avanca.png" />'
444   - + ' <div id=i3GEOgraficointerativo1guia4objCanvas style="top:15px;"></div>'
445   - + '</div>'
446   - //csv
447   - + '<div class=guiaobj id="i3GEOgraficointerativo1guia5obj" style="font-size:10px;left:10px;display:none;top:-0px">'
448   - + '</div>'
449   - //png
450   - + '<div class=guiaobj id="i3GEOgraficointerativo1guia6obj" style="font-size:10px;left:10px;display:none;top:-0px">'
451   - + ' <form method=post action="'+i3GEO.configura.locaplic+'/pacotes/svg2img.php" id="i3GEOgraficointerativo1PNG" target="_blank" >'
452   - + ' <input type=hidden name="svg" value="" />'
453   - + ' </form>'
454   - + '</div>'
455   - + '<div id="i3GEOgraficointerativo1Grafico" style="position:relative;top:-5px;display:none"></div>';
  400 + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id="' + idjanela
  401 + + 'i3GEOFgraficointerativo1ativaStacked" /> ' + $trad(48, i3GEOF.graficointerativo1.dicionario) + '</p>'
  402 + + ' <p class=paragrafo ><input style=cursor:pointer type=checkbox id="' + idjanela
  403 + + 'i3GEOFgraficointerativo1ativaRowsInColumns" /> ' + $trad(49, i3GEOF.graficointerativo1.dicionario) + '</p>'
  404 + + ' <p class=paragrafo ><select onchange="i3GEOF.graficointerativo1.obterDados()" id="' + idjanela
  405 + + 'i3GEOgraficointerativo1TipoAgregacao" ><option value="soma">' + $trad(26, i3GEOF.graficointerativo1.dicionario)
  406 + + '</option><option value="media">' + $trad(27, i3GEOF.graficointerativo1.dicionario) + '</option></select> '
  407 + + $trad(28, i3GEOF.graficointerativo1.dicionario) + '</p>'
  408 + + ' <p class=paragrafo ><input style=cursor:pointer;width:50px; value=0 type=text id="' + idjanela
  409 + + 'i3GEOgraficointerativo1FatorTamanho" /> ' + $trad(29, i3GEOF.graficointerativo1.dicionario) + '</p>' + '</div>'
  410 + // aqui vai o grafico
  411 + + '<div class=guiaobj id="' + idjanela + 'i3GEOgraficointerativo1guia4obj" style="left:1px;display:none;top:-10px">'
  412 + + ' <a style=position:absolute;left:50px; href="#" onclick="i3GEOF.graficointerativo1.novaJanela()" >'
  413 + + $trad(30, i3GEOF.graficointerativo1.dicionario) + '</a>'
  414 + + ' <img onclick="i3GEOF.graficointerativo1.alteraFatorPixel(\'menos\',\'' + idjanela
  415 + + '\')" style=position:absolute; src="' + i3GEO.configura.locaplic + '/imagens/player_volta.png" />'
  416 + + ' <img onclick="i3GEOF.graficointerativo1.alteraFatorPixel(\'mais\',\'' + idjanela
  417 + + '\')" style=position:absolute;left:20px; src="' + i3GEO.configura.locaplic + '/imagens/player_avanca.png" />'
  418 + + ' <div id="' + idjanela + 'i3GEOgraficointerativo1guia4objCanvas" style="top:15px;"></div>' + '</div>'
  419 + // csv
  420 + + '<div class=guiaobj id="' + idjanela
  421 + + 'i3GEOgraficointerativo1guia5obj" style="font-size:10px;left:10px;display:none;top:-0px">' + '</div>'
  422 + // png
  423 + + '<div class=guiaobj id="' + idjanela
  424 + + 'i3GEOgraficointerativo1guia6obj" style="font-size:10px;left:10px;display:none;top:-0px">'
  425 + + ' <form method=post action="' + i3GEO.configura.locaplic + '/pacotes/svg2img.php" id="' + idjanela
  426 + + 'i3GEOgraficointerativo1PNG" target="_blank" >' + ' <input type=hidden name="svg" value="" />' + ' </form>'
  427 + + '</div>' + '<div id="' + idjanela
  428 + + 'i3GEOgraficointerativo1Grafico" style="position:relative;top:-5px;display:none"></div>';
456 429 return ins;
457 430 },
458   - /*
  431 + /**
459 432 * Function: iniciaJanelaFlutuante
460   - *
  433 + *
461 434 * Cria a janela flutuante para controle da ferramenta.
462   - *
  435 + *
463 436 * Parametro
464   - *
  437 + *
465 438 * dados {JSON} - dados para o gr&aacute;fico
466 439 */
467 440 iniciaJanelaFlutuante : function(dados) {
  441 + // id utilizado para diferenciar cada janela e seus respectivos
  442 + // componentes
  443 + idjanela = "graficoi" + parseInt(Math.random() * 1000000, 10);
  444 + i3GEOF.graficointerativo1.janelas.push(idjanela);
  445 + i3GEOF.graficointerativo1.propJanelas[idjanela] = {};
  446 + i3GEOF.graficointerativo1.propJanelas[idjanela].tema = i3GEO.temaAtivo;
  447 + i3GEOF.graficointerativo1.propJanelas[idjanela].atualiza = false;
  448 + i3GEOF.graficointerativo1.propJanelas[idjanela].dados = dados;
  449 + // guarda para esse grafico alguns valores default obtidos dos
  450 + // parametros gerais da ferramenta
  451 + i3GEOF.graficointerativo1.propJanelas[idjanela].acumula = i3GEOF.graficointerativo1.acumula;
  452 + i3GEOF.graficointerativo1.propJanelas[idjanela].relativa = i3GEOF.graficointerativo1.relativa;
  453 + i3GEOF.graficointerativo1.propJanelas[idjanela].dadospuros = i3GEOF.graficointerativo1.dadospuros;
  454 +
468 455 if (dados) {
469   - i3GEOF.graficointerativo1.dados = dados;
  456 + i3GEOF.graficointerativo1.propJanelas[idjanela].dados = dados;
470 457 }
471 458 var minimiza, cabecalho, janela, divid, temp, titulo;
472 459 // cria a janela flutuante
473 460 cabecalho = function() {
474   - i3GEOF.graficointerativo1.ativaFoco();
  461 + i3GEOF.graficointerativo1.ativaFoco(idjanela);
475 462 };
476 463 minimiza = function() {
477   - i3GEO.janela.minimiza("i3GEOF.graficointerativo1");
  464 + i3GEO.janela.minimiza(idjanela);
478 465 };
479   - mudaTamanhoGrafico = function(){
480   - var t = $i("i3GEOgraficointerativo1Grafico");
481   - if(t.style.display === "block"){
482   - i3GEOF.graficointerativo1.tabela2dados();
  466 + mudaTamanhoGrafico = function() {
  467 + var t = $i(idjanela + "i3GEOgraficointerativo1Grafico");
  468 + if (t.style.display === "block") {
  469 + i3GEOF.graficointerativo1.tabela2dados(idjanela);
483 470 }
484 471 };
485   - titulo = "&nbsp;&nbsp;&nbsp;"
486   - + $trad("t37b")
487   - + " <a class=ajuda_usuario target=_blank href='"
488   - + i3GEO.configura.locaplic
489   - + "/ajuda_usuario.php?idcategoria=3&idajuda=84' >&nbsp;&nbsp;&nbsp;</a>";
490   - janela = i3GEO.janela.cria(
  472 + duplica = function() {
  473 + i3GEOF.graficointerativo1.iniciaJanelaFlutuante();
  474 + };
  475 + titulo =
  476 + "&nbsp;&nbsp;&nbsp;" + $trad("t37b") + " <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic
  477 + + "/ajuda_usuario.php?idcategoria=3&idajuda=84' >&nbsp;&nbsp;&nbsp;</a>";
  478 + janela =
  479 + i3GEO.janela.cria(
491 480 "480px",
492   - "450px",
493   - "",
494   - "",
495   - "",
  481 + "450px",
  482 + "",
  483 + "",
  484 + "",
496 485 titulo,
497   - "i3GEOF.graficointerativo1",
498   - false,
499   - "hd",
500   - cabecalho,
501   - minimiza,
  486 + idjanela,
  487 + false,
  488 + "hd",
  489 + cabecalho,
  490 + minimiza,
502 491 mudaTamanhoGrafico,
503 492 true,
504   - i3GEO.configura.locaplic+"/imagens/oxygen/16x16/view-statistics.png"
505   - );
  493 + i3GEO.configura.locaplic + "/imagens/oxygen/16x16/view-statistics.png",
  494 + duplica);
506 495 divid = janela[2].id;
507   - i3GEOF.graficointerativo1.aguarde = $i("i3GEOF.graficointerativo1_imagemCabecalho").style;
508   - $i("i3GEOF.graficointerativo1_corpo").style.backgroundColor = "white";
509   - $i("i3GEOF.graficointerativo1_corpo").style.overflow = "auto";
510   - i3GEOF.graficointerativo1.inicia(divid);
  496 + i3GEOF.graficointerativo1.aguarde = $i(idjanela + "_imagemCabecalho").style;
  497 + $i(idjanela + "_corpo").style.backgroundColor = "white";
  498 + $i(idjanela + "_corpo").style.overflow = "auto";
  499 +
  500 + i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde = $i(idjanela + "_imagemCabecalho").style;
  501 + i3GEOF.graficointerativo1.propJanelas[idjanela].atualiza = true;
  502 + // indica se a janela sera atualizada na navegacao
  503 + temp = 'i3GEOF.graficointerativo1.propJanelas["' + idjanela + '"].atualiza = this.checked';
  504 + janela[0]
  505 + .setFooter("<div style=background-color:#F2F2F2; ><input class='inputsb' style='cursor:pointer;position:relative;top:2px;' onclick='"
  506 + + temp + "' type=checkbox />&nbsp;" + $trad(53, i3GEOF.graficointerativo1.dicionario) + " (" + idjanela + ")</div>");
  507 +
  508 + i3GEOF.graficointerativo1.inicia(divid, idjanela);
511 509 if (i3GEO.Interface) {
512   - temp = function() {
513   - if (i3GEO.Interface.ATUAL !== "googlemaps"
514   - && i3GEO.Interface.ATUAL !== "googleearth") {
515   - i3GEO.eventos.NAVEGAMAPA
516   - .remove("i3GEOF.graficointerativo1.obterDados()");
517   - }
518   - if (i3GEO.Interface.ATUAL == "googlemaps") {
519   - google.maps.event.removeListener(graficointerativo1Dragend);
520   - google.maps.event.removeListener(graficointerativo1Zoomend);
521   - }
522   - if (i3GEO.Interface.ATUAL === "googleearth") {
523   - google.earth.removeEventListener(graficointerativo1Dragend);
524   - }
525   - if (i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search(
526   - "i3GEOF.graficointerativo1.comboTemas()") > 0) {
527   - i3GEO.eventos.ATUALIZAARVORECAMADAS
528   - .remove("i3GEOF.graficointerativo1.comboTemas()");
529   - }
530   - };
  510 + temp =
  511 + function() {
  512 + if (i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth") {
  513 + i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.graficointerativo1.obterDados()");
  514 + }
  515 + if (i3GEO.Interface.ATUAL == "googlemaps") {
  516 + google.maps.event.removeListener(graficointerativo1Dragend);
  517 + google.maps.event.removeListener(graficointerativo1Zoomend);
  518 + }
  519 + if (i3GEO.Interface.ATUAL === "googleearth") {
  520 + google.earth.removeEventListener(graficointerativo1Dragend);
  521 + }
  522 + if (i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search(
  523 + "i3GEOF.graficointerativo1.comboTemas('" + idjanela + "')") > 0) {
  524 + i3GEO.eventos.ATUALIZAARVORECAMADAS.remove("i3GEOF.graficointerativo1.comboTemas('" + idjanela + "')");
  525 + }
  526 + };
531 527 YAHOO.util.Event.addListener(janela[0].close, "click", temp);
532   - if (i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search(
533   - "i3GEOF.graficointerativo1.comboTemas()") < 0) {
534   - i3GEO.eventos.ATUALIZAARVORECAMADAS
535   - .push("i3GEOF.graficointerativo1.comboTemas()");
  528 + if (i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEOF.graficointerativo1.comboTemas('" + idjanela + "')") < 0) {
  529 + i3GEO.eventos.ATUALIZAARVORECAMADAS.push("i3GEOF.graficointerativo1.comboTemas('" + idjanela + "')");
536 530 }
537 531 }
538 532 janela[0].bringToTop();
539 533 },
540   - /*
  534 + /**
541 535 * Function: ativaFoco
542   - *
543   - * Refaz a interface da ferramenta quando a janela flutuante tem seu foco
544   - * ativado
  536 + *
  537 + * Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado
545 538 */
546   - ativaFoco : function() {
  539 + ativaFoco : function(idjanela) {
547 540 if (i3GEO.Interface) {
548 541 i3GEO.barraDeBotoes.ativaIcone("graficointerativo1");
549 542 }
550   - var i = $i("i3GEOF.graficointerativo1_c").style;
  543 + var i = $i(idjanela + "_c").style;
551 544 i3GEO.janela.ULTIMOZINDEX++;
552 545 i.zIndex = i3GEO.janela.ULTIMOZINDEX;
553 546 },
554   - novaJanela : function() {
555   - var janela = "", divid, g = $i("i3GEOgraficointerativo1guia4objCanvas"), v = g
556   - .cloneNode(true), cabecalho = function() {
557   - }, id = YAHOO.util.Dom.generateId(), minimiza = function() {
  547 + novaJanela : function(idjanela) {
  548 + var janela = "", divid, g, v, cabecalho, id, minimiza, titulo;
  549 + g = $i(idjanela + "i3GEOgraficointerativo1guia4objCanvas");
  550 + v = g.cloneNode(true);
  551 + cabecalho = function() {
  552 + };
  553 + id = YAHOO.util.Dom.generateId();
  554 + minimiza = function() {
558 555 i3GEO.janela.minimiza(id);
559   - }, titulo = "&nbsp;&nbsp;&nbsp;" + i3GEOF.graficointerativo1.titulo;
560   - janela = i3GEO.janela.cria("380px", "280px", "", "", "", titulo, id,
561   - false, "hd", cabecalho, minimiza);
  556 + };
  557 + titulo = "&nbsp;&nbsp;&nbsp;" + i3GEOF.graficointerativo1.propJanelas[idjanela].titulo;
  558 + janela = i3GEO.janela.cria("380px", "280px", "", "", "", titulo, id, false, "hd", cabecalho, minimiza);
562 559 divid = janela[2].id;
563 560 $i(divid).style.marginTop = "0px";
564 561 v.id = id + "ngrafico";
565 562 v.style.marginTop = "0px";
566 563 $i(divid).appendChild(v);
567 564 },
568   - /*
  565 + /**
569 566 * Function: comboTemas
570   - *
571   - * Monta o combo para escolha do tema que ser&aacute; utilizado no
572   - * gr&aacute;fico
  567 + *
  568 + * Monta o combo para escolha do tema que ser&aacute; utilizado no gr&aacute;fico
573 569 */
574   - comboTemas : function() {
  570 + comboTemas : function(idjanela) {
575 571 if (!i3GEO.Interface) {
576 572 return;
577 573 }
578   - i3GEO.util
579   - .comboTemas(
580   - "i3GEOgraficointerativo1ComboTemasId",
581   - function(retorno) {
582   - $i("i3GEOgraficointerativo1ComboTemas").innerHTML = retorno.dados;
583   - $i("i3GEOgraficointerativo1ComboTemas").style.display = "block";
584   - if ($i("i3GEOgraficointerativo1ComboTemasId")) {
585   - $i("i3GEOgraficointerativo1ComboTemasId").onchange = function() {
586   - i3GEO.mapa
587   - .ativaTema($i("i3GEOgraficointerativo1ComboTemasId").value);
588   - i3GEOF.graficointerativo1.comboItensSel();
589   - };
590   - }
591   - if (i3GEO.temaAtivo !== "") {
592   - $i("i3GEOgraficointerativo1ComboTemasId").value = i3GEO.temaAtivo;
593   - $i("i3GEOgraficointerativo1ComboTemasId").onchange
594   - .call();
595   - }
596   - }, "i3GEOgraficointerativo1ComboTemas", "", false,
597   - "ligados", "font-size:12px;width:350px");
  574 + i3GEO.util.comboTemas(idjanela + "i3GEOgraficointerativo1ComboTemasId", function(retorno) {
  575 + $i(idjanela + "i3GEOgraficointerativo1ComboTemas").innerHTML = retorno.dados;
  576 + $i(idjanela + "i3GEOgraficointerativo1ComboTemas").style.display = "block";
  577 + if ($i(idjanela + "i3GEOgraficointerativo1ComboTemasId")) {
  578 + $i(idjanela + "i3GEOgraficointerativo1ComboTemasId").onchange = function() {
  579 + i3GEO.mapa.ativaTema($i(idjanela + "i3GEOgraficointerativo1ComboTemasId").value);
  580 + i3GEOF.graficointerativo1.comboItensSel(idjanela);
  581 + };
  582 + }
  583 + if (i3GEO.temaAtivo !== "") {
  584 + $i(idjanela + "i3GEOgraficointerativo1ComboTemasId").value = i3GEO.temaAtivo;
  585 + $i(idjanela + "i3GEOgraficointerativo1ComboTemasId").onchange.call();
  586 + }
  587 + }, idjanela + "i3GEOgraficointerativo1ComboTemas", "", false, "ligados", "font-size:12px;width:350px");
598 588 },
599   - /*
  589 + /**
600 590 * Function: ativaTipo
601   - *
602   - * Define a vari&aacute;vel com o tipo de gr&aacute;fico e mostra a guia 2
  591 + *
  592 + * Define a vari&aacute;vel com o tipo de gr&aacute;fico e mostra a guia2
603 593 */
604   - ativaTipo : function(obj) {
605   - if(obj){
606   - i3GEOF.graficointerativo1.tipo = obj.value;
  594 + ativaTipo : function(obj, idjanela) {
  595 + if (obj) {
  596 + i3GEOF.graficointerativo1.propJanelas[idjanela].tipo = obj.value;
607 597 }
608   - if(i3GEOF.graficointerativo1.tipo == "ponto_1"){
609   - $i("i3GEOgraficointerativo1DadosPuros").checked = true;
610   - }
611   - else{
612   - $i("i3GEOgraficointerativo1DadosPuros").checked = false;
  598 + if (i3GEOF.graficointerativo1.propJanelas[idjanela].tipo == "ponto_1") {
  599 + $i(idjanela + "i3GEOgraficointerativo1DadosPuros").checked = true;
  600 + } else {
  601 + $i(idjanela + "i3GEOgraficointerativo1DadosPuros").checked = false;
613 602 }
614   - if (!$i("i3GEOgraficointerativo1tabeladados") || $i("i3GEOgraficointerativo1tabeladados").innerHTML == "") {
615   - $i("i3GEOgraficointerativo1guia2").onclick.call();
  603 + if (!$i(idjanela + "i3GEOgraficointerativo1tabeladados") || $i(idjanela + "i3GEOgraficointerativo1tabeladados").innerHTML == "") {
  604 + $i(idjanela + "i3GEOgraficointerativo1guia2").onclick.call();
616 605 } else {
617   - $i("i3GEOgraficointerativo1guia4").onclick.call();
  606 + $i(idjanela + "i3GEOgraficointerativo1guia4").onclick.call();
618 607 }
619 608 },
620   - alteraFatorPixel: function(tipo){
621   - var delta = 20,
622   - temp = $i("i3GEOgraficointerativo1FatorTamanho"),
623   - v = parseInt(temp.value,10);
624   - if(temp.value >= 0){
625   - if(tipo === "mais"){
  609 + alteraFatorPixel : function(tipo, idjanela) {
  610 + var delta = 20, temp = $i(idjanela + "i3GEOgraficointerativo1FatorTamanho"), v = parseInt(temp.value, 10);
  611 + if (temp.value >= 0) {
  612 + if (tipo === "mais") {
626 613 temp.value = v + delta;
627   - }
628   - else{
  614 + } else {
629 615 temp.value = v - delta;
630 616 }
631 617 }
632   - if(parseInt(temp.value,10) < 0){
  618 + if (parseInt(temp.value, 10) < 0) {
633 619 temp.value = 0;
634 620 }
635   - $i("i3GEOgraficointerativo1guia4").onclick.call();
  621 + $i(idjanela + "i3GEOgraficointerativo1guia4").onclick.call();
636 622 },
637   - /*
  623 + /**
638 624 * Function: configuraDados
639   - *
640   - * Configura o formul&aacute;rio para obten&ccedil;&atilde;o dos dados para
641   - * cada tipo de gr&aacute;fico
  625 + *
  626 + * Configura o formul&aacute;rio para obten&ccedil;&atilde;o dos dados para cada tipo de gr&aacute;fico
642 627 */
643   - configuraDados : function() {
  628 + configuraDados : function(idjanela) {
644 629 var ativa = function(comboxlinha, comboylinha, ajudapizza) {
645 630 try {
646   - $i("i3GEOgraficointerativo1ComboXlinha").style.display = comboxlinha;
647   - $i("i3GEOgraficointerativo1ComboYlinha").style.display = comboylinha;
648   - $i("i3GEOgraficointerativo1AjudaPizza").style.display = ajudapizza;
649   - } catch (e) {}
  631 + $i(idjanela + "i3GEOgraficointerativo1ComboXlinha").style.display = comboxlinha;
  632 + $i(idjanela + "i3GEOgraficointerativo1ComboYlinha").style.display = comboylinha;
  633 + $i(idjanela + "i3GEOgraficointerativo1AjudaPizza").style.display = ajudapizza;
  634 + } catch (e) {
  635 + }
650 636 };
651   - if (i3GEOF.graficointerativo1.tipo === "") {
652   - i3GEO.janela.tempoMsg($trad(31,
653   - i3GEOF.graficointerativo1.dicionario));
654   - i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativo1guia1",
655   - "i3GEOgraficointerativo1guia");
  637 + if (i3GEOF.graficointerativo1.propJanelas[idjanela].tipo === "") {
  638 + i3GEO.janela.tempoMsg($trad(31, i3GEOF.graficointerativo1.dicionario));
  639 + i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOgraficointerativo1guia1", idjanela + "i3GEOgraficointerativo1guia");
656 640 return;
657 641 }
658   - if (i3GEOF.graficointerativo1.tipo === "pizza2d") {
  642 + if (i3GEOF.graficointerativo1.propJanelas[idjanela].tipo === "pizza2d") {
659 643 ativa.call("block", "block", "block");
660 644 }
661 645 },
662   - /*
  646 + /**
663 647 * Function: comboItensSel
664   - *
  648 + *
665 649 * Cria um combo para selecionar os itens do tema escolhido
666   - *
  650 + *
667 651 * Veja:
668   - *
  652 + *
669 653 * <i3GEO.util.comboItens>
670 654 */
671   - comboItensSel : function() {
672   - var adicionaFilho = function(){},
673   - tema = $i("i3GEOgraficointerativo1ComboTemasId").value;
674   - i3GEO.util
675   - .comboItens(
676   - "i3GEOgraficointerativo1ComboXid",
677   - tema,
678   - function(retorno) {
679   - if (retorno.tipo === "erro") {
680   - $i("i3GEOgraficointerativo1ComboX").innerHTML = "<br><br><span style='color:red'>"
681   - + $trad(
682   - 32,
683   - i3GEOF.graficointerativo1.dicionario)
684   - + "</span><br><br>";
685   - $i("i3GEOgraficointerativo1ComboY").innerHTML = "<br><br><span style='color:red'>"
686   - + $trad(
687   - 32,
688   - i3GEOF.graficointerativo1.dicionario)
689   - + "</span><br><br>";
690   - } else {
691   - $i("i3GEOgraficointerativo1ComboY").innerHTML = "<div>"
692   - + retorno.dados
693   - + "&nbsp;<input title='"
694   - + $trad(33,i3GEOF.graficointerativo1.dicionario)
695   - + "' class=digitar type=text size=20 id=i3GEOgraficointerativo1ComboYidTitulo value='' />"
696   - + "&nbsp;<input id='i3GEOgraficointerativo1ComboYidcor' class=digitar type=text size=8 value='' />"
697   - + "<img alt='aquarela.gif' style=position:relative;top:3px;left:3px;cursor:pointer src='"
698   - + i3GEO.configura.locaplic
699   - + "/imagens/aquarela.gif' onclick='i3GEOF.graficointerativo1.corj(\"i3GEOgraficointerativo1ComboYidcor\")' /></div>";
  655 + comboItensSel : function(idjanela) {
  656 + var adicionaFilho = function() {
  657 + }, tema = $i(idjanela + "i3GEOgraficointerativo1ComboTemasId").value;
  658 + i3GEO.util.comboItens(idjanela + "i3GEOgraficointerativo1ComboXid", tema, function(retorno) {
  659 + if (retorno.tipo === "erro") {
  660 + $i(idjanela + "i3GEOgraficointerativo1ComboX").innerHTML =
  661 + "<br><br><span style='color:red'>" + $trad(32, i3GEOF.graficointerativo1.dicionario) + "</span><br><br>";
  662 + $i(idjanela + "i3GEOgraficointerativo1ComboY").innerHTML =
  663 + "<br><br><span style='color:red'>" + $trad(32, i3GEOF.graficointerativo1.dicionario) + "</span><br><br>";
  664 + } else {
  665 + $i(idjanela + "i3GEOgraficointerativo1ComboY").innerHTML =
  666 + "<div>" + retorno.dados + "&nbsp;<input title='" + $trad(33, i3GEOF.graficointerativo1.dicionario)
  667 + + "' class=digitar type=text size=20 id='" + idjanela + "i3GEOgraficointerativo1ComboYidTitulo' value='' />"
  668 + + "&nbsp;<input id='" + idjanela
  669 + + "i3GEOgraficointerativo1ComboYidcor' class=digitar type=text size=8 value='' />"
  670 + + "<img alt='aquarela.gif' style=position:relative;top:3px;left:3px;cursor:pointer src='"
  671 + + i3GEO.configura.locaplic + "/imagens/aquarela.gif' onclick='i3GEOF.graficointerativo1.corj(\"" + idjanela
  672 + + "i3GEOgraficointerativo1ComboYidcor\")' /></div>";
700 673  
701   - $i("i3GEOgraficointerativo1ComboXid").id = "i3GEOgraficointerativo1ComboYid";
702   - $i("i3GEOgraficointerativo1ComboX").innerHTML = "<div>"
703   - + retorno.dados
704   - + "&nbsp;<input title='"
705   - + $trad(33, i3GEOF.graficointerativo1.dicionario)
706   - + "' class=digitar type=text size=20 id=i3GEOgraficointerativo1ComboXidTitulo value='' /></div>";
707   - $i("i3GEOgraficointerativo1ComboXid").style.width = "160px";
708   - $i("i3GEOgraficointerativo1ComboYid").style.width = "160px";
  674 + $i(idjanela + "i3GEOgraficointerativo1ComboXid").id = idjanela + "i3GEOgraficointerativo1ComboYid";
  675 + $i(idjanela + "i3GEOgraficointerativo1ComboX").innerHTML =
  676 + "<div>" + retorno.dados + "&nbsp;<input title='" + $trad(33, i3GEOF.graficointerativo1.dicionario)
  677 + + "' class=digitar type=text size=20 id='" + idjanela
  678 + + "i3GEOgraficointerativo1ComboXidTitulo' value='' /></div>";
  679 + $i(idjanela + "i3GEOgraficointerativo1ComboXid").style.width = "160px";
  680 + $i(idjanela + "i3GEOgraficointerativo1ComboYid").style.width = "160px";
709 681  
710   - adicionaFilho = function() {
711   - var no = document.createElement("div"),
712   - id = "CorG"+parseInt(Math.random()*100000,10),
713   - novoselect;
714   - no.innerHTML = retorno.dados
715   - + "&nbsp;<input title='"
716   - + $trad(33, i3GEOF.graficointerativo1.dicionario)
717   - + "' class=digitar type=text size=20 value='' />"
718   - + "&nbsp;<input id='"
719   - + id
720   - + "' class=digitar type=text size=8 value='' />"
721   - + "<img alt='aquarela.gif' style=position:relative;top:3px;left:3px;cursor:pointer src='"
722   - + i3GEO.configura.locaplic
723   - + "/imagens/aquarela.gif' onclick='i3GEOF.graficointerativo1.corj(\""
724   - + id
725   - + "\")' /><br>";
726   - novoselect = no.getElementsByTagName("select")[0];
727   - novoselect.id = "";
728   - novoselect.onchange = adicionaFilho;
729   - novoselect.style.width = "160px";
730   - $i("i3GEOgraficointerativo1ComboY").appendChild(no);
731   - };
732   - $i("i3GEOgraficointerativo1ComboYid").onchange = adicionaFilho;
733   - }
734   - }, "i3GEOgraficointerativo1ComboX", "");
  682 + adicionaFilho =
  683 + function() {
  684 + var no = document.createElement("div"), id = "CorG" + parseInt(Math.random() * 100000, 10), novoselect;
  685 + no.innerHTML =
  686 + retorno.dados + "&nbsp;<input title='" + $trad(33, i3GEOF.graficointerativo1.dicionario)
  687 + + "' class=digitar type=text size=20 value='' />" + "&nbsp;<input id='" + id
  688 + + "' class=digitar type=text size=8 value='' />"
  689 + + "<img alt='aquarela.gif' style=position:relative;top:3px;left:3px;cursor:pointer src='"
  690 + + i3GEO.configura.locaplic + "/imagens/aquarela.gif' onclick='i3GEOF.graficointerativo1.corj(\"" + id
  691 + + "\")' /><br>";
  692 + novoselect = no.getElementsByTagName("select")[0];
  693 + novoselect.id = "";
  694 + novoselect.onchange = adicionaFilho;
  695 + novoselect.style.width = "160px";
  696 + $i(idjanela + "i3GEOgraficointerativo1ComboY").appendChild(no);
  697 + };
  698 + $i(idjanela + "i3GEOgraficointerativo1ComboYid").onchange = adicionaFilho;
  699 + }
  700 + }, idjanela + "i3GEOgraficointerativo1ComboX", "");
  701 + },
  702 + /**
  703 + * Atualiza as janelas obtendo os dados conforme a navegacao ocorre
  704 + */
  705 + atualizaListaDeRegistros : function() {
  706 + var i, janelas = i3GEOF.graficointerativo1.janelas, propJanelas = i3GEOF.graficointerativo1.propJanelas, n = janelas.length;
  707 + for (i = 0; i < n; i++) {
  708 + if (propJanelas[janelas[i]].atualiza === true) {
  709 + i3GEOF.graficointerativo1.obterDados(janelas[i]);
  710 + }
  711 + }
735 712 },
736   - /*
  713 + /**
737 714 * Function: obterDados
738   - *
  715 + *
739 716 * Obt&eacute;m os dados que ser&atilde;o utilizados no gr&aacute;fico
740   - *
  717 + *
741 718 * Veja:
742   - *
  719 + *
743 720 * <GRAFICOSELECAO>
744 721 */
745   - obterDados : function() {
  722 + obterDados : function(idjanela) {
  723 + // TODO
746 724 if (!i3GEO.Interface) {
747 725 return;
748 726 }
749   - if (i3GEOF.graficointerativo1.aguarde.visibility === "visible") {
  727 + if (i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility === "visible") {
750 728 return;
751 729 }
752   - 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;
  730 + var tema, excluir, cp, tipo, ordenax, monta, p, x, y, i, n, temp;
  731 +
  732 + tema = $i(idjanela + "i3GEOgraficointerativo1ComboTemasId").value;
  733 + excluir = $i(idjanela + "i3GEOgraficointerativo1excluir").value;
  734 + cp = new cpaint();
  735 + tipo = $i(idjanela + "i3GEOgraficointerativo1TipoAgregacao").value;
  736 + ordenax = "sim";
753 737  
754 738 // pega os itens
755   - temp = $i("i3GEOgraficointerativo1ComboX");
  739 + temp = $i(idjanela + "i3GEOgraficointerativo1ComboX");
756 740 x = temp.getElementsByTagName("select")[0].value;
757   - temp = $i("i3GEOgraficointerativo1ComboY");
  741 + temp = $i(idjanela + "i3GEOgraficointerativo1ComboY");
758 742 temp = temp.getElementsByTagName("select");
759 743 n = temp.length;
760 744 if (n === 1) {
... ... @@ -768,243 +752,209 @@ i3GEOF.graficointerativo1 = {
768 752 }
769 753 y = y.join(",");
770 754 }
771   - p = i3GEO.configura.locaplic
772   - + "/ferramentas/graficointerativo1/exec.php?g_sid="
773   - + i3GEO.configura.sid + "&funcao=graficoSelecao&tema=" + tema
774   - + "&itemclasses=" + x + "&itemvalores=" + y + "&exclui="
775   - + excluir + "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
  755 + p =
  756 + i3GEO.configura.locaplic + "/ferramentas/graficointerativo1/exec.php?g_sid=" + i3GEO.configura.sid
  757 + + "&funcao=graficoSelecao&tema=" + tema + "&itemclasses=" + x + "&itemvalores=" + y + "&exclui=" + excluir + "&ext="
  758 + + i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten);
776 759  
777   - if ($i("i3GEOgraficointerativo1DadosPuros").checked) {
  760 + if ($i(idjanela + "i3GEOgraficointerativo1DadosPuros").checked) {
778 761 tipo = "nenhum";
779 762 } else {
780 763 if (x === y) {
781 764 tipo = "conta";
782 765 }
783 766 }
784   - if (!$i("i3GEOgraficointerativo1OrdenaX").checked) {
  767 + if (!$i(idjanela + "i3GEOgraficointerativo1OrdenaX").checked) {
785 768 ordenax = "nao";
786 769 }
787 770  
788 771 if (tema === "") {
789   - i3GEO.janela.tempoMsg($trad(34,
790   - i3GEOF.graficointerativo1.dicionario));
  772 + i3GEO.janela.tempoMsg($trad(34, i3GEOF.graficointerativo1.dicionario));
791 773 return;
792 774 }
793 775 if (x === "") {
794   - i3GEO.janela.tempoMsg($trad(35,
795   - i3GEOF.graficointerativo1.dicionario));
  776 + i3GEO.janela.tempoMsg($trad(35, i3GEOF.graficointerativo1.dicionario));
796 777 return;
797 778 }
798 779 if (y === "") {
799   - i3GEO.janela.tempoMsg($trad(36,
800   - i3GEOF.graficointerativo1.dicionario));
  780 + i3GEO.janela.tempoMsg($trad(36, i3GEOF.graficointerativo1.dicionario));
801 781 return;
802 782 }
803 783 monta = function(retorno) {
804   - i3GEOF.graficointerativo1.aguarde.visibility = "hidden";
805   - i3GEOF.graficointerativo1.montaTabelaDados(retorno);
806   - $i("i3GEOgraficointerativo1guia4").onclick.call();
807   - // verifica para nao ficar mostrando a janela toda vez que redesenha
808   - // o mapa
809   - if ($i("i3GEOFgraficointerativo1ativaNavegacao").checked == false) {
810   - i3GEO.janela.tempoMsg($trad(37,
811   - i3GEOF.graficointerativo1.dicionario));
812   - }
  784 + i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "hidden";
  785 + i3GEOF.graficointerativo1.montaTabelaDados(idjanela, retorno);
  786 + $i(idjanela + "i3GEOgraficointerativo1guia4").onclick.call();
813 787 };
814   - i3GEOF.graficointerativo1.aguarde.visibility = "visible";
  788 + i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "visible";
815 789 cp.set_response_type("JSON");
816   - cp.call(p + "&tipo=" + tipo + "&ordenax=" + ordenax, "graficoSelecao",
817   - monta);
  790 + cp.call(p + "&tipo=" + tipo + "&ordenax=" + ordenax, "graficoSelecao", monta);
818 791 },
819   - /*
  792 + /**
820 793 * Pega os nomes das colunas
821 794 */
822   - nomesColunas: function(){
823   - //pega os nomes das clunas
824   - var i,n,p,
825   - temp = $i("i3GEOgraficointerativo1ComboX"),
826   - colunas,
827   - cores,
828   - alias;
829   - if(temp.getElementsByTagName("select")[0]){
  795 + nomesColunas : function(idjanela) {
  796 + // pega os nomes das clunas
  797 + var i, n, p, temp = $i(idjanela + "i3GEOgraficointerativo1ComboX"), colunas, cores, alias;
  798 + if (temp.getElementsByTagName("select")[0]) {
830 799 cores = [];
831   - colunas = [temp.getElementsByTagName("select")[0].value];
832   - alias = [temp.getElementsByTagName("input")[0].value];
833   - }
834   - else{
835   - //caso os dados tenham sido definidos como parametros
836   - colunas = ["-","-"];
  800 + colunas = [
  801 + temp.getElementsByTagName("select")[0].value
  802 + ];
  803 + alias = [
  804 + temp.getElementsByTagName("input")[0].value
  805 + ];
  806 + } else {
  807 + // caso os dados tenham sido definidos como parametros
  808 + colunas = [
  809 + "-",
  810 + "-"
  811 + ];
837 812 alias = colunas;
838   - cores = ["#29C152","#29C152"];
  813 + cores = [
  814 + "#29C152",
  815 + "#29C152"
  816 + ];
839 817 }
840   - temp = $i("i3GEOgraficointerativo1ComboY");
  818 + temp = $i(idjanela + "i3GEOgraficointerativo1ComboY");
841 819 temp = temp.getElementsByTagName("select");
842 820 n = temp.length;
843   - for(i=0;i<n;i++){
844   - if(temp[i].value != ""){
  821 + for (i = 0; i < n; i++) {
  822 + if (temp[i].value != "") {
845 823 colunas.push(temp[i].value);
846   - //pega o alias
  824 + // pega o alias
847 825 p = temp[i].parentNode.getElementsByTagName("input");
848   - if(p[0].value != ""){
  826 + if (p[0].value != "") {
849 827 alias.push(p[0].value);
850   - }
851   - else{
  828 + } else {
852 829 alias.push(temp[i].value);
853 830 }
854   - if(p[1].value != ""){
  831 + if (p[1].value != "") {
855 832 cores.push(p[1].value);
856   - }
857   - else{
  833 + } else {
858 834 cores.push("#29C152");
859 835 }
860 836 }
861 837 }
862   - return [colunas,alias,cores];
  838 + return [
  839 + colunas,
  840 + alias,
  841 + cores
  842 + ];
863 843 },
864   - /*
  844 + /**
865 845 * Function: montaTabelaDados
866   - *
  846 + *
867 847 * Monta a tabela com os dados que ser&atilde;o utilizados no gr&aacute;fico
868   - *
  848 + *
869 849 * Parametro:
870   - *
  850 + *
871 851 * retorno {JSON} - dados no formato JSON
872 852 */
873   - montaTabelaDados : function(retorno) {
874   - var colunas = [],
875   - ncolunas,
876   - dados,
877   - n,
878   - v,
879   - ins = [],
880   - i,
881   - j,
882   - id,
883   - cor = "#C11515";
  853 + montaTabelaDados : function(idjanela, retorno) {
  854 + var colunas = [], ncolunas, dados, n, v, ins = [], i, j, id, cor = "#C11515";
884 855 if (!retorno.dados && retorno.data != undefined) {
885 856 dados = retorno.data.dados;
886 857 } else {
887 858 dados = retorno;
888 859 }
889   - ins.push("<p class=paragrafo >"
890   - + $trad(38, i3GEOF.graficointerativo1.dicionario)
891   - + "</p><table class=lista4 id=i3GEOgraficointerativo1tabeladados ><tr><td></td>");
892   - //pega os nomes das clunas
893   - colunas = i3GEOF.graficointerativo1.nomesColunas()[0];
  860 + ins.push("<p class=paragrafo >" + $trad(38, i3GEOF.graficointerativo1.dicionario) + "</p><table class=lista4 id='" + idjanela
  861 + + "i3GEOgraficointerativo1tabeladados' ><tr><td></td>");
  862 + // pega os nomes das clunas
  863 + colunas = i3GEOF.graficointerativo1.nomesColunas(idjanela)[0];
894 864 ncolunas = colunas.length;
895   - for(i=0;i<ncolunas;i++){
896   - ins.push("<td style=background-color:yellow >&nbsp;<img style=cursor:pointer onclick='i3GEOF.graficointerativo1.ordenaColuna(this,1)' src='"
897   - + i3GEO.configura.locaplic
898   - + "/imagens/ordena1.gif' title='ordena' /> "
899   - + colunas[i]
900   - + "</td>");
  865 + for (i = 0; i < ncolunas; i++) {
  866 + ins
  867 + .push("<td style=background-color:yellow >&nbsp;<img style=cursor:pointer onclick='i3GEOF.graficointerativo1.ordenaColuna(this,1)' src='"
  868 + + i3GEO.configura.locaplic + "/imagens/ordena1.gif' title='ordena' /> " + colunas[i] + "</td>");
901 869 }
902   - ins.push("<td style=background-color:yellow >"
903   - + $trad(41, i3GEOF.graficointerativo1.dicionario)
904   - + "</td><td></td></tr>");
  870 + ins.push("<td style=background-color:yellow >" + $trad(41, i3GEOF.graficointerativo1.dicionario) + "</td><td></td></tr>");
905 871 n = dados.length;
906 872 for (i = 1; i < n; i++) {
907 873 v = dados[i].split(";");
908 874 // ins += v[0]+" "+v[1];
909   - id = "i3GEOgraficointerativo1Dados" + i; // layer+indice da classe
  875 + id = idjanela + "i3GEOgraficointerativo1Dados" + i; // layer+indice da classe
910 876 ins.push("<tr><td>");
911 877 ins.push("<img style='cursor:pointer' onclick='i3GEOF.graficointerativo1.excluilinha(this)' src='"
912   - + i3GEO.configura.locaplic
913   - + "/imagens/x.gif' title='"
914   - + $trad(42, i3GEOF.graficointerativo1.dicionario)
915   - + "' /></td>");
  878 + + i3GEO.configura.locaplic + "/imagens/x.gif' title='" + $trad(42, i3GEOF.graficointerativo1.dicionario) + "' /></td>");
916 879 ins.push("</td>");
917   - for(j=0;j<ncolunas;j++){
  880 + for (j = 0; j < ncolunas; j++) {
918 881 v[j] = v[j].replace("'", "");
919 882 v[j] = v[j].replace("'", "");
920 883 ins.push("<td>");
921   - ins.push($inputText("", "", id + colunas[j], $trad(43,
922   - i3GEOF.graficointerativo1.dicionario), 20, v[j], colunas[j]));
  884 + ins.push($inputText("", "", id + colunas[j], $trad(43, i3GEOF.graficointerativo1.dicionario), 20, v[j], colunas[j]));
923 885 ins.push("</td>");
924 886 }
925 887  
926 888 ins.push("<td>");
927   - if ($i("i3GEOgraficointerativo1CoresA").checked) {
  889 + if ($i(idjanela + "i3GEOgraficointerativo1CoresA").checked) {
928 890 cor = i3GEO.util.rgb2hex(i3GEO.util.randomRGB());
929 891 }
930   - // verifica se no objeto com os dados existe um terceiro valor com
  892 + // verifica se no objeto com os dados existe um terceiro
  893 + // valor com
931 894 // as cores
932 895 if (v[ncolunas + 1]) {
933 896 cor = i3GEO.util.rgb2hex(v[ncolunas + 1]);
934 897 }
935   - ins.push($inputText("", "", id + "_cor", "", 12, cor, $trad(41,
936   - i3GEOF.graficointerativo1.dicionario)));
  898 + ins.push($inputText("", "", id + "_cor", "", 12, cor, $trad(41, i3GEOF.graficointerativo1.dicionario)));
937 899 ins.push("</td><td>");
938   - ins.push("<img alt='aquarela.gif' style=cursor:pointer src='"
939   - + i3GEO.configura.locaplic
940   - + "/imagens/aquarela.gif' onclick='i3GEOF.graficointerativo1.corj(\""
941   - + id + "_cor\")' />");
  900 + ins.push("<img alt='aquarela.gif' style=cursor:pointer src='" + i3GEO.configura.locaplic
  901 + + "/imagens/aquarela.gif' onclick='i3GEOF.graficointerativo1.corj(\"" + id + "_cor\")' />");
942 902 ins.push("</td></tr>");
943 903 }
944 904 ins.push("</table><br>");
945   - $i("i3GEOgraficointerativo1Dados").innerHTML = ins.join("");
  905 + $i(idjanela + "i3GEOgraficointerativo1Dados").innerHTML = ins.join("");
946 906 },
947   - /*
  907 + /**
948 908 * Function: tabela2csv
949   - *
  909 + *
950 910 * Obt&eacute;m os dados da tabela em CSV
951 911 */
952   - tabela2csv : function() {
953   - var colunas = i3GEOF.graficointerativo1.nomesColunas(),
954   - ncolunas = colunas[0].length,
955   - inputs = $i("i3GEOgraficointerativo1Dados").getElementsByTagName("input"),
956   - ninputs = inputs.length,
957   - i,j,
958   - temp,
959   - csv = [];
  912 + tabela2csv : function(idjanela) {
  913 + var colunas = i3GEOF.graficointerativo1.nomesColunas(idjanela), ncolunas = colunas[0].length, inputs =
  914 + $i(idjanela + "i3GEOgraficointerativo1Dados").getElementsByTagName("input"), ninputs = inputs.length, i, j, temp, csv = [];
960 915  
961 916 csv.push(colunas[0].join(";"));
962   - for (i = 0; i < ninputs; i = (i + 1 + ncolunas)){
  917 + for (i = 0; i < ninputs; i = (i + 1 + ncolunas)) {
963 918 temp = [];
964   - for(j=0;j<ncolunas;j++){
  919 + for (j = 0; j < ncolunas; j++) {
965 920 temp.push(inputs[i + j].value);
966 921 }
967 922 csv.push(temp.join(";"));
968 923 }
969 924 return csv;
970 925 },
971   - /*
  926 + /**
972 927 * Function: tabela2dados
973   - *
  928 + *
974 929 * Obt&eacute;m os dados da tabela para compor o gr&aacute;fico
975 930 */
976   - tabela2dados : function() {
977   - if (i3GEOF.graficointerativo1.aguarde.visibility === "visible") {
  931 + tabela2dados : function(idjanela) {
  932 + if (i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility === "visible") {
978 933 return;
979 934 }
980   - i3GEOF.graficointerativo1.aguarde.visibility = "visible";
981   - var colunas = i3GEOF.graficointerativo1.nomesColunas(),
982   - ncolunas = colunas[0].length,
983   - temp = 0,
984   - ultimo = 0,
985   - inputs = $i("i3GEOgraficointerativo1Dados").getElementsByTagName("input"),
986   - ninputs = inputs.length,
987   - tipoColuna = "String",
988   - metadados = [],
989   - i,j,acumulado = [], acum, cores = [], par = [], total = 0,
990   - menor = 0, maior = 0, legendaX = "", legendaY = "", dados = {}, xInclinado = $i("i3GEOgraficointerativo1xInclinado").checked;
  935 + i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "visible";
  936 + var colunas = i3GEOF.graficointerativo1.nomesColunas(idjanela), ncolunas = colunas[0].length, temp = 0, ultimo = 0, inputs =
  937 + $i(idjanela + "i3GEOgraficointerativo1Dados").getElementsByTagName("input"), ninputs = inputs.length, tipoColuna = "String", metadados =
  938 + [], i, j, acumulado = [], acum, cores = [], par = [], total = 0, menor = 0, maior = 0, legendaX = "", legendaY = "", dados =
  939 + {}, xInclinado = $i(idjanela + "i3GEOgraficointerativo1xInclinado").checked;
991 940  
992   - if(ninputs > 0){
  941 + if (ninputs > 0) {
993 942 menor = inputs[1].value * 1;
994 943 }
995   - if ($i("i3GEOgraficointerativo1ComboTemasId")) {
996   - titulo = $i("i3GEOgraficointerativo1ComboTemasId").options[$i("i3GEOgraficointerativo1ComboTemasId").options.selectedIndex].text;
  944 + if ($i(idjanela + "i3GEOgraficointerativo1ComboTemasId")) {
  945 + titulo =
  946 + $i(idjanela + "i3GEOgraficointerativo1ComboTemasId").options[$i(idjanela + "i3GEOgraficointerativo1ComboTemasId").options.selectedIndex].text;
997 947 }
998 948 if (i3GEOF.graficointerativo1.titulo != "") {
999 949 titulo = i3GEOF.graficointerativo1.titulo;
1000 950 }
1001   - if ($i("i3GEOgraficointerativo1ComboXid")) {
1002   - legendaX = $i("i3GEOgraficointerativo1ComboXidTitulo").value;
  951 + if ($i(idjanela + "i3GEOgraficointerativo1ComboXid")) {
  952 + legendaX = $i(idjanela + "i3GEOgraficointerativo1ComboXidTitulo").value;
1003 953 }
1004   - if ($i("i3GEOgraficointerativo1ComboYid")) {
1005   - legendaY = $i("i3GEOgraficointerativo1ComboYidTitulo").value;
  954 + if ($i(idjanela + "i3GEOgraficointerativo1ComboYid")) {
  955 + legendaY = $i(idjanela + "i3GEOgraficointerativo1ComboYidTitulo").value;
1006 956 }
1007   - if(ncolunas === 2){
  957 + if (ncolunas === 2) {
1008 958 for (i = 0; i < ninputs; i = i + 3) {
1009 959 temp = inputs[i + 1].value * 1;
1010 960 total += temp;
... ... @@ -1022,23 +972,25 @@ i3GEOF.graficointerativo1 = {
1022 972 menor = temp;
1023 973 }
1024 974 temp = inputs[i + 1].value * 1;
1025   - if ($i("i3GEOgraficointerativo1Acumula").checked) {
  975 + if ($i(idjanela + "i3GEOgraficointerativo1Acumula").checked) {
1026 976 temp = acum;
1027 977 }
1028   - if ($i("i3GEOgraficointerativo1Relativa").checked) {
  978 + if ($i(idjanela + "i3GEOgraficointerativo1Relativa").checked) {
1029 979 temp = (temp * 100) / total;
1030 980 }
1031   - par.push([ inputs[i].value + " ", temp ]);
  981 + par.push([
  982 + inputs[i].value + " ",
  983 + temp
  984 + ]);
1032 985 }
1033   - if ($i("i3GEOgraficointerativo1Acumula").checked) {
  986 + if ($i(idjanela + "i3GEOgraficointerativo1Acumula").checked) {
1034 987 maior = 0;
1035 988 }
1036   - }
1037   - else{
  989 + } else {
1038 990 total = 0;
1039   - for (i = 0; i < ninputs; i = (i + 1 + ncolunas)){
  991 + for (i = 0; i < ninputs; i = (i + 1 + ncolunas)) {
1040 992 temp = [];
1041   - for(j=0;j<ncolunas;j++){
  993 + for (j = 0; j < ncolunas; j++) {
1042 994 temp.push(inputs[i + j].value);
1043 995 }
1044 996 par.push(temp);
... ... @@ -1047,13 +999,11 @@ i3GEOF.graficointerativo1 = {
1047 999 }
1048 1000 if (legendaX == legendaY && (legendaX != "" && legendaY != "")) {
1049 1001 menor = 0;
1050   - legendaX += " (" + $trad(45, i3GEOF.graficointerativo1.dicionario)
1051   - + ")";
1052   - legendaY += " (" + $trad(46, i3GEOF.graficointerativo1.dicionario)
1053   - + ")";
  1002 + legendaX += " (" + $trad(45, i3GEOF.graficointerativo1.dicionario) + ")";
  1003 + legendaY += " (" + $trad(46, i3GEOF.graficointerativo1.dicionario) + ")";
1054 1004 }
1055 1005  
1056   - for(j=0;j<ncolunas;j++){
  1006 + for (j = 0; j < ncolunas; j++) {
1057 1007 metadados.push({
1058 1008 "colIndex" : j,
1059 1009 "colType" : tipoColuna,
... ... @@ -1062,50 +1012,43 @@ i3GEOF.graficointerativo1 = {
1062 1012 tipoColuna = "Numeric";
1063 1013 }
1064 1014 dados = {
1065   - "resultset" : par,
1066   - "metadata" : metadados
  1015 + "resultset" : par,
  1016 + "metadata" : metadados
1067 1017 };
1068   - switch (i3GEOF.graficointerativo1.tipo) {
  1018 + switch (i3GEOF.graficointerativo1.propJanelas[idjanela].tipo) {
1069 1019 case "bar_1":
1070 1020 legendaX = "";
1071   - i3GEOF.graficointerativo1.barras(dados, maior, cores, legendaY,
1072   - legendaX, xInclinado, "vertical");
  1021 + i3GEOF.graficointerativo1.barras(idjanela, dados, maior, cores, legendaY, legendaX, xInclinado, "vertical");
1073 1022 break;
1074 1023 case "bar_2":
1075 1024 legendaX = "";
1076   - i3GEOF.graficointerativo1.barras(dados, maior, cores, legendaY,
1077   - legendaX, xInclinado, "horizontal");
  1025 + i3GEOF.graficointerativo1.barras(idjanela, dados, maior, cores, legendaY, legendaX, xInclinado, "horizontal");
1078 1026 break;
1079 1027 case "linha_1":
1080 1028 legendaX = "";
1081   - i3GEOF.graficointerativo1.linhas(dados, maior, cores, legendaY,
1082   - legendaX, xInclinado);
  1029 + i3GEOF.graficointerativo1.linhas(idjanela, dados, maior, cores, legendaY, legendaX, xInclinado);
1083 1030 break;
1084 1031 case "pizza_1":
1085 1032 legendaX = "";
1086   - i3GEOF.graficointerativo1.pizzas(dados, maior, cores, legendaY,
1087   - legendaX);
  1033 + i3GEOF.graficointerativo1.pizzas(idjanela, dados, maior, cores, legendaY, legendaX);
1088 1034 break;
1089 1035 case "ponto_1":
1090   - i3GEOF.graficointerativo1.pontos(dados, maior, cores, legendaY,
1091   - legendaX);
  1036 + i3GEOF.graficointerativo1.pontos(idjanela, dados, maior, cores, legendaY, legendaX);
1092 1037 break;
1093 1038 case "area_1":
1094 1039 legendaX = "";
1095   - i3GEOF.graficointerativo1.areas(dados, maior, cores, legendaY,
1096   - legendaX, xInclinado);
  1040 + i3GEOF.graficointerativo1.areas(idjanela, dados, maior, cores, legendaY, legendaX, xInclinado);
1097 1041 break;
1098 1042 case "arvore_1":
1099   - i3GEOF.graficointerativo1.arvores(dados, maior, cores, legendaY,
1100   - legendaX);
  1043 + i3GEOF.graficointerativo1.arvores(idjanela, dados, maior, cores, legendaY, legendaX);
1101 1044 break;
1102 1045 default:
1103   - //alert($trad(4, i3GEOF.graficointerativo1.dicionario));
  1046 + // alert($trad(4, i3GEOF.graficointerativo1.dicionario));
1104 1047 }
1105 1048 },
1106   - /*
  1049 + /**
1107 1050 * Function: excluilinha
1108   - *
  1051 + *
1109 1052 * Exclui uma linha da tabela de dados
1110 1053 */
1111 1054 excluilinha : function(celula) {
... ... @@ -1115,22 +1058,22 @@ i3GEOF.graficointerativo1 = {
1115 1058 } while (p.childNodes.length > 0);
1116 1059 p.parentNode.removeChild(p);
1117 1060 },
1118   - /*
  1061 + /**
1119 1062 * Function: corj
1120   - *
  1063 + *
1121 1064 * Abre a janela para o usu&aacute;rio selecionar uma cor interativamente
1122 1065 */
1123 1066 corj : function(obj) {
1124 1067 i3GEO.util.abreCor("", obj, "hex");
1125 1068 },
1126   - /*
  1069 + /**
1127 1070 * Function: ordenaColuna
1128   - *
  1071 + *
1129 1072 * Ordena uma coluna da tabela
1130 1073 */
1131 1074 ordenaColuna : function(coluna, cid) {
1132   - var tabela = $i("i3GEOgraficointerativo1Dados").getElementsByTagName(
1133   - "table")[0], trs, ntrs = 0, psort = [], t = 0, ins = "", p = 0, e, temp, chaves = [], numero = false;
  1075 + var tabela = $i(idjanela + "i3GEOgraficointerativo1Dados").getElementsByTagName("table")[0], trs, ntrs = 0, psort = [], t = 0, ins =
  1076 + "", p = 0, e, temp, chaves = [], numero = false;
1134 1077  
1135 1078 trs = tabela.getElementsByTagName("tr");
1136 1079 ntrs = trs.length;
... ... @@ -1163,133 +1106,110 @@ i3GEOF.graficointerativo1 = {
1163 1106 }
1164 1107 tabela.innerHTML = ins;
1165 1108 },
1166   - /*
  1109 + /**
1167 1110 * Function: ativaNavegacao
1168   - *
1169   - * Ativa ou desativa a atualiza&ccedil;&atilde;o autom&aacute;tica ao
1170   - * navegar no mapa
  1111 + *
  1112 + * Ativa a atualiza&ccedil;&atilde;o autom&aacute;tica ao navegar no mapa
1171 1113 */
1172   - ativaNavegacao : function(obj) {
  1114 + ativaNavegacao : function() {
1173 1115 if (!i3GEO.Interface) {
1174 1116 return;
1175 1117 }
1176   - if (obj === true) {
1177   - if (i3GEO.Interface.ATUAL !== "googlemaps"
1178   - && i3GEO.Interface.ATUAL !== "googleearth") {
1179   - i3GEO.eventos.NAVEGAMAPA
1180   - .push("i3GEOF.graficointerativo1.obterDados()");
1181   - }
1182   - if (i3GEO.Interface.ATUAL === "googlemaps") {
1183   - graficointerativo1Dragend = GEvent.addListener(i3GeoMap,
1184   - "dragend", function() {
1185   - i3GEOF.graficointerativo1.obterDados();
1186   - });
1187   - graficointerativo1Zoomend = GEvent.addListener(i3GeoMap,
1188   - "zoomend", function() {
1189   - i3GEOF.graficointerativo1.obterDados();
1190   - });
1191   - }
1192   - if (i3GEO.Interface.ATUAL === "googleearth") {
1193   - graficointerativo1Dragend = google.earth.addEventListener(
1194   - i3GeoMap.getView(), "viewchangeend", function() {
1195   - i3GEOF.graficointerativo1.obterDados();
1196   - });
1197   - }
1198   - } else {
1199   - if (i3GEO.Interface.ATUAL !== "googlemaps"
1200   - && i3GEO.Interface.ATUAL !== "googleearth") {
1201   - i3GEO.eventos.NAVEGAMAPA
1202   - .remove("i3GEOF.graficointerativo1.obterDados()");
1203   - }
1204   - if (i3GEO.Interface.ATUAL === "googlemaps") {
1205   - GEvent.removeListener(graficointerativo1Dragend);
1206   - GEvent.removeListener(graficointerativo1Zoomend);
1207   - }
1208   - if (i3GEO.Interface.ATUAL === "googleearth") {
1209   - google.earth.removeEventListener(graficointerativo1Dragend);
1210   - }
  1118 + i3GEO.janela.tempoMsg($trad(37, i3GEOF.graficointerativo1.dicionario));
  1119 + if (i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth") {
  1120 + i3GEO.eventos.NAVEGAMAPA.push("i3GEOF.graficointerativo1.atualizaListaDeRegistros()");
  1121 + }
  1122 + if (i3GEO.Interface.ATUAL === "googlemaps") {
  1123 + graficointerativo1Dragend = GEvent.addListener(i3GeoMap, "dragend", function() {
  1124 + i3GEOF.graficointerativo1.atualizaListaDeRegistros();
  1125 + });
  1126 + graficointerativo1Zoomend = GEvent.addListener(i3GeoMap, "zoomend", function() {
  1127 + i3GEOF.graficointerativo1.atualizaListaDeRegistros();
  1128 + });
1211 1129 }
  1130 + if (i3GEO.Interface.ATUAL === "googleearth") {
  1131 + graficointerativo1Dragend = google.earth.addEventListener(i3GeoMap.getView(), "viewchangeend", function() {
  1132 + i3GEOF.graficointerativo1.atualizaListaDeRegistros();
  1133 + });
  1134 + }
  1135 +
1212 1136 },
1213   - configDefault : function(dados, maior, cores, legendaY, legendaX) {
1214   - var temp,config = {
1215   - canvas : "i3GEOgraficointerativo1guia4objCanvas",
1216   - height : parseInt($i("i3GEOF.graficointerativo1_corpo").style.height, 10) - 80,
1217   - orthoAxisTitle : legendaY,
1218   - valuesFont : 'normal 9px sans-serif ',
1219   - baseAxisTitle : legendaX,
1220   - baseAxisTitleAlign : 'center',
1221   - tooltipEnabled : true,
1222   - tooltipArrowVisible : true,
1223   - tooltipFade : false,
1224   - tooltipFollowMouse : false,
1225   - tooltipFormat : function(scene) {
1226   - var cat = this.scene.datum.atoms['category'].value, val = this.scene.datum.atoms['value'].value;
1227   - return "<span style=color:yellow >" + cat + "</span><br>"
1228   - + format("#.###,", val);
1229   - },
1230   - baseAxisTitleFont : '9px sans-serif',
1231   - yAxisTickFormatter : function(valor) {
1232   - valor = valor + "";
1233   - valor = format("#.###,", valor);
1234   - return valor;
1235   - },
1236   - valueFormat : function(valor) {
1237   - valor = valor + "";
1238   - valor = format("#.###,", valor);
1239   - return valor;
1240   - },
1241   - valuesAnchor : 'top',
1242   - valuesVisible : false,
1243   - orthoAxisOriginIsZero : false,
1244   - titleAlign : 'center',
1245   - titleFont: 'bold 14px sans-serif',
1246   - baseAxisTitleFont : '12px sans-serif',
1247   - orthoAxisTitleFont : '12px sans-serif',
1248   - titlePosition: "top",
1249   - orientation : 'vertical',
1250   - baseAxisTicks : true,
1251   - stacked : false,
1252   - animate : true,
1253   - hoverable : false,
1254   - axisGrid : true,
1255   - contentMargins : 5,
1256   - axisOffset : 0.02,
1257   - panelSizeRatio : 0.8,
1258   - orthoAxisLabelSpacingMin : 2,
1259   - selectable : false,
1260   - extensionPoints : {
1261   - continuousAxisTicks_strokeStyle : 'gray',
1262   - axisGrid_strokeStyle : 'lightgray',
1263   - xAxisLabel_textStyle : 'black',
1264   - label_textBaseline : "bottom",
1265   - xAxisLabel_font : 'normal 10px sans-serif'
1266   - }
  1137 + configDefault : function(idjanela, dados, maior, cores, legendaY, legendaX) {
  1138 + var temp, config = {
  1139 + canvas : idjanela + "i3GEOgraficointerativo1guia4objCanvas",
  1140 + height : parseInt($i(idjanela + "_corpo").style.height, 10) - 80,
  1141 + orthoAxisTitle : legendaY,
  1142 + valuesFont : 'normal 9px sans-serif ',
  1143 + baseAxisTitle : legendaX,
  1144 + baseAxisTitleAlign : 'center',
  1145 + tooltipEnabled : true,
  1146 + tooltipArrowVisible : true,
  1147 + tooltipFade : false,
  1148 + tooltipFollowMouse : false,
  1149 + tooltipFormat : function(scene) {
  1150 + var cat = this.scene.datum.atoms['category'].value, val = this.scene.datum.atoms['value'].value;
  1151 + return "<span style=color:yellow >" + cat + "</span><br>" + format("#.###,", val);
  1152 + },
  1153 + baseAxisTitleFont : '9px sans-serif',
  1154 + yAxisTickFormatter : function(valor) {
  1155 + valor = valor + "";
  1156 + valor = format("#.###,", valor);
  1157 + return valor;
  1158 + },
  1159 + valueFormat : function(valor) {
  1160 + valor = valor + "";
  1161 + valor = format("#.###,", valor);
  1162 + return valor;
  1163 + },
  1164 + valuesAnchor : 'top',
  1165 + valuesVisible : false,
  1166 + orthoAxisOriginIsZero : false,
  1167 + titleAlign : 'center',
  1168 + titleFont : 'bold 14px sans-serif',
  1169 + baseAxisTitleFont : '12px sans-serif',
  1170 + orthoAxisTitleFont : '12px sans-serif',
  1171 + titlePosition : "top",
  1172 + orientation : 'vertical',
  1173 + baseAxisTicks : true,
  1174 + stacked : false,
  1175 + animate : true,
  1176 + hoverable : false,
  1177 + axisGrid : true,
  1178 + contentMargins : 5,
  1179 + axisOffset : 0.02,
  1180 + panelSizeRatio : 0.8,
  1181 + orthoAxisLabelSpacingMin : 2,
  1182 + selectable : false,
  1183 + extensionPoints : {
  1184 + continuousAxisTicks_strokeStyle : 'gray',
  1185 + axisGrid_strokeStyle : 'lightgray',
  1186 + xAxisLabel_textStyle : 'black',
  1187 + label_textBaseline : "bottom",
  1188 + xAxisLabel_font : 'normal 10px sans-serif'
  1189 + }
1267 1190 };
1268   - if(maior > 0){
  1191 + if (maior > 0) {
1269 1192 config.orthoAxisFixedMax = maior;
1270 1193 }
1271   - if($i("i3GEOgraficointerativo1Titulo").value != ""){
1272   - config.title = $i("i3GEOgraficointerativo1Titulo").value;
  1194 + if ($i(idjanela + "i3GEOgraficointerativo1Titulo").value != "") {
  1195 + config.title = $i(idjanela + "i3GEOgraficointerativo1Titulo").value;
1273 1196 }
1274   - if($i("i3GEOgraficointerativo1TituloX").value != ""){
1275   - config.baseAxisTitle = $i("i3GEOgraficointerativo1TituloX").value;
  1197 + if ($i(idjanela + "i3GEOgraficointerativo1TituloX").value != "") {
  1198 + config.baseAxisTitle = $i(idjanela + "i3GEOgraficointerativo1TituloX").value;
1276 1199 }
1277   - if($i("i3GEOgraficointerativo1TituloY").value != ""){
1278   - config.orthoAxisTitle = $i("i3GEOgraficointerativo1TituloY").value;
  1200 + if ($i(idjanela + "i3GEOgraficointerativo1TituloY").value != "") {
  1201 + config.orthoAxisTitle = $i(idjanela + "i3GEOgraficointerativo1TituloY").value;
1279 1202 }
1280   - temp = $i("i3GEOgraficointerativo1FatorTamanho");
1281   - if(temp && temp.value > 0){
  1203 + temp = $i(idjanela + "i3GEOgraficointerativo1FatorTamanho");
  1204 + if (temp && temp.value > 0) {
1282 1205 config.width = dados.resultset.length * temp.value;
1283   - }
1284   - else{
1285   - config.width = parseInt($i("i3GEOF.graficointerativo1").style.width,10) - 20;
  1206 + } else {
  1207 + config.width = parseInt($i(idjanela).style.width, 10) - 20;
1286 1208 }
1287 1209 return config;
1288 1210 },
1289   - barras : function(dados, maior, cores, legendaY, legendaX, xInclinado, tipo) {
1290   - var ct = true,
1291   - sr = false,
1292   - config = i3GEOF.graficointerativo1.configDefault(dados, maior, cores,legendaY, legendaX);
  1211 + barras : function(idjanela, dados, maior, cores, legendaY, legendaX, xInclinado, tipo) {
  1212 + var ct = true, sr = false, config = i3GEOF.graficointerativo1.configDefault(idjanela, dados, maior, cores, legendaY, legendaX);
1293 1213 if (tipo === "horizontal") {
1294 1214 config.orientation = 'horizontal';
1295 1215 }
... ... @@ -1298,15 +1218,14 @@ i3GEOF.graficointerativo1 = {
1298 1218 config.extensionPoints.xAxisLabel_textBaseline = 'top';
1299 1219 config.extensionPoints.xAxisLabel_textAlign = 'right';
1300 1220 }
1301   - if(dados.resultset[0].length > 2){
1302   - config.stacked = $i("i3GEOFgraficointerativo1ativaStacked").checked;
  1221 + if (dados.resultset[0].length > 2) {
  1222 + config.stacked = $i(idjanela + "i3GEOFgraficointerativo1ativaStacked").checked;
1303 1223 config.legend = true;
1304 1224 ct = true;
1305   - sr = $i("i3GEOFgraficointerativo1ativaRowsInColumns").checked;
  1225 + sr = $i(idjanela + "i3GEOFgraficointerativo1ativaRowsInColumns").checked;
1306 1226 config.colors = cores;
1307   - }
1308   - else{
1309   - if(cores != ""){
  1227 + } else {
  1228 + if (cores != "") {
1310 1229 config.extensionPoints.bar_fillStyle = function(d) {
1311 1230 return cores[this.index];
1312 1231 };
... ... @@ -1314,15 +1233,12 @@ i3GEOF.graficointerativo1 = {
1314 1233 }
1315 1234 new pvc.BarChart(config).setData(dados, {
1316 1235 crosstabMode : ct,
1317   - seriesInRows: sr
  1236 + seriesInRows : sr
1318 1237 }).render();
1319   - i3GEOF.graficointerativo1.aguarde.visibility = "hidden";
  1238 + i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "hidden";
1320 1239 },
1321   - linhas : function(dados, maior, cores, legendaY, legendaX, xInclinado, tipo) {
1322   - var ct = false,
1323   - sr = false,
1324   - config = i3GEOF.graficointerativo1.configDefault(dados, maior, cores,
1325   - legendaY, legendaX);
  1240 + linhas : function(idjanela, dados, maior, cores, legendaY, legendaX, xInclinado, tipo) {
  1241 + var ct = false, sr = false, config = i3GEOF.graficointerativo1.configDefault(idjanela, dados, maior, cores, legendaY, legendaX);
1326 1242 if (xInclinado == true) {
1327 1243 config.extensionPoints.xAxisLabel_textAngle = -Math.PI / 3;
1328 1244 config.extensionPoints.xAxisLabel_textBaseline = 'top';
... ... @@ -1330,24 +1246,21 @@ i3GEOF.graficointerativo1 = {
1330 1246 }
1331 1247 config.dotsVisible = true;
1332 1248  
1333   - if(dados.resultset[0].length > 2){
1334   - config.stacked = $i("i3GEOFgraficointerativo1ativaStacked").checked;
  1249 + if (dados.resultset[0].length > 2) {
  1250 + config.stacked = $i(idjanela + "i3GEOFgraficointerativo1ativaStacked").checked;
1335 1251 config.legend = true;
1336 1252 ct = true;
1337   - sr = $i("i3GEOFgraficointerativo1ativaRowsInColumns").checked;
  1253 + sr = $i(idjanela + "i3GEOFgraficointerativo1ativaRowsInColumns").checked;
1338 1254 config.colors = cores;
1339 1255 }
1340 1256 new pvc.LineChart(config).setData(dados, {
1341 1257 crosstabMode : ct,
1342   - seriesInRows: sr
  1258 + seriesInRows : sr
1343 1259 }).render();
1344   - i3GEOF.graficointerativo1.aguarde.visibility = "hidden";
  1260 + i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "hidden";
1345 1261 },
1346   - areas : function(dados, maior, cores, legendaY, legendaX, xInclinado, tipo) {
1347   - var ct = false,
1348   - sr = false,
1349   - config = i3GEOF.graficointerativo1.configDefault(dados, maior, cores,
1350   - legendaY, legendaX);
  1262 + areas : function(idjanela, dados, maior, cores, legendaY, legendaX, xInclinado, tipo) {
  1263 + var ct = false, sr = false, config = i3GEOF.graficointerativo1.configDefault(idjanela, dados, maior, cores, legendaY, legendaX);
1351 1264 if (xInclinado == true) {
1352 1265 config.extensionPoints.xAxisLabel_textAngle = -Math.PI / 3;
1353 1266 config.extensionPoints.xAxisLabel_textBaseline = 'top';
... ... @@ -1356,107 +1269,102 @@ i3GEOF.graficointerativo1 = {
1356 1269 config.dotsVisible = true;
1357 1270 config.areasVisible = true;
1358 1271  
1359   - if(dados.resultset[0].length > 2){
1360   - config.stacked = $i("i3GEOFgraficointerativo1ativaStacked").checked;
  1272 + if (dados.resultset[0].length > 2) {
  1273 + config.stacked = $i(idjanela + "i3GEOFgraficointerativo1ativaStacked").checked;
1361 1274 config.legend = true;
1362 1275 ct = true;
1363   - sr = $i("i3GEOFgraficointerativo1ativaRowsInColumns").checked;
  1276 + sr = $i(idjanela + "i3GEOFgraficointerativo1ativaRowsInColumns").checked;
1364 1277 config.colors = cores;
1365 1278 }
1366 1279 new pvc.LineChart(config).setData(dados, {
1367 1280 crosstabMode : ct,
1368   - seriesInRows: sr
  1281 + seriesInRows : sr
1369 1282 }).render();
1370   - i3GEOF.graficointerativo1.aguarde.visibility = "hidden";
  1283 + i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "hidden";
1371 1284 },
1372   - arvores : function(dados, maior, cores, legendaY, legendaX, tipo) {
  1285 + arvores : function(idjanela, dados, maior, cores, legendaY, legendaX, tipo) {
1373 1286  
1374 1287 config = {
1375   - canvas : "i3GEOgraficointerativo1guia4objCanvas",
1376   - title : legendaY,
1377   - titleFont : 'italic 14px sans-serif',
1378   - selectable : true,
1379   - hoverable : true,
1380   - legend : false,
1381   - tooltipEnabled : true,
1382   - legendPosition : 'right',
1383   - rootCategoryLabel : legendaX,
1384   - tooltipFormat : function(scene) {
1385   - var cat = this.scene.datum.atoms['category'].value, val = this.scene.datum.atoms.size.value;
1386   - return "<span style=color:yellow >" + cat + "</span><br>"
1387   - + format("#.###,", val);
1388   - }
  1288 + canvas : idjanela + "i3GEOgraficointerativo1guia4objCanvas",
  1289 + title : legendaY,
  1290 + titleFont : 'italic 14px sans-serif',
  1291 + selectable : true,
  1292 + hoverable : true,
  1293 + legend : false,
  1294 + tooltipEnabled : true,
  1295 + legendPosition : 'right',
  1296 + rootCategoryLabel : legendaX,
  1297 + tooltipFormat : function(scene) {
  1298 + var cat = this.scene.datum.atoms['category'].value, val = this.scene.datum.atoms.size.value;
  1299 + return "<span style=color:yellow >" + cat + "</span><br>" + format("#.###,", val);
  1300 + }
1389 1301 };
1390   - if(cores != ""){
  1302 + if (cores != "") {
1391 1303 config.colors = cores;
1392 1304 }
1393 1305 new pvc.TreemapChart(config).setData(dados, {
1394 1306 crosstabMode : false
1395 1307 }).render();
1396   - i3GEOF.graficointerativo1.aguarde.visibility = "hidden";
  1308 + i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "hidden";
1397 1309 },
1398   - pizzas : function(dados, maior, cores, legendaY, legendaX, tipo) {
1399   - config = i3GEOF.graficointerativo1.configDefault(dados, maior, cores,
1400   - legendaY, legendaX);
  1310 + pizzas : function(idjanela, dados, maior, cores, legendaY, legendaX, tipo) {
  1311 + config = i3GEOF.graficointerativo1.configDefault(idjanela, dados, maior, cores, legendaY, legendaX);
1401 1312 var config = {
1402   - canvas : "i3GEOgraficointerativo1guia4objCanvas",
1403   - animate : true,
1404   - selectable : true,
1405   - hoverable : true,
1406   - valuesVisible : true,
1407   - valuesLabelStyle : 'inside',
1408   - valuesMask : "{category}",
1409   - tooltipFormat : function(scene) {
1410   - var cat = this.scene.datum.atoms['category'].value, val = this.scene.datum.atoms['value'].value;
1411   - return "<span style=color:yellow >" + cat + "</span><br>"
1412   - + format("#.###,", val);
1413   - },
1414   - extensionPoints : {
1415   - slice_strokeStyle : 'white'
1416   - }
  1313 + canvas : idjanela + "i3GEOgraficointerativo1guia4objCanvas",
  1314 + animate : true,
  1315 + selectable : true,
  1316 + hoverable : true,
  1317 + valuesVisible : true,
  1318 + valuesLabelStyle : 'inside',
  1319 + valuesMask : "{category}",
  1320 + tooltipFormat : function(scene) {
  1321 + var cat = this.scene.datum.atoms['category'].value, val = this.scene.datum.atoms['value'].value;
  1322 + return "<span style=color:yellow >" + cat + "</span><br>" + format("#.###,", val);
  1323 + },
  1324 + extensionPoints : {
  1325 + slice_strokeStyle : 'white'
  1326 + }
1417 1327 };
1418   - if(cores != ""){
  1328 + if (cores != "") {
1419 1329 config.colors = cores;
1420 1330 }
1421 1331 new pvc.PieChart(config).setData(dados, {
1422 1332 crosstabMode : false
1423 1333 }).render();
1424   - i3GEOF.graficointerativo1.aguarde.visibility = "hidden";
  1334 + i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "hidden";
1425 1335 },
1426   - pontos: function(dados, maior, cores, legendaY, legendaX, tipo) {
1427   - config = i3GEOF.graficointerativo1.configDefault(dados, maior, cores,
1428   - legendaY, legendaX);
  1336 + pontos : function(idjanela, dados, maior, cores, legendaY, legendaX, tipo) {
  1337 + config = i3GEOF.graficointerativo1.configDefault(idjanela, dados, maior, cores, legendaY, legendaX);
1429 1338 var config = {
1430   - canvas : "i3GEOgraficointerativo1guia4objCanvas",
1431   - animate : true,
1432   - selectable : true,
1433   - hoverable : true,
1434   - valuesVisible : false,
1435   - orthoAxisTitle : legendaY,
1436   - valuesFont : 'normal 9px sans-serif ',
1437   - baseAxisTitle : legendaX,
1438   - yAxisTickFormatter : function(valor) {
1439   - valor = valor + "";
1440   - valor = format("#.###,", valor);
1441   - return valor;
1442   - },
1443   - valueFormat : function(valor) {
1444   - valor = valor + "";
1445   - valor = format("#.###,", valor);
1446   - return valor;
1447   - },
1448   - tooltipFormat : function(scene) {
1449   - var cat = this.scene.datum.atoms['category'].value, val = this.scene.datum.atoms['value'].value;
1450   - return "<span style=color:yellow >X: " + cat + "</span><br>Y: "
1451   - + format("#.###,", val);
1452   - }
  1339 + canvas : idjanela + "i3GEOgraficointerativo1guia4objCanvas",
  1340 + animate : true,
  1341 + selectable : true,
  1342 + hoverable : true,
  1343 + valuesVisible : false,
  1344 + orthoAxisTitle : legendaY,
  1345 + valuesFont : 'normal 9px sans-serif ',
  1346 + baseAxisTitle : legendaX,
  1347 + yAxisTickFormatter : function(valor) {
  1348 + valor = valor + "";
  1349 + valor = format("#.###,", valor);
  1350 + return valor;
  1351 + },
  1352 + valueFormat : function(valor) {
  1353 + valor = valor + "";
  1354 + valor = format("#.###,", valor);
  1355 + return valor;
  1356 + },
  1357 + tooltipFormat : function(scene) {
  1358 + var cat = this.scene.datum.atoms['category'].value, val = this.scene.datum.atoms['value'].value;
  1359 + return "<span style=color:yellow >X: " + cat + "</span><br>Y: " + format("#.###,", val);
  1360 + }
1453 1361 };
1454   - if(cores != ""){
  1362 + if (cores != "") {
1455 1363 config.colors = cores;
1456 1364 }
1457 1365 new pvc.DotChart(config).setData(dados, {
1458 1366 crosstabMode : false
1459 1367 }).render();
1460   - i3GEOF.graficointerativo1.aguarde.visibility = "hidden";
  1368 + i3GEOF.graficointerativo1.propJanelas[idjanela].aguarde.visibility = "hidden";
1461 1369 }
1462   -};
  1370 + };
... ...
ferramentas/tabela/index.js
1   -if(typeof(i3GEOF) === 'undefined'){
  1 +if (typeof (i3GEOF) === 'undefined') {
2 2 var i3GEOF = {};
3 3 }
4 4 /*
5   -Classe: i3GEOF.tabela
  5 + * Classe: i3GEOF.tabela
6 6 */
7   -i3GEOF.tabela = {
  7 +i3GEOF.tabela =
  8 + {
8 9 /**
9 10 * Array com os ids das janelas ja criadas
10 11 */
11   - janelas: [],
12   - propJanelas: {},
  12 + janelas : [],
  13 + propJanelas : {},
13 14 /*
14   - Para efeitos de compatibilidade antes da vers&atilde;o 4.7 que n&atilde;o tinha dicion&aacute;rio
  15 + * Para efeitos de compatibilidade antes da vers&atilde;o 4.7 que n&atilde;o tinha dicion&aacute;rio
15 16 */
16   - criaJanelaFlutuante: function(){
  17 + criaJanelaFlutuante : function() {
17 18 i3GEOF.tabela.iniciaDicionario();
18 19 },
19 20 /*
20   - Function: iniciaDicionario
21   -
22   - Carrega o dicion&aacute;rio e chama a fun&ccedil;&atilde;o que inicia a ferramenta
23   -
24   - O Javascript &eacute; carregado com o id i3GEOF.nomedaferramenta.dicionario_script
  21 + * Function: iniciaDicionario
  22 + *
  23 + * Carrega o dicion&aacute;rio e chama a fun&ccedil;&atilde;o que inicia a ferramenta
  24 + *
  25 + * O Javascript &eacute; carregado com o id i3GEOF.nomedaferramenta.dicionario_script
25 26 */
26   - iniciaDicionario: function(){
27   - if(typeof(i3GEOF.tabela.dicionario) === 'undefined'){
  27 + iniciaDicionario : function() {
  28 + if (typeof (i3GEOF.tabela.dicionario) === 'undefined') {
28 29 i3GEO.util.scriptTag(
29   - i3GEO.configura.locaplic+"/ferramentas/tabela/dicionario.js",
30   - "i3GEOF.tabela.iniciaJanelaFlutuante()",
31   - "i3GEOF.tabela.dicionario_script"
32   - );
33   - }
34   - else{
  30 + i3GEO.configura.locaplic + "/ferramentas/tabela/dicionario.js",
  31 + "i3GEOF.tabela.iniciaJanelaFlutuante()",
  32 + "i3GEOF.tabela.dicionario_script");
  33 + } else {
35 34 i3GEOF.tabela.iniciaJanelaFlutuante();
36 35 }
37 36 },
38 37 /*
39   - Function: inicia
40   -
41   - Inicia a ferramenta. &Eacute; chamado por criaJanelaFlutuante
42   -
43   - Parametro:
44   -
45   - iddiv {String} - id do div que receber&aacute; o conteudo HTML da ferramenta
  38 + * Function: inicia
  39 + *
  40 + * Inicia a ferramenta. &Eacute; chamado por criaJanelaFlutuante
  41 + *
  42 + * Parametro:
  43 + *
  44 + * iddiv {String} - id do div que receber&aacute; o conteudo HTML da ferramenta
46 45 */
47   - inicia: function(iddiv,idjanela){
48   - var onButtonClick = function (p_sType, p_aArgs, botao) {
  46 + inicia : function(iddiv, idjanela) {
  47 + var onButtonClick = function(p_sType, p_aArgs, botao) {
49 48 var oMenuItem = p_aArgs[1];
50 49 if (oMenuItem) {
51   - if(oMenuItem.value != ""){
  50 + if (oMenuItem.value != "") {
52 51 i3GEO.mapa.ativaTema(oMenuItem.value);
53   - botao.set("label", "<span class='cabecalhoTemas' >" + oMenuItem.cfg.getProperty("text") + "</span>&nbsp;&nbsp;");
  52 + botao.set(
  53 + "label",
  54 + "<span class='cabecalhoTemas' >" + oMenuItem.cfg.getProperty("text") + "</span>&nbsp;&nbsp;");
54 55 i3GEOF.tabela.propJanelas[idjanela].tema = oMenuItem.value;
55   - $i(idjanela+"_corpo").innerHTML = "";
56   - i3GEOF.tabela.inicia(iddiv,idjanela);
  56 + $i(idjanela + "_corpo").innerHTML = "";
  57 + i3GEOF.tabela.inicia(
  58 + iddiv,
  59 + idjanela);
57 60 }
58 61 }
59 62 };
60   - i3GEO.janela.comboCabecalhoTemas(idjanela+"i3GEOFtabelaComboCabeca",idjanela+"i3GEOFtabelaComboCabecaSel","tabela","ligadosComTabela",onButtonClick);
61   - if(i3GEOF.tabela.propJanelas[idjanela].tema === ""){
62   - $i(iddiv).innerHTML = "";//'<p style="position: relative; top: 0px; font-size: 15px; text-align: left;">'+$trad("x33")+'</p>';
  63 + i3GEO.janela.comboCabecalhoTemas(
  64 + idjanela + "i3GEOFtabelaComboCabeca",
  65 + idjanela + "i3GEOFtabelaComboCabecaSel",
  66 + "tabela",
  67 + "ligadosComTabela",
  68 + onButtonClick);
  69 + if (i3GEOF.tabela.propJanelas[idjanela].tema === "") {
  70 + $i(iddiv).innerHTML = "";// '<p style="position: relative;
  71 + // top: 0px; font-size: 15px;
  72 + // text-align:
  73 + // left;">'+$trad("x33")+'</p>';
63 74 return;
64 75 }
65   - try{
  76 + try {
66 77 $i(iddiv).innerHTML = i3GEOF.tabela.html(idjanela);
67   - i3GEO.guias.mostraGuiaFerramenta(idjanela+"i3GEOtabelaguia1",idjanela+"i3GEOtabelaguia");
68   - //eventos das guias
69   - $i(idjanela+"i3GEOtabelaguia6").onclick = function(){
70   - i3GEO.guias.mostraGuiaFerramenta(idjanela+"i3GEOtabelaguia6",idjanela+"i3GEOtabelaguia");
  78 + i3GEO.guias.mostraGuiaFerramenta(
  79 + idjanela + "i3GEOtabelaguia1",
  80 + idjanela + "i3GEOtabelaguia");
  81 + // eventos das guias
  82 + $i(idjanela + "i3GEOtabelaguia6").onclick = function() {
  83 + i3GEO.guias.mostraGuiaFerramenta(
  84 + idjanela + "i3GEOtabelaguia6",
  85 + idjanela + "i3GEOtabelaguia");
71 86 };
72   - $i(idjanela+"i3GEOtabelaguia1").onclick = function(){
73   - i3GEO.guias.mostraGuiaFerramenta(idjanela+"i3GEOtabelaguia1",idjanela+"i3GEOtabelaguia");
  87 + $i(idjanela + "i3GEOtabelaguia1").onclick = function() {
  88 + i3GEO.guias.mostraGuiaFerramenta(
  89 + idjanela + "i3GEOtabelaguia1",
  90 + idjanela + "i3GEOtabelaguia");
74 91 };
75   - $i(idjanela+"i3GEOtabelaguia3").onclick = function(){
76   - i3GEO.guias.mostraGuiaFerramenta(idjanela+"i3GEOtabelaguia3",idjanela+"i3GEOtabelaguia");
77   - if(!$i(idjanela+"i3GEOtabelaComboItensGuia3")){
  92 + $i(idjanela + "i3GEOtabelaguia3").onclick = function() {
  93 + i3GEO.guias.mostraGuiaFerramenta(
  94 + idjanela + "i3GEOtabelaguia3",
  95 + idjanela + "i3GEOtabelaguia");
  96 + if (!$i(idjanela + "i3GEOtabelaComboItensGuia3")) {
78 97 i3GEOF.tabela.comboItensEstat(idjanela);
79 98 }
80 99 };
81   - //relatorio
82   - $i(idjanela+"i3GEOtabelaguia5").onclick = function(){
83   - i3GEO.guias.mostraGuiaFerramenta(idjanela+"i3GEOtabelaguia5",idjanela+"i3GEOtabelaguia");
  100 + // relatorio
  101 + $i(idjanela + "i3GEOtabelaguia5").onclick = function() {
  102 + i3GEO.guias.mostraGuiaFerramenta(
  103 + idjanela + "i3GEOtabelaguia5",
  104 + idjanela + "i3GEOtabelaguia");
84 105 i3GEO.util.checkItensEditaveis(
85   - i3GEOF.tabela.propJanelas[idjanela].tema,
86   - function(retorno){
87   - if (retorno.tipo === "dados"){
88   - $i(idjanela+"i3GEOtabelaitensrelatorio").innerHTML = retorno.dados;
89   - }
90   - },
91   - idjanela+"i3GEOtabelaitensrelatorio",
92   - "320px",
93   - "",
94   - "sim"
95   - );
  106 + i3GEOF.tabela.propJanelas[idjanela].tema,
  107 + function(retorno) {
  108 + if (retorno.tipo === "dados") {
  109 + $i(idjanela + "i3GEOtabelaitensrelatorio").innerHTML = retorno.dados;
  110 + }
  111 + },
  112 + idjanela + "i3GEOtabelaitensrelatorio",
  113 + "320px",
  114 + "",
  115 + "sim");
96 116 i3GEO.util.comboItens(
97   - idjanela+"i3GEOtabelaagrupaItem",
98   - i3GEOF.tabela.propJanelas[idjanela].tema,
99   - function(retorno){
100   - if(retorno.tipo === "erro"){
101   - $i(idjanela+"i3GEOtabelaagrupamento").innerHTML = "<br><br><span style='color:red'>"+$trad(2,i3GEOF.tabela.dicionario)+"</span><br><br>";
102   - }
103   - else{
104   - $i(idjanela+"i3GEOtabelaagrupamento").innerHTML = retorno.dados;
105   - }
106   - },
107   - idjanela+"i3GEOtabelaagrupamento",
108   - ""
109   - );
  117 + idjanela + "i3GEOtabelaagrupaItem",
  118 + i3GEOF.tabela.propJanelas[idjanela].tema,
  119 + function(retorno) {
  120 + if (retorno.tipo === "erro") {
  121 + $i(idjanela + "i3GEOtabelaagrupamento").innerHTML = "<br><br><span style='color:red'>" + $trad(
  122 + 2,
  123 + i3GEOF.tabela.dicionario) + "</span><br><br>";
  124 + } else {
  125 + $i(idjanela + "i3GEOtabelaagrupamento").innerHTML = retorno.dados;
  126 + }
  127 + },
  128 + idjanela + "i3GEOtabelaagrupamento",
  129 + "");
110 130 };
111 131 new YAHOO.widget.Button(
112   - idjanela+"i3GEOtabelabotao2",
113   - {onclick:{fn: function(){
114   - i3GEOF.tabela.ativaSelecao(idjanela);
115   - }}}
116   - );
  132 + idjanela + "i3GEOtabelabotao2",
  133 + {
  134 + onclick : {
  135 + fn : function() {
  136 + i3GEOF.tabela.ativaSelecao(idjanela);
  137 + }
  138 + }
  139 + });
117 140 new YAHOO.widget.Button(
118   - idjanela+"i3GEOtabelabotao3",
119   - {onclick:{fn: function(){
120   - i3GEOF.tabela.limpaSelecao(idjanela);
121   - }}}
122   - );
  141 + idjanela + "i3GEOtabelabotao3",
  142 + {
  143 + onclick : {
  144 + fn : function() {
  145 + i3GEOF.tabela.limpaSelecao(idjanela);
  146 + }
  147 + }
  148 + });
123 149 new YAHOO.widget.Button(
124   - idjanela+"i3GEOtabelabotao6",
125   - {onclick:{fn: function(){
126   - i3GEOF.tabela.criaNovoTema(idjanela);
127   - }}}
128   - );
  150 + idjanela + "i3GEOtabelabotao6",
  151 + {
  152 + onclick : {
  153 + fn : function() {
  154 + i3GEOF.tabela.criaNovoTema(idjanela);
  155 + }
  156 + }
  157 + });
129 158 new YAHOO.widget.Button(
130   - idjanela+"i3GEOtabelabotaoLista",
131   - {onclick:{fn: function(){
132   - i3GEOF.tabela.pegaRegistros(idjanela);
133   - }}}
134   - );
  159 + idjanela + "i3GEOtabelabotaoLista",
  160 + {
  161 + onclick : {
  162 + fn : function() {
  163 + i3GEOF.tabela.pegaRegistros(idjanela);
  164 + }
  165 + }
  166 + });
135 167 new YAHOO.widget.Button(
136   - idjanela+"i3GEOtabelaGraficoI",
137   - {onclick:{fn: function(){
138   - i3GEO.mapa.ativaTema(i3GEOF.tabela.propJanelas[idjanela].tema);
139   - i3GEO.analise.dialogo.graficoInterativo1();
  168 + idjanela + "i3GEOtabelaGraficoI",
  169 + {
  170 + onclick : {
  171 + fn : function() {
  172 + i3GEO.mapa.ativaTema(i3GEOF.tabela.propJanelas[idjanela].tema);
  173 + i3GEO.analise.dialogo.graficoInterativo1();
  174 + }
140 175 }
141   - }}
142   - );
143   - $i(idjanela+"i3GEOtabelabotaoLista-button").style.minHeight = "1em";
144   - $i(idjanela+"i3GEOtabelabotaoLista-button").style.padding = "0px 15px";
145   - $i(idjanela+"i3GEOtabelabotaoLista-button").style.lineHeight = "1.3";
146   - $i(idjanela+"i3GEOtabelabotaoLista").style.position = "relative";
147   - $i(idjanela+"i3GEOtabelabotaoLista").style.top = "2px";
  176 + });
  177 + $i(idjanela + "i3GEOtabelabotaoLista-button").style.minHeight = "1em";
  178 + $i(idjanela + "i3GEOtabelabotaoLista-button").style.padding = "0px 15px";
  179 + $i(idjanela + "i3GEOtabelabotaoLista-button").style.lineHeight = "1.3";
  180 + $i(idjanela + "i3GEOtabelabotaoLista").style.position = "relative";
  181 + $i(idjanela + "i3GEOtabelabotaoLista").style.top = "2px";
148 182  
149 183 new YAHOO.widget.Button(
150   - idjanela+"i3GEOtabelabotao4",
151   - {onclick:{fn: function(){
152   - i3GEOF.tabela.estatistica(idjanela);
153   - }}}
154   - );
  184 + idjanela + "i3GEOtabelabotao4",
  185 + {
  186 + onclick : {
  187 + fn : function() {
  188 + i3GEOF.tabela.estatistica(idjanela);
  189 + }
  190 + }
  191 + });
155 192  
156 193 new YAHOO.widget.Button(
157   - idjanela+"i3GEOtabelabotao7",
158   - {onclick:{fn: function(){
159   - i3GEOF.tabela.relatorioTabela(idjanela);
160   - }}}
161   - );
  194 + idjanela + "i3GEOtabelabotao7",
  195 + {
  196 + onclick : {
  197 + fn : function() {
  198 + i3GEOF.tabela.relatorioTabela(idjanela);
  199 + }
  200 + }
  201 + });
162 202 new YAHOO.widget.Button(
163   - idjanela+"i3GEOtabelabotao5",
164   - {onclick:{fn: function(){
165   - i3GEOF.tabela.relatorioTexto(idjanela);
166   - }}}
167   - );
  203 + idjanela + "i3GEOtabelabotao5",
  204 + {
  205 + onclick : {
  206 + fn : function() {
  207 + i3GEOF.tabela.relatorioTexto(idjanela);
  208 + }
  209 + }
  210 + });
168 211 new YAHOO.widget.Button(
169   - idjanela+"i3GEOtabelabotaoVinculos",
170   - {onclick:{fn: function(){
171   - i3GEOF.tabela.vinculos.iniciaJanelaFlutuante();
172   - }}}
173   - );
174   - i3GEO.util.mensagemAjuda(idjanela+"i3GEOtabelamen1",$i(idjanela+"i3GEOtabelamen1").innerHTML);
  212 + idjanela + "i3GEOtabelabotaoVinculos",
  213 + {
  214 + onclick : {
  215 + fn : function() {
  216 + i3GEOF.tabela.vinculos.iniciaJanelaFlutuante();
  217 + }
  218 + }
  219 + });
  220 + i3GEO.util.mensagemAjuda(
  221 + idjanela + "i3GEOtabelamen1",
  222 + $i(idjanela + "i3GEOtabelamen1").innerHTML);
175 223  
176   - if (i3GEO.parametros.r.toLowerCase() !== "sim"){
177   - $i(idjanela+"i3GEOtabelaguia4obj").innerHTML = $trad("x22");
  224 + if (i3GEO.parametros.r.toLowerCase() !== "sim") {
  225 + $i(idjanela + "i3GEOtabelaguia4obj").innerHTML = $trad("x22");
178 226 }
179 227 i3GEOF.tabela.pegaRegistros(idjanela);
  228 + } catch (erro) {
  229 + i3GEO.janela.tempoMsg(erro);
180 230 }
181   - catch(erro){i3GEO.janela.tempoMsg(erro);}
182 231 },
183 232 /*
184   - Function: html
185   -
186   - Gera o c&oacute;digo html para apresenta&ccedil;&atilde;o das op&ccedil;&otilde;es da ferramenta
187   -
188   - Retorno:
189   -
190   - String com o c&oacute;digo html
  233 + * Function: html
  234 + *
  235 + * Gera o c&oacute;digo html para apresenta&ccedil;&atilde;o das op&ccedil;&otilde;es da ferramenta
  236 + *
  237 + * Retorno:
  238 + *
  239 + * String com o c&oacute;digo html
191 240 */
192   - html:function(idjanela){
193   - var ins = '';//<p class="paragrafo" >
194   - ins += '<div id='+idjanela+'guiasYUI class="yui-navset" style="top:0px;cursor:pointer;left:0px;">';
  241 + html : function(idjanela) {
  242 + var ins = '';// <p class="paragrafo" >
  243 + ins += '<div id=' + idjanela + 'guiasYUI class="yui-navset" style="top:0px;cursor:pointer;left:0px;">';
195 244 ins += '<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;">';
196   - ins += ' <li><a ><em><div id="'+idjanela+'i3GEOtabelaguia6" style="text-align:center;left:0px;" ><img class="ticPropriedades2" style="height:14px" title="'+$trad("p13")+'" src="'+i3GEO.configura.locaplic+'/imagens/visual/default/branco.gif"></div></em></a></li>';
197   - ins += ' <li><a ><em><div id="'+idjanela+'i3GEOtabelaguia1" style="text-align:center;left:0px;" >'+$trad(3,i3GEOF.tabela.dicionario)+'</div></em></a></li>';
198   - ins += ' <li><a ><em><div id="'+idjanela+'i3GEOtabelaguia3" style="text-align:center;left:0px;" >'+$trad(4,i3GEOF.tabela.dicionario)+'</div></em></a></li>';
199   - ins += ' <li><a ><em><div id="'+idjanela+'i3GEOtabelaguia5" style="text-align:center;left:0px;" >'+$trad(5,i3GEOF.tabela.dicionario)+'</div></em></a></li>';
  245 + ins +=
  246 + ' <li><a ><em><div id="' + idjanela +
  247 + 'i3GEOtabelaguia6" style="text-align:center;left:0px;" ><img class="ticPropriedades2" style="height:14px" title="' +
  248 + $trad("p13") + '" src="' + i3GEO.configura.locaplic + '/imagens/visual/default/branco.gif"></div></em></a></li>';
  249 + ins += ' <li><a ><em><div id="' + idjanela + 'i3GEOtabelaguia1" style="text-align:center;left:0px;" >' + $trad(
  250 + 3,
  251 + i3GEOF.tabela.dicionario) + '</div></em></a></li>';
  252 + ins += ' <li><a ><em><div id="' + idjanela + 'i3GEOtabelaguia3" style="text-align:center;left:0px;" >' + $trad(
  253 + 4,
  254 + i3GEOF.tabela.dicionario) + '</div></em></a></li>';
  255 + ins += ' <li><a ><em><div id="' + idjanela + 'i3GEOtabelaguia5" style="text-align:center;left:0px;" >' + $trad(
  256 + 5,
  257 + i3GEOF.tabela.dicionario) + '</div></em></a></li>';
200 258 ins += '</ul>';
201 259 ins += '</div><br>';
202   - ins += ' <div id='+idjanela+'i3GEOtabelaresultadotab style="background-color:#F2F2F2;position:relative;top:5px;left:0px"></div>';
203   - //propriedades
204   - ins += ' <div id='+idjanela+'i3GEOtabelaguia6obj style="width:99%">';
  260 + ins +=
  261 + ' <div id=' + idjanela +
  262 + 'i3GEOtabelaresultadotab style="background-color:#F2F2F2;position:relative;top:5px;left:0px"></div>';
  263 + // propriedades
  264 + ins += ' <div id=' + idjanela + 'i3GEOtabelaguia6obj style="width:99%">';
205 265 ins += ' <table summary="" class=lista2 >';
206 266 ins += ' <tr>';
207   - ins += ' <td><input style="cursor:pointer;border:0px solid white;" onclick="i3GEOF.tabela.pegaRegistros(\''+idjanela+'\')" type=checkbox id='+idjanela+'i3GEOtabelatipolista /></td>';
208   - ins += ' <td>'+$trad(8,i3GEOF.tabela.dicionario)+'</td>';
  267 + ins +=
  268 + ' <td><input style="cursor:pointer;border:0px solid white;" onclick="i3GEOF.tabela.pegaRegistros(\'' + idjanela +
  269 + '\')" type=checkbox id=' + idjanela + 'i3GEOtabelatipolista /></td>';
  270 + ins += ' <td>' + $trad(
  271 + 8,
  272 + i3GEOF.tabela.dicionario) + '</td>';
209 273 ins += ' </tr>';
210 274 ins += ' <tr>';
211   - ins += ' <td><input style="cursor:pointer;border:0px solid white;" onclick="i3GEOF.tabela.pegaRegistros(\''+idjanela+'\')" type=checkbox id='+idjanela+'i3GEOtabelalegenda /></td>';
212   - ins += ' <td>'+$trad(9,i3GEOF.tabela.dicionario)+'</td>';
  275 + ins +=
  276 + ' <td><input style="cursor:pointer;border:0px solid white;" onclick="i3GEOF.tabela.pegaRegistros(\'' + idjanela +
  277 + '\')" type=checkbox id=' + idjanela + 'i3GEOtabelalegenda /></td>';
  278 + ins += ' <td>' + $trad(
  279 + 9,
  280 + i3GEOF.tabela.dicionario) + '</td>';
213 281 ins += ' </tr>';
214 282 ins += ' </table>';
215 283 ins += ' </div>';
216 284  
217   - ins += ' <div id='+idjanela+'i3GEOtabelaguia1obj style="width:99%">';
218   - ins += ' <div id='+idjanela+'i3GEOtabelacombot style="position:relative;top:5px;left:0px;display:none;">';
  285 + ins += ' <div id=' + idjanela + 'i3GEOtabelaguia1obj style="width:99%">';
  286 + ins += ' <div id=' + idjanela + 'i3GEOtabelacombot style="position:relative;top:5px;left:0px;display:none;">';
219 287 ins += ' </div>';
220   - ins += ' <input title="'+$trad(10,i3GEOF.tabela.dicionario)+'" id='+idjanela+'i3GEOtabelabotao2 size=25 type=button value="'+$trad(11,i3GEOF.tabela.dicionario)+'" />';
221   - ins += ' <input title="'+$trad(12,i3GEOF.tabela.dicionario)+'" id='+idjanela+'i3GEOtabelabotao3 size=25 type=button value="'+$trad(13,i3GEOF.tabela.dicionario)+'"/>';
222   - ins += ' <input title="'+$trad(14,i3GEOF.tabela.dicionario)+'" id='+idjanela+'i3GEOtabelabotao6 size=30 type=button value="'+$trad(15,i3GEOF.tabela.dicionario)+'"/>';
223   - ins += ' <input id='+idjanela+'i3GEOtabelaGraficoI type=button value="'+$trad(42,i3GEOF.tabela.dicionario)+'" />';
224   - ins += ' <input title="'+$trad(43,i3GEOF.tabela.dicionario)+'" id='+idjanela+'i3GEOtabelabotaoVinculos size=30 type=button value="'+$trad(44,i3GEOF.tabela.dicionario)+'"/>';
  288 + ins += ' <input title="' + $trad(
  289 + 10,
  290 + i3GEOF.tabela.dicionario) + '" id=' + idjanela + 'i3GEOtabelabotao2 size=25 type=button value="' + $trad(
  291 + 11,
  292 + i3GEOF.tabela.dicionario) + '" />';
  293 + ins += ' <input title="' + $trad(
  294 + 12,
  295 + i3GEOF.tabela.dicionario) + '" id=' + idjanela + 'i3GEOtabelabotao3 size=25 type=button value="' + $trad(
  296 + 13,
  297 + i3GEOF.tabela.dicionario) + '"/>';
  298 + ins += ' <input title="' + $trad(
  299 + 14,
  300 + i3GEOF.tabela.dicionario) + '" id=' + idjanela + 'i3GEOtabelabotao6 size=30 type=button value="' + $trad(
  301 + 15,
  302 + i3GEOF.tabela.dicionario) + '"/>';
  303 + ins += ' <input id=' + idjanela + 'i3GEOtabelaGraficoI type=button value="' + $trad(
  304 + 42,
  305 + i3GEOF.tabela.dicionario) + '" />';
  306 + ins += ' <input title="' + $trad(
  307 + 43,
  308 + i3GEOF.tabela.dicionario) + '" id=' + idjanela + 'i3GEOtabelabotaoVinculos size=30 type=button value="' + $trad(
  309 + 44,
  310 + i3GEOF.tabela.dicionario) + '"/>';
225 311  
226   - ins += ' <div id='+idjanela+'i3GEOtabelacontador style="background-color:rgb(240,240,240);width:100%;position:relative;top:15px;left:0px;text-align:left;height:25px;">';
227   - ins += ' '+$trad(16,i3GEOF.tabela.dicionario)+' <img style=cursor:pointer onclick="i3GEOF.tabela.menos(\''+idjanela+'\')" src="'+i3GEO.configura.locaplic+'/imagens/minus.gif" />';
228   - ins += $inputText("","",idjanela+"i3GEOtabelainicio","",5,"1");
229   - ins += ' '+$trad(17,i3GEOF.tabela.dicionario)+"&nbsp;";
230   - ins += ' <img style=cursor:pointer onclick="i3GEOF.tabela.mais(\''+idjanela+'\')" src="'+i3GEO.configura.locaplic+'/imagens/plus.gif" />';
231   - ins += $inputText("","",idjanela+"i3GEOtabelafim","",5,"20");
232   - ins += ' <img title="'+$trad(40,i3GEOF.tabela.dicionario)+'"style="cursor:pointer;position:relative;" onclick="i3GEOF.tabela.todos(\''+idjanela+'\')" src="'+i3GEO.configura.locaplic+'/imagens/dot.gif" />';
233   - ins += ' <input title="'+$trad(18,i3GEOF.tabela.dicionario)+'" id='+idjanela+'i3GEOtabelabotaoLista size=25 style="position:relative;" type=button value="'+$trad(19,i3GEOF.tabela.dicionario)+'"/>';
234   - //ins += ' <a href="#" onclick="i3GEOF.tabela.novaJanela()" >'+$trad(36,i3GEOF.tabela.dicionario)+'</a>';
  312 + ins +=
  313 + ' <div id=' +
  314 + idjanela +
  315 + 'i3GEOtabelacontador style="background-color:rgb(240,240,240);width:100%;position:relative;top:15px;left:0px;text-align:left;height:25px;">';
  316 + ins +=
  317 + ' ' + $trad(
  318 + 16,
  319 + i3GEOF.tabela.dicionario) + ' <img style=cursor:pointer onclick="i3GEOF.tabela.menos(\'' + idjanela + '\')" src="' +
  320 + i3GEO.configura.locaplic + '/imagens/minus.gif" />';
  321 + ins += $inputText(
  322 + "",
  323 + "",
  324 + idjanela + "i3GEOtabelainicio",
  325 + "",
  326 + 5,
  327 + "1");
  328 + ins += ' ' + $trad(
  329 + 17,
  330 + i3GEOF.tabela.dicionario) + "&nbsp;";
  331 + ins +=
  332 + ' <img style=cursor:pointer onclick="i3GEOF.tabela.mais(\'' + idjanela + '\')" src="' + i3GEO.configura.locaplic +
  333 + '/imagens/plus.gif" />';
  334 + ins += $inputText(
  335 + "",
  336 + "",
  337 + idjanela + "i3GEOtabelafim",
  338 + "",
  339 + 5,
  340 + "20");
  341 + ins +=
  342 + ' <img title="' + $trad(
  343 + 40,
  344 + i3GEOF.tabela.dicionario) + '"style="cursor:pointer;position:relative;" onclick="i3GEOF.tabela.todos(\'' + idjanela +
  345 + '\')" src="' + i3GEO.configura.locaplic + '/imagens/dot.gif" />';
  346 + ins +=
  347 + ' <input title="' + $trad(
  348 + 18,
  349 + i3GEOF.tabela.dicionario) + '" id=' + idjanela +
  350 + 'i3GEOtabelabotaoLista size=25 style="position:relative;" type=button value="' + $trad(
  351 + 19,
  352 + i3GEOF.tabela.dicionario) + '"/>';
  353 + // ins += ' <a href="#" onclick="i3GEOF.tabela.novaJanela()"
  354 + // >'+$trad(36,i3GEOF.tabela.dicionario)+'</a>';
235 355 ins += ' </div>';
236   - ins += ' <div id='+idjanela+'i3GEOtabelaregistros style="position:relative;top:20px;left:0px;text-align:left;">';
  356 + ins += ' <div id=' + idjanela + 'i3GEOtabelaregistros style="position:relative;top:20px;left:0px;text-align:left;">';
237 357 ins += ' </div>';
238 358 ins += ' </div>';
239 359  
240   - ins += ' <div id='+idjanela+'i3GEOtabelaguia3obj style="display:none;width:99%;left:0px" >';
241   - ins += ' <p class="paragrafo" ><label>'+$trad(20,i3GEOF.tabela.dicionario)+':</label> <span id='+idjanela+'i3GEOtabelaitensGuia3 ></span>';
242   - ins += ' <p class="paragrafo" ><label>'+$trad(21,i3GEOF.tabela.dicionario)+':</label>';
243   - ins += $inputText("","",idjanela+"i3GEOtabelafiltro1","",5,"");
244   - ins += ' <p class="paragrafo" ><input id='+idjanela+'i3GEOtabelabotao4 size=30 type=button value="'+$trad(22,i3GEOF.tabela.dicionario)+'"/>';
245   - ins += ' <div id="'+idjanela+'i3GEOtabelaoperacoes" style="font-size:12px;text-align:left;position:relative;top:15px;left:0px;" >';
  360 + ins += ' <div id=' + idjanela + 'i3GEOtabelaguia3obj style="display:none;width:99%;left:0px" >';
  361 + ins += ' <p class="paragrafo" ><label>' + $trad(
  362 + 20,
  363 + i3GEOF.tabela.dicionario) + ':</label> <span id=' + idjanela + 'i3GEOtabelaitensGuia3 ></span>';
  364 + ins += ' <p class="paragrafo" ><label>' + $trad(
  365 + 21,
  366 + i3GEOF.tabela.dicionario) + ':</label>';
  367 + ins += $inputText(
  368 + "",
  369 + "",
  370 + idjanela + "i3GEOtabelafiltro1",
  371 + "",
  372 + 5,
  373 + "");
  374 + ins += ' <p class="paragrafo" ><input id=' + idjanela + 'i3GEOtabelabotao4 size=30 type=button value="' + $trad(
  375 + 22,
  376 + i3GEOF.tabela.dicionario) + '"/>';
  377 + ins +=
  378 + ' <div id="' + idjanela +
  379 + 'i3GEOtabelaoperacoes" style="font-size:12px;text-align:left;position:relative;top:15px;left:0px;" >';
246 380 ins += ' </div><br>';
247   - ins += ' <div id='+idjanela+'i3GEOtabelamen1 style="position:relative;top:25px;left:0px;width:100%" >';
248   - ins += ' <p class="paragrafo" >'+$trad(23,i3GEOF.tabela.dicionario);
  381 + ins += ' <div id=' + idjanela + 'i3GEOtabelamen1 style="position:relative;top:25px;left:0px;width:100%" >';
  382 + ins += ' <p class="paragrafo" >' + $trad(
  383 + 23,
  384 + i3GEOF.tabela.dicionario);
249 385 ins += ' </div>';
250 386 ins += ' </div>';
251   - //relatorios
252   - ins += ' <div id='+idjanela+'i3GEOtabelaguia5obj style="width:99%;display:none">';
253   - ins += ' <p class="paragrafo" >'+$trad(24,i3GEOF.tabela.dicionario)+':';
254   - ins += ' <p class="paragrafo" ><div id='+idjanela+'i3GEOtabelaitensrelatorio class=digitar style="text-align:left;overflow:auto;height:100px">';
  387 + // relatorios
  388 + ins += ' <div id=' + idjanela + 'i3GEOtabelaguia5obj style="width:99%;display:none">';
  389 + ins += ' <p class="paragrafo" >' + $trad(
  390 + 24,
  391 + i3GEOF.tabela.dicionario) + ':';
  392 + ins +=
  393 + ' <p class="paragrafo" ><div id=' + idjanela +
  394 + 'i3GEOtabelaitensrelatorio class=digitar style="text-align:left;overflow:auto;height:100px">';
255 395 ins += ' </div><br>';
256   - ins += ' <p class="paragrafo" >'+$trad(25,i3GEOF.tabela.dicionario)+':';
257   - ins += ' <p class="paragrafo" ><div id='+idjanela+'i3GEOtabelaagrupamento style="text-align:left;">';
  396 + ins += ' <p class="paragrafo" >' + $trad(
  397 + 25,
  398 + i3GEOF.tabela.dicionario) + ':';
  399 + ins += ' <p class="paragrafo" ><div id=' + idjanela + 'i3GEOtabelaagrupamento style="text-align:left;">';
258 400 ins += ' </div>';
259   - ins += ' <p class="paragrafo" ><br><input style="cursor:pointer" type=checkbox id='+idjanela+'i3GEOtabelacalculaarea />'+$trad(26,i3GEOF.tabela.dicionario);
260   - ins += ' <p class="paragrafo" ><input style="cursor:pointer" type=checkbox id='+idjanela+'i3GEOtabelacalculaestat />'+$trad(27,i3GEOF.tabela.dicionario);
261   - ins += ' <p class="paragrafo" >'+$trad(28,i3GEOF.tabela.dicionario)+': ';
262   - ins += $inputText("","",idjanela+"i3GEOtabelaexcestat","",10,"");
263   - ins += ' <p class="paragrafo" ><input id='+idjanela+'i3GEOtabelabotao7 size=30 type=button value="'+$trad(5,i3GEOF.tabela.dicionario)+'"/>';
264   - ins += ' <input id='+idjanela+'i3GEOtabelabotao5 size=25 type=button value="'+$trad(29,i3GEOF.tabela.dicionario)+'"/>';
265   - ins += ' <form method=post style="display:none" id='+idjanela+'i3GEOtabelarelatorio action="'+i3GEO.configura.locaplic+'/ferramentas/tabela/relatorio.php" target="_blank" >';
266   - ins += ' <input type=hidden id='+idjanela+'i3GEOtabelaarearelh name=arearel value=nao />';
267   - ins += ' <input type=hidden id='+idjanela+'i3GEOtabelastatrelh name=statrel value=nao />';
268   - ins += ' <input type=hidden id='+idjanela+'i3GEOtabelatemarelh name=temarel value="" />';
269   - ins += ' <input type=hidden id='+idjanela+'i3GEOtabelag_sidh name=g_sid value="" />';
270   - ins += ' <input type=hidden id='+idjanela+'i3GEOtabelaitemagruparelh name=itemagruparel value="" />';
271   - ins += ' <input type=hidden id='+idjanela+'i3GEOtabelaitensrelh name=itensrel value="" />';
272   - ins += ' <input type=hidden id='+idjanela+'i3GEOtabelanomesrelh name=nomesrel value="" />';
273   - ins += ' <input type=hidden id='+idjanela+'i3GEOtabelaordemrel name=ordemrel value="" />';
274   - ins += ' <input type=hidden id='+idjanela+'i3GEOtabelaexcluirvalorh name=excluirvalor value="" />';
275   - ins += ' <input type=hidden id='+idjanela+'i3GEOtabelatiporelh name=tiporel value="" />';
  401 + ins +=
  402 + ' <p class="paragrafo" ><br><input style="cursor:pointer" type=checkbox id=' + idjanela + 'i3GEOtabelacalculaarea />' +
  403 + $trad(
  404 + 26,
  405 + i3GEOF.tabela.dicionario);
  406 + ins +=
  407 + ' <p class="paragrafo" ><input style="cursor:pointer" type=checkbox id=' + idjanela + 'i3GEOtabelacalculaestat />' +
  408 + $trad(
  409 + 27,
  410 + i3GEOF.tabela.dicionario);
  411 + ins += ' <p class="paragrafo" >' + $trad(
  412 + 28,
  413 + i3GEOF.tabela.dicionario) + ': ';
  414 + ins += $inputText(
  415 + "",
  416 + "",
  417 + idjanela + "i3GEOtabelaexcestat",
  418 + "",
  419 + 10,
  420 + "");
  421 + ins += ' <p class="paragrafo" ><input id=' + idjanela + 'i3GEOtabelabotao7 size=30 type=button value="' + $trad(
  422 + 5,
  423 + i3GEOF.tabela.dicionario) + '"/>';
  424 + ins += ' <input id=' + idjanela + 'i3GEOtabelabotao5 size=25 type=button value="' + $trad(
  425 + 29,
  426 + i3GEOF.tabela.dicionario) + '"/>';
  427 + ins +=
  428 + ' <form method=post style="display:none" id=' + idjanela + 'i3GEOtabelarelatorio action="' + i3GEO.configura.locaplic +
  429 + '/ferramentas/tabela/relatorio.php" target="_blank" >';
  430 + ins += ' <input type=hidden id=' + idjanela + 'i3GEOtabelaarearelh name=arearel value=nao />';
  431 + ins += ' <input type=hidden id=' + idjanela + 'i3GEOtabelastatrelh name=statrel value=nao />';
  432 + ins += ' <input type=hidden id=' + idjanela + 'i3GEOtabelatemarelh name=temarel value="" />';
  433 + ins += ' <input type=hidden id=' + idjanela + 'i3GEOtabelag_sidh name=g_sid value="" />';
  434 + ins += ' <input type=hidden id=' + idjanela + 'i3GEOtabelaitemagruparelh name=itemagruparel value="" />';
  435 + ins += ' <input type=hidden id=' + idjanela + 'i3GEOtabelaitensrelh name=itensrel value="" />';
  436 + ins += ' <input type=hidden id=' + idjanela + 'i3GEOtabelanomesrelh name=nomesrel value="" />';
  437 + ins += ' <input type=hidden id=' + idjanela + 'i3GEOtabelaordemrel name=ordemrel value="" />';
  438 + ins += ' <input type=hidden id=' + idjanela + 'i3GEOtabelaexcluirvalorh name=excluirvalor value="" />';
  439 + ins += ' <input type=hidden id=' + idjanela + 'i3GEOtabelatiporelh name=tiporel value="" />';
276 440 ins += ' </form>';
277 441 ins += ' </div>';
278 442 return ins;
279 443 },
280 444 /*
281   - Function: criaJanelaFlutuante
282   -
283   - Cria a janela flutuante para controle da ferramenta.
  445 + * Function: criaJanelaFlutuante
  446 + *
  447 + * Cria a janela flutuante para controle da ferramenta.
284 448 */
285   - iniciaJanelaFlutuante: function(){
286   - var minimiza,cabecalho,janela,divid,temp,titulo,
287   - id = "tabela"+parseInt(Math.random()*1000000,10);
288   - //i3GEO.janela.tempoMsg($trad(38,i3GEOF.tabela.dicionario));
  449 + iniciaJanelaFlutuante : function() {
  450 + var minimiza, cabecalho, janela, divid, temp, titulo, id = "tabela" + parseInt(
  451 + Math.random() * 1000000,
  452 + 10);
  453 + // i3GEO.janela.tempoMsg($trad(38,i3GEOF.tabela.dicionario));
289 454 i3GEOF.tabela.janelas.push(id);
290 455 i3GEOF.tabela.propJanelas[id] = {};
291   - i3GEOF.tabela.propJanelas[id].colunas = {"itens":[],"alias":[]};
  456 + i3GEOF.tabela.propJanelas[id].colunas = {
  457 + "itens" : [],
  458 + "alias" : []
  459 + };
292 460 i3GEOF.tabela.propJanelas[id].registros = [];
293 461 i3GEOF.tabela.propJanelas[id].tema = i3GEO.temaAtivo;
294 462 i3GEOF.tabela.propJanelas[id].atualiza = false;
295 463  
296   - cabecalho = function(){
  464 + cabecalho = function() {
297 465 i3GEOF.tabela.ativaFoco(id);
298 466 };
299   - minimiza = function(){
  467 + minimiza = function() {
300 468 i3GEO.janela.minimiza(id);
301 469 };
302   - duplica = function(){
  470 + duplica = function() {
303 471 i3GEOF.tabela.iniciaJanelaFlutuante();
304 472 };
305   - //cria a janela flutuante
306   - titulo = "<div id='"+id+"i3GEOFtabelaComboCabeca' class='comboTemasCabecalho'></div>&nbsp;&nbsp;&nbsp;"+$trad(1,i3GEOF.tabela.dicionario)+" <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=5&idajuda=39' >&nbsp;&nbsp;&nbsp;</a>";
  473 + // cria a janela flutuante
  474 + titulo =
  475 + "<div id='" + id + "i3GEOFtabelaComboCabeca' class='comboTemasCabecalho'></div>&nbsp;&nbsp;&nbsp;" + $trad(
  476 + 1,
  477 + i3GEOF.tabela.dicionario) + " <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic +
  478 + "/ajuda_usuario.php?idcategoria=5&idajuda=39' >&nbsp;&nbsp;&nbsp;</a>";
307 479 janela = i3GEO.janela.cria(
308   - "500px",
309   - "400px",
310   - "",
311   - "",
312   - "",
313   - titulo,
314   - id,
315   - false,
316   - "hd",
317   - cabecalho,
318   - minimiza,
319   - "",
320   - true,
321   - i3GEO.configura.locaplic+"/imagens/oxygen/16x16/view-form-table.png",
322   - duplica
323   - );
  480 + "500px",
  481 + "400px",
  482 + "",
  483 + "",
  484 + "",
  485 + titulo,
  486 + id,
  487 + false,
  488 + "hd",
  489 + cabecalho,
  490 + minimiza,
  491 + "",
  492 + true,
  493 + i3GEO.configura.locaplic + "/imagens/oxygen/16x16/view-form-table.png",
  494 + duplica);
324 495 divid = janela[2].id;
325   - if(i3GEOF.tabela.janelas.length > 1){
  496 + if (i3GEOF.tabela.janelas.length > 1) {
326 497 temp = janela[0].cfg.config;
327   - janela[0].moveTo(temp.x.value + (i3GEOF.tabela.janelas.length * 50),temp.y.value + (i3GEOF.tabela.janelas.length * 15));
  498 + janela[0].moveTo(
  499 + temp.x.value + (i3GEOF.tabela.janelas.length * 50),
  500 + temp.y.value + (i3GEOF.tabela.janelas.length * 15));
328 501 }
329   - $i(id+"_corpo").style.backgroundColor = "white";
330   - i3GEOF.tabela.propJanelas[id].aguarde = $i(id+"_imagemCabecalho").style;
  502 + $i(id + "_corpo").style.backgroundColor = "white";
  503 + i3GEOF.tabela.propJanelas[id].aguarde = $i(id + "_imagemCabecalho").style;
331 504 i3GEOF.tabela.propJanelas[id].atualiza = true;
332   - //indica se a janela sera atualizada na navegacao
333   - temp = 'i3GEOF.tabela.propJanelas["'+id+'"].atualiza = this.checked';
334   - janela[0].setFooter("<div style=background-color:#F2F2F2; ><input class='inputsb' style='cursor:pointer;position:relative;top:2px;' onclick='"+temp+"' type=checkbox />&nbsp;"+$trad(41,i3GEOF.tabela.dicionario)+" ("+id+")</div>");
335   -
  505 + // indica se a janela sera atualizada na navegacao
  506 + temp = 'i3GEOF.tabela.propJanelas["' + id + '"].atualiza = this.checked';
  507 + janela[0]
  508 + .setFooter("<div style=background-color:#F2F2F2; ><input class='inputsb' style='cursor:pointer;position:relative;top:2px;' onclick='" +
  509 + temp + "' type=checkbox />&nbsp;" + $trad(
  510 + 41,
  511 + i3GEOF.tabela.dicionario) + " (" + id + ")</div>");
336 512  
337   - i3GEOF.tabela.inicia(divid,id);
338   - //inicia os eventos
339   - if(i3GEO.Interface.ATUAL === "openlayers"){
340   - if(i3GEO.eventos.NAVEGAMAPA.toString().search('i3GEOF.tabela.atualizaListaDeRegistros()') < 0){
  513 + i3GEOF.tabela.inicia(
  514 + divid,
  515 + id);
  516 + // inicia os eventos
  517 + if (i3GEO.Interface.ATUAL === "openlayers") {
  518 + if (i3GEO.eventos.NAVEGAMAPA.toString().search(
  519 + 'i3GEOF.tabela.atualizaListaDeRegistros()') < 0) {
341 520 i3GEO.eventos.NAVEGAMAPA.push("i3GEOF.tabela.atualizaListaDeRegistros()");
342 521 }
343 522 }
344   - if(i3GEO.Interface.ATUAL === "googlemaps" && !tabelaDragend){
345   - tabelaDragend = google.maps.event.addListener(i3GeoMap, "dragend", function() {i3GEOF.tabela.atualizaListaDeRegistros();});
346   - tabelaZoomend = google.maps.event.addListener(i3GeoMap, "zoomend", function() {i3GEOF.tebela.atualizaListaDeRegistros();});
  523 + if (i3GEO.Interface.ATUAL === "googlemaps" && !tabelaDragend) {
  524 + tabelaDragend = google.maps.event.addListener(
  525 + i3GeoMap,
  526 + "dragend",
  527 + function() {
  528 + i3GEOF.tabela.atualizaListaDeRegistros();
  529 + });
  530 + tabelaZoomend = google.maps.event.addListener(
  531 + i3GeoMap,
  532 + "zoomend",
  533 + function() {
  534 + i3GEOF.tebela.atualizaListaDeRegistros();
  535 + });
347 536 }
348   - if(i3GEO.Interface.ATUAL === "googleearth" && !tabelaDragend){
349   - tabelaDragend = google.earth.addEventListener(i3GeoMap.getView(), "viewchangeend", function() {i3GEOF.tabela.atualizaListaDeRegistros();});
  537 + if (i3GEO.Interface.ATUAL === "googleearth" && !tabelaDragend) {
  538 + tabelaDragend = google.earth.addEventListener(
  539 + i3GeoMap.getView(),
  540 + "viewchangeend",
  541 + function() {
  542 + i3GEOF.tabela.atualizaListaDeRegistros();
  543 + });
350 544 }
351 545  
352   - temp = function(){
  546 + temp = function() {
353 547 i3GEOF.tabela.janelas.remove(id);
354 548 i3GEOF.tabela.propJanelas[id] = null;
355   - if(i3GEOF.tabela.janelas.length === 0){
356   - if(i3GEO.Interface.ATUAL === "openlayers"){
  549 + if (i3GEOF.tabela.janelas.length === 0) {
  550 + if (i3GEO.Interface.ATUAL === "openlayers") {
357 551 i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.tabela.atualizaListaDeRegistros()");
358 552 }
359   - if(i3GEO.Interface.ATUAL === "googlemaps"){
  553 + if (i3GEO.Interface.ATUAL === "googlemaps") {
360 554 google.maps.event.removeListener(tabelaDragend);
361 555 google.maps.event.removeListener(tabelaZoomend);
362 556 }
363   - if(i3GEO.Interface.ATUAL === "googleearth"){
  557 + if (i3GEO.Interface.ATUAL === "googleearth") {
364 558 google.earth.removeEventListener(tabelaDragend);
365 559 }
366 560 }
367 561 };
368   - YAHOO.util.Event.addListener(janela[0].close, "click", temp);
  562 + YAHOO.util.Event.addListener(
  563 + janela[0].close,
  564 + "click",
  565 + temp);
369 566 },
370   - atualizaCombosCabecalhos: function(){
371   - var i,id,
372   - n = i3GEOF.tabela.janelas.length;
373   - for(i=0;i<n;i++){
  567 + atualizaCombosCabecalhos : function() {
  568 + var i, id, n = i3GEOF.tabela.janelas.length;
  569 + for (i = 0; i < n; i++) {
374 570 id = i3GEOF.tabela.janelas[i];
375   - i3GEO.janela.comboCabecalhoTemas(id+"i3GEOFtabelaComboCabeca",id+"i3GEOFtabelaComboCabecaSel","tabela","ligadosComTabela");
  571 + i3GEO.janela.comboCabecalhoTemas(
  572 + id + "i3GEOFtabelaComboCabeca",
  573 + id + "i3GEOFtabelaComboCabecaSel",
  574 + "tabela",
  575 + "ligadosComTabela");
376 576 }
377 577 },
378 578 /*
379   - Function: ativaFoco
380   -
381   - Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado
  579 + * Function: ativaFoco
  580 + *
  581 + * Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado
382 582 */
383   - ativaFoco: function(id){
384   - if(i3GEOF.tabela.propJanelas[id].tema !== "" && i3GEO.arvoreDeCamadas.pegaTema(i3GEOF.tabela.propJanelas[id].tema) === ""){
385   - i3GEO.janela.tempoMsg($trad(30,i3GEOF.tabela.dicionario));
  583 + ativaFoco : function(id) {
  584 + if (i3GEOF.tabela.propJanelas[id].tema !== "" && i3GEO.arvoreDeCamadas.pegaTema(i3GEOF.tabela.propJanelas[id].tema) === "") {
  585 + i3GEO.janela.tempoMsg($trad(
  586 + 30,
  587 + i3GEOF.tabela.dicionario));
386 588 }
387   - var i = $i(id+"_c").style;
  589 + var i = $i(id + "_c").style;
388 590 i3GEO.janela.ULTIMOZINDEX++;
389 591 i.zIndex = 21000 + i3GEO.janela.ULTIMOZINDEX;
390 592 },
391   - vinculos:{
392   - ligacoes: [],
393   - iniciaJanelaFlutuante: function(){
394   - var janela,titulo;
395   - //cria a janela flutuante
396   - titulo = "&nbsp;&nbsp;&nbsp;"+$trad(44,i3GEOF.tabela.dicionario)+" <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=5&idajuda=120' >&nbsp;&nbsp;&nbsp;</a>";
  593 + vinculos : {
  594 + ligacoes : [],
  595 + iniciaJanelaFlutuante : function() {
  596 + var janela, titulo;
  597 + // cria a janela flutuante
  598 + titulo =
  599 + "&nbsp;&nbsp;&nbsp;" + $trad(
  600 + 44,
  601 + i3GEOF.tabela.dicionario) + " <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic +
  602 + "/ajuda_usuario.php?idcategoria=5&idajuda=120' >&nbsp;&nbsp;&nbsp;</a>";
397 603 janela = i3GEO.janela.cria(
398   - "300px",
399   - "300px",
400   - "",
401   - "",
402   - "",
403   - titulo,
404   - "i3GEOFtabelaVinculos",
405   - true,
406   - "hd",
407   - "",
408   - "",
409   - "",
410   - true,
411   - i3GEO.configura.locaplic+"/imagens/oxygen/16x16/edit-table-cell-merge.png"
412   - );
  604 + "300px",
  605 + "300px",
  606 + "",
  607 + "",
  608 + "",
  609 + titulo,
  610 + "i3GEOFtabelaVinculos",
  611 + true,
  612 + "hd",
  613 + "",
  614 + "",
  615 + "",
  616 + true,
  617 + i3GEO.configura.locaplic + "/imagens/oxygen/16x16/edit-table-cell-merge.png");
413 618 divid = janela[2].id;
414   - if(i3GEOF.tabela.janelas.length > 1){
  619 + if (i3GEOF.tabela.janelas.length > 1) {
415 620 temp = janela[0].cfg.config;
416   - janela[0].moveTo(temp.x.value + (i3GEOF.tabela.janelas.length * 50),temp.y.value + (i3GEOF.tabela.janelas.length * 15));
  621 + janela[0].moveTo(
  622 + temp.x.value + (i3GEOF.tabela.janelas.length * 50),
  623 + temp.y.value + (i3GEOF.tabela.janelas.length * 15));
417 624 }
418 625 $i("i3GEOFtabelaVinculos_corpo").style.backgroundColor = "white";
419 626 i3GEOF.tabela.vinculos.inicia();
420 627 },
421   - html: function(){
422   - var ins = "" +
423   - " <fieldset class=subbloco >" +
424   - " <p class=paragrafo >" + $trad(45,i3GEOF.tabela.dicionario) + "<br>" +
425   - i3GEOF.tabela.comboJanelas("i3GEOFTabelaOpcoesAdicionaVinculoT1","i3GEOF.tabela.vinculos.comboColunasT1()") +
426   - " <div id=i3GEOFTabelaVinculoT1Colunas style=position:relative;left:10px ></div>" +
427   - " <p class=paragrafo >" + $trad(46,i3GEOF.tabela.dicionario) + "<br>" +
428   - i3GEOF.tabela.comboJanelas("i3GEOFTabelaOpcoesAdicionaVinculoT2","i3GEOF.tabela.vinculos.comboColunasT2()") +
429   - " <div id=i3GEOFTabelaVinculoT2Colunas style=position:relative;left:10px ></div>" +
430   - " <p class=paragrafo ><input id=i3GEOFTabelaVinculoBotaoCriar size=25 type=button value='"+$trad(47,i3GEOF.tabela.dicionario)+"' /></p>" +
431   - " </fieldset>" +
432   - " <fieldset class=subbloco id=i3GEOFtabelaVinculosLista >" +
433   - " </fieldset>";
  628 + html : function() {
  629 + var ins =
  630 + "" + " <fieldset class=subbloco >" + " <p class=paragrafo >" + $trad(
  631 + 45,
  632 + i3GEOF.tabela.dicionario) + "<br>" + i3GEOF.tabela.comboJanelas(
  633 + "i3GEOFTabelaOpcoesAdicionaVinculoT1",
  634 + "i3GEOF.tabela.vinculos.comboColunasT1()") +
  635 + " <div id=i3GEOFTabelaVinculoT1Colunas style=position:relative;left:10px ></div>" + " <p class=paragrafo >" +
  636 + $trad(
  637 + 46,
  638 + i3GEOF.tabela.dicionario) + "<br>" + i3GEOF.tabela.comboJanelas(
  639 + "i3GEOFTabelaOpcoesAdicionaVinculoT2",
  640 + "i3GEOF.tabela.vinculos.comboColunasT2()") +
  641 + " <div id=i3GEOFTabelaVinculoT2Colunas style=position:relative;left:10px ></div>" +
  642 + " <p class=paragrafo ><input id=i3GEOFTabelaVinculoBotaoCriar size=25 type=button value='" + $trad(
  643 + 47,
  644 + i3GEOF.tabela.dicionario) + "' /></p>" + " </fieldset>" +
  645 + " <fieldset class=subbloco id=i3GEOFtabelaVinculosLista >" + " </fieldset>";
434 646 return ins;
435 647 },
436   - inicia: function(){
  648 + inicia : function() {
437 649 $i("i3GEOFtabelaVinculos_corpo").innerHTML = i3GEOF.tabela.vinculos.html();
438 650 new YAHOO.widget.Button(
439   - "i3GEOFTabelaVinculoBotaoCriar",
440   - {onclick:{fn: function(){
441   - var t1 = $i("i3GEOFTabelaOpcoesAdicionaVinculoT1").value,
442   - t2 = $i("i3GEOFTabelaOpcoesAdicionaVinculoT2").value,
443   - c1 = $i("i3GEOFTabelaOpcoesAdicionaVinculoColunaT1").value,
444   - c2 = $i("i3GEOFTabelaOpcoesAdicionaVinculoColunaT1").value;
445   - if(t1 != "" && t2 != "" && c1 != "" && c2 != ""){
446   - i3GEOF.tabela.vinculos.ligacoes.push({
447   - "t1": t1,
448   - "t2": t2,
449   - "c1": c1,
450   - "c2": c2
451   - });
  651 + "i3GEOFTabelaVinculoBotaoCriar",
  652 + {
  653 + onclick : {
  654 + fn : function() {
  655 + var t1 = $i("i3GEOFTabelaOpcoesAdicionaVinculoT1").value, t2 =
  656 + $i("i3GEOFTabelaOpcoesAdicionaVinculoT2").value, c1 =
  657 + $i("i3GEOFTabelaOpcoesAdicionaVinculoColunaT1").value, c2 =
  658 + $i("i3GEOFTabelaOpcoesAdicionaVinculoColunaT1").value;
  659 + if (t1 != "" && t2 != "" && c1 != "" && c2 != "") {
  660 + i3GEOF.tabela.vinculos.ligacoes.push({
  661 + "t1" : t1,
  662 + "t2" : t2,
  663 + "c1" : c1,
  664 + "c2" : c2
  665 + });
  666 + }
  667 + i3GEOF.tabela.vinculos.lista();
452 668 }
453   - i3GEOF.tabela.vinculos.lista();
454   - }}}
455   - );
  669 + }
  670 + });
456 671 i3GEOF.tabela.vinculos.lista();
457 672 },
458   - comboColunasT1: function(){
  673 + comboColunasT1 : function() {
459 674 var colunas = i3GEOF.tabela.comboColunas(
460   - $i("i3GEOFTabelaOpcoesAdicionaVinculoT1").value,
461   - "i3GEOFTabelaOpcoesAdicionaVinculoColunaT1"
462   - ),
463   - ins = "";
464   - ins = " <p class=paragrafo >" + $trad(48,i3GEOF.tabela.dicionario) + "<br>" + colunas;
  675 + $i("i3GEOFTabelaOpcoesAdicionaVinculoT1").value,
  676 + "i3GEOFTabelaOpcoesAdicionaVinculoColunaT1"), ins = "";
  677 + ins = " <p class=paragrafo >" + $trad(
  678 + 48,
  679 + i3GEOF.tabela.dicionario) + "<br>" + colunas;
465 680 $i("i3GEOFTabelaVinculoT1Colunas").innerHTML = ins;
466 681 },
467   - comboColunasT2: function(){
  682 + comboColunasT2 : function() {
468 683 var colunas = i3GEOF.tabela.comboColunas(
469   - $i("i3GEOFTabelaOpcoesAdicionaVinculoT2").value,
470   - "i3GEOFTabelaOpcoesAdicionaVinculoColunaT2"
471   - ),
472   - ins = "";
473   - ins = " <p class=paragrafo >" + $trad(48,i3GEOF.tabela.dicionario) + "<br>" + colunas;
474   - $i("i3GEOFTabelaVinculoT2Colunas").innerHTML = ins;
  684 + $i("i3GEOFTabelaOpcoesAdicionaVinculoT2").value,
  685 + "i3GEOFTabelaOpcoesAdicionaVinculoColunaT2"), ins = "";
  686 + ins = " <p class=paragrafo >" + $trad(
  687 + 48,
  688 + i3GEOF.tabela.dicionario) + "<br>" + colunas;
  689 + $i("i3GEOFTabelaVinculoT2Colunas").innerHTML = ins;
475 690 },
476   - lista: function(){
477   - var v = i3GEOF.tabela.vinculos.ligacoes,
478   - n = v.length,
479   - ins = "<p class=paragrafo ><b>" + $trad(44,i3GEOF.tabela.dicionario) + "</b></p>",
480   - i;
481   - for(i=0;i<n;i++){
482   - ins += "<p class=paragrafo ><img style='cursor:pointer;float:left;' src='"+i3GEO.configura.locaplic+"/imagens/oxygen/16x16/edit-delete.png' title='excluir' onclick='i3GEOF.tabela.vinculos.excluir(\""+i+"\")' />" + v[i].t1 + " " + v[i].c1 +" -> " + v[i].t2 + " " + v[i].c2 + "<p>";
  691 + lista : function() {
  692 + var v = i3GEOF.tabela.vinculos.ligacoes, n = v.length, ins = "<p class=paragrafo ><b>" + $trad(
  693 + 44,
  694 + i3GEOF.tabela.dicionario) + "</b></p>", i;
  695 + for (i = 0; i < n; i++) {
  696 + ins +=
  697 + "<p class=paragrafo ><img style='cursor:pointer;float:left;' src='" + i3GEO.configura.locaplic +
  698 + "/imagens/oxygen/16x16/edit-delete.png' title='excluir' onclick='i3GEOF.tabela.vinculos.excluir(\"" + i +
  699 + "\")' />" + v[i].t1 + " " + v[i].c1 + " -> " + v[i].t2 + " " + v[i].c2 + "<p>";
483 700 }
484 701 $i("i3GEOFtabelaVinculosLista").innerHTML = ins;
485 702 },
486   - excluir: function(i){
487   - i3GEOF.tabela.vinculos.ligacoes.splice(parseInt(i,10),1);
  703 + excluir : function(i) {
  704 + i3GEOF.tabela.vinculos.ligacoes.splice(
  705 + parseInt(
  706 + i,
  707 + 10),
  708 + 1);
488 709 i3GEOF.tabela.vinculos.lista();
489 710 },
490   - atualizaVinculos: function(tabelaOrigem,registro,marcado){
491   - var v = i3GEOF.tabela.vinculos.ligacoes,
492   - n = v.length,
493   - i,valor;
494   - if(n > 0){
495   - for(i=0;i<n;i++){
496   - //verifica se o vinculo existe
497   - if(v[i].t1 === tabelaOrigem){
498   - //pega o valor do registro na tabela origem
499   - valor = i3GEOF.tabela.vinculos.pegaValorRegistro(v[i].t1,v[i].c1,registro);
500   - //marca o registro na tabela destino
501   - i3GEOF.tabela.vinculos.registro(v[i].t2,v[i].c2,valor,marcado);
  711 + atualizaVinculos : function(tabelaOrigem, registro, marcado) {
  712 + var v = i3GEOF.tabela.vinculos.ligacoes, n = v.length, i, valor;
  713 + if (n > 0) {
  714 + for (i = 0; i < n; i++) {
  715 + // verifica se o vinculo existe
  716 + if (v[i].t1 === tabelaOrigem) {
  717 + // pega o valor do registro na tabela origem
  718 + valor = i3GEOF.tabela.vinculos.pegaValorRegistro(
  719 + v[i].t1,
  720 + v[i].c1,
  721 + registro);
  722 + // marca o registro na tabela destino
  723 + i3GEOF.tabela.vinculos.registro(
  724 + v[i].t2,
  725 + v[i].c2,
  726 + valor,
  727 + marcado);
502 728 }
503   - if(v[i].t2 === tabelaOrigem){
504   - //pega o valor do registro na tabela origem
505   - valor = i3GEOF.tabela.vinculos.pegaValorRegistro(v[i].t2,v[i].c2,registro);
506   - //marca o registro na tabela destino
507   - i3GEOF.tabela.vinculos.registro(v[i].t1,v[i].c1,valor,marcado);
  729 + if (v[i].t2 === tabelaOrigem) {
  730 + // pega o valor do registro na tabela origem
  731 + valor = i3GEOF.tabela.vinculos.pegaValorRegistro(
  732 + v[i].t2,
  733 + v[i].c2,
  734 + registro);
  735 + // marca o registro na tabela destino
  736 + i3GEOF.tabela.vinculos.registro(
  737 + v[i].t1,
  738 + v[i].c1,
  739 + valor,
  740 + marcado);
508 741 }
509 742 }
510 743 }
511 744 },
512   - //verifica qtas colunas devem ser puladas em cada linha
513   - colunasVazias: function(idjanela){
514   - var tabela = $i(idjanela+"i3GEOtabelatabelai"),
515   - linhas = tabela.getElementsByTagName("tr"),
516   - pular = 0,
517   - colunas,n,i;
  745 + // verifica qtas colunas devem ser puladas em cada linha
  746 + colunasVazias : function(idjanela) {
  747 + var tabela = $i(idjanela + "i3GEOtabelatabelai"), linhas = tabela.getElementsByTagName("tr"), pular = 0, colunas, n, i;
518 748 colunas = linhas[0].getElementsByTagName("td");
519 749 n = colunas.length;
520   - for(i=0;i<n;i++){
521   - if(colunas[i].innerHTML == ""){
  750 + for (i = 0; i < n; i++) {
  751 + if (colunas[i].innerHTML == "") {
522 752 pular++;
523 753 }
524 754 }
525 755 return pular;
526 756 },
527   - //pega o indice de uma coluna em uma tabela buscando no cabecalho no valor de title em cada celula
528   - indiceColuna: function(idjanela,t){
529   - var tabela = $i(idjanela+"i3GEOtabelatabelai"),
530   - linhas = tabela.getElementsByTagName("tr"),
531   - linha = linhas[0],
532   - colunas = linha.getElementsByTagName("td"),
533   - indice = 0,
534   - n = colunas.length,
535   - i,s;
536   - for(i=0;i<n;i++){
  757 + // pega o indice de uma coluna em uma tabela buscando no cabecalho
  758 + // no valor de title em cada celula
  759 + indiceColuna : function(idjanela, t) {
  760 + var tabela = $i(idjanela + "i3GEOtabelatabelai"), linhas = tabela.getElementsByTagName("tr"), linha = linhas[0], colunas =
  761 + linha.getElementsByTagName("td"), indice = 0, n = colunas.length, i, s;
  762 + for (i = 0; i < n; i++) {
537 763 s = colunas[i].getElementsByTagName("span");
538   - if(s && s[0] && s[0].title && s[0].title == t){
  764 + if (s && s[0] && s[0].title && s[0].title == t) {
539 765 return i;
540 766 }
541 767 }
542 768 return indice;
543 769 },
544   - //retorna o indice de uma coluna que contem a tag input na tabela com a lista de valores
545   - indiceColunaInput: function(idjanela){
546   - var tabela = $i(idjanela+"i3GEOtabelatabelai"),
547   - linhas = tabela.getElementsByTagName("tr"),
548   - linha = linhas[1],
549   - colunas = linha.getElementsByTagName("td"),
550   - indice = 0,
551   - n = colunas.length,
552   - i;
553   - for(i=0;i<n;i++){
554   - if(colunas[i].getElementsByTagName("input").length > 0){
  770 + // retorna o indice de uma coluna que contem a tag input na tabela
  771 + // com a lista de valores
  772 + indiceColunaInput : function(idjanela) {
  773 + var tabela = $i(idjanela + "i3GEOtabelatabelai"), linhas = tabela.getElementsByTagName("tr"), linha = linhas[1], colunas =
  774 + linha.getElementsByTagName("td"), indice = 0, n = colunas.length, i;
  775 + for (i = 0; i < n; i++) {
  776 + if (colunas[i].getElementsByTagName("input").length > 0) {
555 777 return i;
556 778 }
557 779 }
558 780 return indice;
559 781 },
560   - //pega o valor da coluna em uma tabela com a lista de valores com base no codigo do registro
561   - pegaValorRegistro: function(idjanela,coluna,registro){
562   - var tabela = $i(idjanela+"i3GEOtabelatabelai"),
563   - linhas = tabela.getElementsByTagName("tr"),
564   - n = linhas.length,
565   - indiceColuna = i3GEOF.tabela.vinculos.indiceColuna(idjanela,coluna),
566   - indiceColunaInput = i3GEOF.tabela.vinculos.indiceColunaInput(idjanela),
567   - i,linha,colunas;
568   - for(i=1;i<n;i++){
  782 + // pega o valor da coluna em uma tabela com a lista de valores com
  783 + // base no codigo do registro
  784 + pegaValorRegistro : function(idjanela, coluna, registro) {
  785 + var tabela = $i(idjanela + "i3GEOtabelatabelai"), linhas = tabela.getElementsByTagName("tr"), n = linhas.length, indiceColuna =
  786 + i3GEOF.tabela.vinculos.indiceColuna(
  787 + idjanela,
  788 + coluna), indiceColunaInput = i3GEOF.tabela.vinculos.indiceColunaInput(idjanela), i, linha, colunas;
  789 + for (i = 1; i < n; i++) {
569 790 linha = linhas[i];
570 791 colunas = linha.getElementsByTagName("td");
571   - if(colunas[indiceColunaInput].getElementsByTagName("input")[0].name == registro){
  792 + if (colunas[indiceColunaInput].getElementsByTagName("input")[0].name == registro) {
572 793 return colunas[indiceColuna].innerHTML;
573 794 }
574 795 }
575 796 return "";
576 797 },
577   - registro: function(idjanela,coluna,valor,marcado){
578   - var tabela = $i(idjanela+"i3GEOtabelatabelai"),
579   - linhas = tabela.getElementsByTagName("tr"),
580   - n = linhas.length,
581   - indiceColuna = i3GEOF.tabela.vinculos.indiceColuna(idjanela,coluna),
582   - indiceColunaInput = i3GEOF.tabela.vinculos.indiceColunaInput(idjanela),
583   - i,linha,colunas,reg;
584   - for(i=1;i<n;i++){
  798 + registro : function(idjanela, coluna, valor, marcado) {
  799 + var tabela = $i(idjanela + "i3GEOtabelatabelai"), linhas = tabela.getElementsByTagName("tr"), n = linhas.length, indiceColuna =
  800 + i3GEOF.tabela.vinculos.indiceColuna(
  801 + idjanela,
  802 + coluna), indiceColunaInput = i3GEOF.tabela.vinculos.indiceColunaInput(idjanela), i, linha, colunas, reg;
  803 + for (i = 1; i < n; i++) {
585 804 linha = linhas[i];
586 805 colunas = linha.getElementsByTagName("td");
587   - if(colunas[indiceColuna].innerHTML == valor){
  806 + if (colunas[indiceColuna].innerHTML == valor) {
588 807 reg = colunas[indiceColunaInput].getElementsByTagName("input")[0];
589 808 reg.checked = marcado;
590 809 i3GEOF.tabela.propJanelas[idjanela].registros[reg.name] = marcado;
... ... @@ -592,607 +811,594 @@ i3GEOF.tabela = {
592 811 }
593 812 },
594 813 },
595   - comboJanelas: function(idcombo,funcao,w){
596   - var i,n = i3GEOF.tabela.janelas.length;
597   - if(!funcao){
  814 + comboJanelas : function(idcombo, funcao, w) {
  815 + var i, n = i3GEOF.tabela.janelas.length;
  816 + if (!funcao) {
598 817 funcao = "";
599 818 }
600   - if(!w){
  819 + if (!w) {
601 820 w = 260;
602 821 }
603   - ins = "" +
604   - " <select style='width:" + w + "px;' id='" + idcombo + "' onchange='" + funcao + "'>" +
605   - " <option value='' >---</option>";
606   - for(i=0;i<n;i++){
  822 + ins =
  823 + "" + " <select style='width:" + w + "px;' id='" + idcombo + "' onchange='" + funcao + "'>" +
  824 + " <option value='' >---</option>";
  825 + for (i = 0; i < n; i++) {
607 826 ins += "<option value='" + i3GEOF.tabela.janelas[i] + "' >" + i3GEOF.tabela.janelas[i] + "</option>";
608 827 }
609 828 ins += "</select>";
610 829 return ins;
611 830 },
612   - comboColunas: function(idJanela,idcombo,funcao,w){
613   - var i,
614   - c = i3GEOF.tabela.propJanelas[idJanela].colunas,
615   - n = c.itens.length;
616   - if(!funcao){
  831 + comboColunas : function(idJanela, idcombo, funcao, w) {
  832 + var i, c = i3GEOF.tabela.propJanelas[idJanela].colunas, n = c.itens.length;
  833 + if (!funcao) {
617 834 funcao = "";
618 835 }
619   - if(!w){
  836 + if (!w) {
620 837 w = 250;
621 838 }
622   - ins = "" +
623   - " <select style='width:" + w + "px;' id='" + idcombo + "' onchange='" + funcao + "'>" +
624   - " <option value='' >---</option>";
625   - for(i=0;i<n;i++){
  839 + ins =
  840 + "" + " <select style='width:" + w + "px;' id='" + idcombo + "' onchange='" + funcao + "'>" +
  841 + " <option value='' >---</option>";
  842 + for (i = 0; i < n; i++) {
626 843 ins += "<option value='" + c.itens[i] + "' >" + c.alias[i] + "</option>";
627 844 }
628 845 ins += "</select>";
629 846 return ins;
630 847 },
631 848 /*
632   - Function: ativaAutoAtualiza
633   -
634   - Ativa ou desativa a atualiza&ccedil;&atilde;o autom&aacute;tica da tabela quando o usu&aacute;rio navega no mapa
  849 + * Function: ativaAutoAtualiza
  850 + *
  851 + * Ativa ou desativa a atualiza&ccedil;&atilde;o autom&aacute;tica da tabela quando o usu&aacute;rio navega no mapa
635 852 */
636   - atualizaListaDeRegistros:function(){
637   - var i,
638   - janelas = i3GEOF.tabela.janelas,
639   - propJanelas = i3GEOF.tabela.propJanelas,
640   - n = janelas.length;
641   - for(i=0;i<n;i++){
642   - if(propJanelas[janelas[i]].atualiza === true){
  853 + atualizaListaDeRegistros : function() {
  854 + var i, janelas = i3GEOF.tabela.janelas, propJanelas = i3GEOF.tabela.propJanelas, n = janelas.length;
  855 + for (i = 0; i < n; i++) {
  856 + if (propJanelas[janelas[i]].atualiza === true) {
643 857 i3GEOF.tabela.pegaRegistros(janelas[i]);
644 858 }
645 859 }
646 860 },
647 861 /*
648   - Function: pegaRegistros
649   -
650   - Pega os registros da tabela de atributos do tema
651   -
652   - Veja:
653   -
654   - <LISTAREGISTROS>
  862 + * Function: pegaRegistros
  863 + *
  864 + * Pega os registros da tabela de atributos do tema
  865 + *
  866 + * Veja:
  867 + *
  868 + * <LISTAREGISTROS>
655 869 */
656   - pegaRegistros: function(idjanela,tipolista,dadosDaClasse,inicio,fim,funcao){
657   - if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible")
658   - {return;}
659   - if(!idjanela){
  870 + pegaRegistros : function(idjanela, tipolista, dadosDaClasse, inicio, fim, funcao) {
  871 + if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") {
  872 + return;
  873 + }
  874 + if (!idjanela) {
660 875 idjanela = "";
661 876 }
662 877 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible";
663   - $i(idjanela+"i3GEOtabelaregistros").innerHTML = "";
664   - var p,ext,
665   - tiporeg = "brasil",
666   - cp = new cpaint();
667   - //verifica se esta no modo de atualizacao automatica
668   - if(i3GEOF.tabela.propJanelas[idjanela].atualiza === true){
  878 + $i(idjanela + "i3GEOtabelaregistros").innerHTML = "";
  879 + var p, ext, tiporeg = "brasil", cp = new cpaint();
  880 + // verifica se esta no modo de atualizacao automatica
  881 + if (i3GEOF.tabela.propJanelas[idjanela].atualiza === true) {
669 882 tiporeg = "mapa";
670 883 }
671   - if(!tipolista){
672   - if ($i(idjanela+"i3GEOtabelatipolista").checked){
  884 + if (!tipolista) {
  885 + if ($i(idjanela + "i3GEOtabelatipolista").checked) {
673 886 tipolista = "selecionados";
674   - }
675   - else{
  887 + } else {
676 888 tipolista = "tudo";
677 889 }
678 890 }
679   - if(!dadosDaClasse){
680   - if ($i(idjanela+"i3GEOtabelalegenda").checked){
  891 + if (!dadosDaClasse) {
  892 + if ($i(idjanela + "i3GEOtabelalegenda").checked) {
681 893 dadosDaClasse = "sim";
682   - }
683   - else{
  894 + } else {
684 895 dadosDaClasse = "nao";
685 896 }
686 897 }
687   - if(!inicio){
688   - inicio = $i(idjanela+"i3GEOtabelainicio").value - 1;
689   - }
690   - else{
  898 + if (!inicio) {
  899 + inicio = $i(idjanela + "i3GEOtabelainicio").value - 1;
  900 + } else {
691 901 inicio = "";
692 902 }
693   - if(!fim){
694   - fim = $i(idjanela+"i3GEOtabelafim").value - 1;
695   - }
696   - else{
  903 + if (!fim) {
  904 + fim = $i(idjanela + "i3GEOtabelafim").value - 1;
  905 + } else {
697 906 fim = "";
698 907 }
699   - if(!funcao){
700   - funcao = function(retorno){
  908 + if (!funcao) {
  909 + funcao = function(retorno) {
701 910 i3GEOF.tabela.propJanelas[idjanela].registros = [];
702   - i3GEOF.tabela.montaTabela(retorno,idjanela);
  911 + i3GEOF.tabela.montaTabela(
  912 + retorno,
  913 + idjanela);
703 914 };
704 915 }
705 916 ext = i3GEO.parametros.mapexten;
706 917 ext = i3GEO.util.extOSM2Geo(ext);
707   - p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+
708   - "&funcao=listaregistros"+
709   - "&inicio="+inicio+
710   - "&fim="+fim+
711   - "&tema="+i3GEOF.tabela.propJanelas[idjanela].tema+
712   - "&tipo="+tiporeg+
713   - "&tipolista="+tipolista+
714   - "&ext="+ext+
715   - "&dadosDaClasse="+dadosDaClasse;
  918 + p =
  919 + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" + i3GEO.configura.sid + "&funcao=listaregistros" +
  920 + "&inicio=" + inicio + "&fim=" + fim + "&tema=" + i3GEOF.tabela.propJanelas[idjanela].tema + "&tipo=" + tiporeg +
  921 + "&tipolista=" + tipolista + "&ext=" + ext + "&dadosDaClasse=" + dadosDaClasse;
716 922 cp.set_response_type("JSON");
717   - cp.call(p,"listaRegistros",funcao);
  923 + cp.call(
  924 + p,
  925 + "listaRegistros",
  926 + funcao);
718 927 },
719 928 /*
720   - Function: montaTabela
721   -
722   - Monta a visualiza&ccedil;&atilde;o da tabela de atributos
  929 + * Function: montaTabela
  930 + *
  931 + * Monta a visualiza&ccedil;&atilde;o da tabela de atributos
723 932 */
724   - montaTabela: function(retorno,idjanela){
725   - if (retorno.data !== undefined){
726   - var ins,
727   - i,
728   - vals,
729   - cor,
730   - j,
731   - n,
732   - stat,
733   - imagem,
734   - registros = i3GEOF.tabela.propJanelas[idjanela].registros,
735   - i3GEOtabelalegenda = $i(idjanela+"i3GEOtabelalegenda").checked;
736   - //cabecalho da tabela
737   - ins = "<table id="+idjanela+"i3GEOtabelatabelai class=lista8 >";
738   - ins += "<tr><td style='background-color:yellow'></td><td style='background-color:yellow'></td><td style='background-color:yellow'></td><td style='background-color:yellow'></td>";
  933 + montaTabela : function(retorno, idjanela) {
  934 + if (retorno.data !== undefined) {
  935 + var ins, i, vals, cor, j, n, stat, imagem, registros = i3GEOF.tabela.propJanelas[idjanela].registros, i3GEOtabelalegenda =
  936 + $i(idjanela + "i3GEOtabelalegenda").checked;
  937 + // cabecalho da tabela
  938 + ins = "<table id=" + idjanela + "i3GEOtabelatabelai class=lista8 >";
  939 + ins +=
  940 + "<tr><td style='background-color:yellow'></td><td style='background-color:yellow'></td><td style='background-color:yellow'></td><td style='background-color:yellow'></td>";
739 941 i3GEOF.tabela.propJanelas[idjanela].colunas = {
740   - "itens": retorno.data[0].itens,
741   - "alias": retorno.data[0].alias
  942 + "itens" : retorno.data[0].itens,
  943 + "alias" : retorno.data[0].alias
742 944 };
743 945 n = retorno.data[0].itens.length;
744   - for (i=0;i<n;i++){
745   - ins += "<td accessKey='"+(i * 1 + 4) +
746   - "' style='background-color:yellow' >" +
747   - "<img style=cursor:pointer onclick='i3GEOF.tabela.excluiColuna(this,"+(i * 1 + 4)+",\""+idjanela+"\")' src='"+i3GEO.configura.locaplic+"/imagens/x.gif' title='"+$trad("t12")+"' />&nbsp;" +
748   - "<img style=cursor:pointer onclick='i3GEOF.tabela.ordenaColuna(this,"+(i * 1 + 4)+",\""+idjanela+"\")' src='"+i3GEO.configura.locaplic+"/imagens/ordena1.gif' title='"+$trad(31,i3GEOF.tabela.dicionario)+"' /><br><span title='"+retorno.data[0].itens[i]+"'> <b>"+retorno.data[0].alias[i]+"</b></span></td>";
  946 + for (i = 0; i < n; i++) {
  947 + ins +=
  948 + "<td accessKey='" + (i * 1 + 4) + "' style='background-color:yellow' >" +
  949 + "<img style=cursor:pointer onclick='i3GEOF.tabela.excluiColuna(this," + (i * 1 + 4) + ",\"" + idjanela +
  950 + "\")' src='" + i3GEO.configura.locaplic + "/imagens/x.gif' title='" + $trad("t12") + "' />&nbsp;" +
  951 + "<img style=cursor:pointer onclick='i3GEOF.tabela.ordenaColuna(this," + (i * 1 + 4) + ",\"" + idjanela +
  952 + "\")' src='" + i3GEO.configura.locaplic + "/imagens/ordena1.gif' title='" + $trad(
  953 + 31,
  954 + i3GEOF.tabela.dicionario) + "' /><br><span title='" + retorno.data[0].itens[i] + "'> <b>" +
  955 + retorno.data[0].alias[i] + "</b></span></td>";
749 956 }
750 957 ins += "</tr>";
751 958 cor = "linha";
752 959 n = retorno.data[1].registros.length;
753   - if($i(idjanela+"i3GEOtabelafim").value === ""){
754   - $i(idjanela+"i3GEOtabelafim").value = n - 1;
  960 + if ($i(idjanela + "i3GEOtabelafim").value === "") {
  961 + $i(idjanela + "i3GEOtabelafim").value = n - 1;
755 962 }
756   - for (i=0;i<n;i++){
757   - ins += "<tr><td><img style=cursor:pointer onclick='i3GEOF.tabela.excluiLinha(this,\""+idjanela+"\")' src='"+i3GEO.configura.locaplic+"/imagens/x.gif' title='"+$trad("t12")+"' /></td>";
  963 + for (i = 0; i < n; i++) {
  964 + ins +=
  965 + "<tr><td><img style=cursor:pointer onclick='i3GEOF.tabela.excluiLinha(this,\"" + idjanela + "\")' src='" +
  966 + i3GEO.configura.locaplic + "/imagens/x.gif' title='" + $trad("t12") + "' /></td>";
758 967 ins += "<td>";
759   - if(retorno.data[1].registros[i].ext && retorno.data[1].registros[i].ext != ""){
760   - ins += "<img style=cursor:pointer onclick='i3GEOF.tabela.zoomExt(\""+retorno.data[1].registros[i].ext+"\",\""+idjanela+"\")' src='"+i3GEO.configura.locaplic+"/imagens/o.gif' title='zoom' ids="+retorno.data[1].registros[i].indice+" />";
  968 + if (retorno.data[1].registros[i].ext && retorno.data[1].registros[i].ext != "") {
  969 + ins +=
  970 + "<img style=cursor:pointer onclick='i3GEOF.tabela.zoomExt(\"" + retorno.data[1].registros[i].ext + "\",\"" +
  971 + idjanela + "\")' src='" + i3GEO.configura.locaplic + "/imagens/o.gif' title='zoom' ids=" +
  972 + retorno.data[1].registros[i].indice + " />";
761 973 }
762 974 ins += "</td>";
763 975 stat = "";
764   - if(retorno.data[1].registros[i].status === "CHECKED"){
  976 + if (retorno.data[1].registros[i].status === "CHECKED") {
765 977 stat = "CHECKED";
766 978 }
767   - if(registros[retorno.data[1].registros[i].indice]){
768   - if(registros[retorno.data[1].registros[i].indice] === true){
  979 + if (registros[retorno.data[1].registros[i].indice]) {
  980 + if (registros[retorno.data[1].registros[i].indice] === true) {
769 981 stat = "CHECKED";
770   - }
771   - else{
  982 + } else {
772 983 stat = "";
773 984 }
774 985 }
775   - ins += "<td><input title='marca' onclick='i3GEOF.tabela.registraLinha(this,\""+idjanela+"\")' style='cursor:pointer;border:0px solid white;' type='checkbox' "+stat+" name="+retorno.data[1].registros[i].indice+" /></td>";
776   - if(i3GEOtabelalegenda == true){
  986 + ins +=
  987 + "<td><input title='marca' onclick='i3GEOF.tabela.registraLinha(this,\"" + idjanela +
  988 + "\")' style='cursor:pointer;border:0px solid white;' type='checkbox' " + stat + " name=" +
  989 + retorno.data[1].registros[i].indice + " /></td>";
  990 + if (i3GEOtabelalegenda == true) {
777 991 imagem = retorno.data.legenda[retorno.data[1].registros[i].classe["indice"]];
778   - ins += "<td><img title='"+retorno.data[1].registros[i].classe["nome"]+"' src='"+imagem+"' /></td>";
  992 + ins += "<td><img title='" + retorno.data[1].registros[i].classe["nome"] + "' src='" + imagem + "' /></td>";
  993 + } else {
  994 + ins += "<td></td>";
779 995 }
780   - else
781   - {ins += "<td></td>";}
782   - if(stat === "CHECKED"){
  996 + if (stat === "CHECKED") {
783 997 registros[retorno.data[1].registros[i].indice] = true;
784 998 }
785 999 vals = retorno.data[1].registros[i].valores;
786   - for (j=0;j<vals.length;j++){
787   - ins += "<td class='"+cor+"'>"+vals[j].valor+"</td>";
  1000 + for (j = 0; j < vals.length; j++) {
  1001 + ins += "<td class='" + cor + "'>" + vals[j].valor + "</td>";
788 1002 }
789   - if (cor === "linha"){
  1003 + if (cor === "linha") {
790 1004 cor = "linha1";
791   - }
792   - else{
  1005 + } else {
793 1006 cor = "linha";
794 1007 }
795 1008 }
796   - $i(idjanela+"i3GEOtabelaregistros").innerHTML = ins;
  1009 + $i(idjanela + "i3GEOtabelaregistros").innerHTML = ins;
797 1010 }
798 1011 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
799 1012 },
800 1013 /*
801   - Function: mais
802   -
803   - Avan&ccedil;a o contador de registros para a listagem
  1014 + * Function: mais
  1015 + *
  1016 + * Avan&ccedil;a o contador de registros para a listagem
804 1017 */
805   - mais:function(idjanela){
806   - if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible")
807   - {return;}
808   - var i = $i(idjanela+"i3GEOtabelainicio").value * 1,
809   - f = $i(idjanela+"i3GEOtabelafim").value * 1,
810   - d = f - i;
811   - $i(idjanela+"i3GEOtabelainicio").value = f + 1;
812   - $i(idjanela+"i3GEOtabelafim").value = f + d + 1;
  1018 + mais : function(idjanela) {
  1019 + if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") {
  1020 + return;
  1021 + }
  1022 + var i = $i(idjanela + "i3GEOtabelainicio").value * 1, f = $i(idjanela + "i3GEOtabelafim").value * 1, d = f - i;
  1023 + $i(idjanela + "i3GEOtabelainicio").value = f + 1;
  1024 + $i(idjanela + "i3GEOtabelafim").value = f + d + 1;
813 1025 i3GEOF.tabela.pegaRegistros(idjanela);
814 1026 },
815 1027 /*
816   - Function: todos
817   -
818   - Avan&ccedil;a o contador de registros para o fim da listagem
  1028 + * Function: todos
  1029 + *
  1030 + * Avan&ccedil;a o contador de registros para o fim da listagem
819 1031 */
820   - todos:function(idjanela){
821   - if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible")
822   - {return;}
823   - $i(idjanela+"i3GEOtabelainicio").value = 1;
824   - $i(idjanela+"i3GEOtabelafim").value = "";
825   - i3GEOF.tabela.pegaRegistros(idjanela,false,false,false,1,true);
  1032 + todos : function(idjanela) {
  1033 + if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") {
  1034 + return;
  1035 + }
  1036 + $i(idjanela + "i3GEOtabelainicio").value = 1;
  1037 + $i(idjanela + "i3GEOtabelafim").value = "";
  1038 + i3GEOF.tabela.pegaRegistros(
  1039 + idjanela,
  1040 + false,
  1041 + false,
  1042 + false,
  1043 + 1,
  1044 + true);
826 1045 },
827 1046 /*
828   - Function: menos
829   -
830   - Retrocede o contador de registros para a listagem
  1047 + * Function: menos
  1048 + *
  1049 + * Retrocede o contador de registros para a listagem
831 1050 */
832   - menos: function(idjanela){
833   - if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible")
834   - {return;}
835   - var i = $i(idjanela+"i3GEOtabelainicio").value * 1,
836   - f = $i(idjanela+"i3GEOtabelafim").value * 1,
837   - d = f - i;
838   - $i(idjanela+"i3GEOtabelainicio").value = i - d - 1;
839   - $i(idjanela+"i3GEOtabelafim").value = i - 1;
840   - if ($i(idjanela+"i3GEOtabelainicio").value < 1){
841   - $i(idjanela+"i3GEOtabelainicio").value = 1;
842   - $i(idjanela+"i3GEOtabelafim").value = 1 + d;
  1051 + menos : function(idjanela) {
  1052 + if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") {
  1053 + return;
  1054 + }
  1055 + var i = $i(idjanela + "i3GEOtabelainicio").value * 1, f = $i(idjanela + "i3GEOtabelafim").value * 1, d = f - i;
  1056 + $i(idjanela + "i3GEOtabelainicio").value = i - d - 1;
  1057 + $i(idjanela + "i3GEOtabelafim").value = i - 1;
  1058 + if ($i(idjanela + "i3GEOtabelainicio").value < 1) {
  1059 + $i(idjanela + "i3GEOtabelainicio").value = 1;
  1060 + $i(idjanela + "i3GEOtabelafim").value = 1 + d;
843 1061 }
844 1062 i3GEOF.tabela.pegaRegistros(idjanela);
845 1063 },
846 1064 /*
847   - Function: excluiColuna
848   -
849   - Exclui uma coluna da visualiza&ccedil;&atilde;o da tabela
  1065 + * Function: excluiColuna
  1066 + *
  1067 + * Exclui uma coluna da visualiza&ccedil;&atilde;o da tabela
850 1068 */
851   - excluiColuna: function(coluna,cid,idjanela){
  1069 + excluiColuna : function(coluna, cid, idjanela) {
852 1070 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible";
853   - try{
854   - var tabela = $i(idjanela+"i3GEOtabelatabelai"),
855   - trs,
856   - tds,
857   - i,
858   - t,
859   - nt,
860   - ni;
861   - //pega o indice correto
  1071 + try {
  1072 + var tabela = $i(idjanela + "i3GEOtabelatabelai"), trs, tds, i, t, nt, ni;
  1073 + // pega o indice correto
862 1074 tds = coluna.parentNode.parentNode.getElementsByTagName("td");
863 1075 nt = tds.length;
864   - for (t=0;t<nt;t++){
865   - if(tds[t].accessKey == cid){
  1076 + for (t = 0; t < nt; t++) {
  1077 + if (tds[t].accessKey == cid) {
866 1078 cid = t;
867 1079 break;
868 1080 }
869 1081 }
870 1082 trs = tabela.getElementsByTagName("tr");
871 1083 nt = trs.length;
872   - for (t=0;t<nt;t++){
  1084 + for (t = 0; t < nt; t++) {
873 1085 i = trs[t];
874   - if(i.getElementsByTagName("td")[cid]){
  1086 + if (i.getElementsByTagName("td")[cid]) {
875 1087 ni = i.getElementsByTagName("td")[cid];
876 1088 i.removeChild(ni);
877 1089 }
878 1090 }
879 1091 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
880   - }catch(e){
  1092 + } catch (e) {
881 1093 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
882   - if(typeof(console) !== 'undefined'){console.error(e);}
  1094 + if (typeof (console) !== 'undefined') {
  1095 + console.error(e);
  1096 + }
883 1097 }
884 1098 },
885 1099 /*
886   - Function: ordenaColuna
887   -
888   - Ordena uma coluna da tabela
  1100 + * Function: ordenaColuna
  1101 + *
  1102 + * Ordena uma coluna da tabela
889 1103 */
890   - ordenaColuna: function(coluna,cid,idjanela){
  1104 + ordenaColuna : function(coluna, cid, idjanela) {
891 1105 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible";
892   - try{
893   - var tabela = $i(idjanela+"i3GEOtabelatabelai"),
894   - trs = tabela.getElementsByTagName("tr"),
895   - ntrs = trs.length,
896   - tds,
897   - nt,
898   - conta = 0,
899   - psort = [],
900   - t,
901   - psortfim,
902   - npsortfim,
903   - ins,
904   - p,
905   - e;
906   - //pega o indice correto
  1106 + try {
  1107 + var tabela = $i(idjanela + "i3GEOtabelatabelai"), trs = tabela.getElementsByTagName("tr"), ntrs = trs.length, tds, nt, conta =
  1108 + 0, psort = [], t, psortfim, npsortfim, ins, p, e;
  1109 + // pega o indice correto
907 1110 tds = coluna.parentNode.parentNode.getElementsByTagName("td");
908 1111 nt = tds.length;
909   - for (t=0;t<nt;t++){
910   - if(tds[t].accessKey == cid){
  1112 + for (t = 0; t < nt; t++) {
  1113 + if (tds[t].accessKey == cid) {
911 1114 cid = t;
912 1115 break;
913 1116 }
914 1117 }
915   - for (t=0;t<ntrs;t++)
916   - {
917   - if (t < ntrs)
918   - {
919   - if (trs[t].childNodes[cid].innerHTML)
920   - {
921   - if (trs[t].childNodes[cid].innerHTML !== "undefined"){
922   - psort[conta] = trs[t].childNodes[cid].innerHTML+"+"+conta;
  1118 + for (t = 0; t < ntrs; t++) {
  1119 + if (t < ntrs) {
  1120 + if (trs[t].childNodes[cid].innerHTML) {
  1121 + if (trs[t].childNodes[cid].innerHTML !== "undefined") {
  1122 + psort[conta] = trs[t].childNodes[cid].innerHTML + "+" + conta;
923 1123 conta = conta + 1;
924 1124 }
925 1125 }
926 1126 }
927 1127 }
928   - //recosntroi a tabela
  1128 + // recosntroi a tabela
929 1129 psortfim = psort.sort();
930   - ins = "<table id="+idjanela+"i3GEOtabelatabelai class=lista8 >";
  1130 + ins = "<table id=" + idjanela + "i3GEOtabelatabelai class=lista8 >";
931 1131 npsortfim = psortfim.length;
932   - for (p=0;p<npsortfim;p++)
933   - {
  1132 + for (p = 0; p < npsortfim; p++) {
934 1133 e = psortfim[p].split("+")[1] * 1;
935   - if (trs[e] !== undefined)
936   - {ins += "<tr>" + trs[e].innerHTML + "</tr>";}
  1134 + if (trs[e] !== undefined) {
  1135 + ins += "<tr>" + trs[e].innerHTML + "</tr>";
  1136 + }
937 1137 }
938   - $i(idjanela+"i3GEOtabelaregistros").innerHTML = ins+"</table>";
  1138 + $i(idjanela + "i3GEOtabelaregistros").innerHTML = ins + "</table>";
939 1139 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
940   - }
941   - catch(e){
  1140 + } catch (e) {
942 1141 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
943   - if(typeof(console) !== 'undefined'){console.error(e);}
  1142 + if (typeof (console) !== 'undefined') {
  1143 + console.error(e);
  1144 + }
944 1145 }
945 1146 },
946   - excluiLinha: function(celula){
  1147 + excluiLinha : function(celula) {
947 1148 var p = celula.parentNode.parentNode;
948   - do{
  1149 + do {
949 1150 p.removeChild(p.childNodes[0]);
950 1151 } while (p.childNodes.length > 0);
951 1152 p.parentNode.removeChild(p);
952 1153 },
953   - zoomExt: function(ext,idjanela){
954   - if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible")
955   - {return;}
  1154 + zoomExt : function(ext, idjanela) {
  1155 + if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") {
  1156 + return;
  1157 + }
956 1158 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible";
957   - var funcao = function(){
  1159 + var funcao = function() {
958 1160 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
959 1161 i3GEOF.tabela.pegaRegistros(idjanela);
960 1162 i3GEO.atualiza();
961 1163 };
962   - i3GEO.php.mudaext(funcao,"nenhum",ext);
  1164 + i3GEO.php.mudaext(
  1165 + funcao,
  1166 + "nenhum",
  1167 + ext);
963 1168 },
964   - registraLinha: function(linha,idjanela){
  1169 + registraLinha : function(linha, idjanela) {
965 1170 i3GEOF.tabela.propJanelas[idjanela].registros[linha.name] = linha.checked;
966   - i3GEOF.tabela.vinculos.atualizaVinculos(idjanela,linha.name,linha.checked);
  1171 + i3GEOF.tabela.vinculos.atualizaVinculos(
  1172 + idjanela,
  1173 + linha.name,
  1174 + linha.checked);
967 1175 },
968 1176 /*
969   - Function: listaMarcados
970   -
971   - Retorna um array com os &iacute;ndices dos registros que est&atilde;o marcados.
  1177 + * Function: listaMarcados
  1178 + *
  1179 + * Retorna um array com os &iacute;ndices dos registros que est&atilde;o marcados.
972 1180 */
973   - listaMarcados: function(idjanela){
974   - var lista = [],
975   - registros = i3GEOF.tabela.propJanelas[idjanela].registros,
976   - i,
977   - n = registros.length;
978   - for (i=0;i<n;i++){
979   - if (registros[i] === true){
  1181 + listaMarcados : function(idjanela) {
  1182 + var lista = [], registros = i3GEOF.tabela.propJanelas[idjanela].registros, i, n = registros.length;
  1183 + for (i = 0; i < n; i++) {
  1184 + if (registros[i] === true) {
980 1185 lista.push(i);
981 1186 }
982 1187 }
983 1188 return lista;
984 1189 },
985 1190 /*
986   - Function: ativaSelecao
987   -
988   - Seleciona no mapa os elementos que estiverem marcados na guia 2
989   -
990   - Veja:
991   -
992   - <INCLUISEL>
  1191 + * Function: ativaSelecao
  1192 + *
  1193 + * Seleciona no mapa os elementos que estiverem marcados na guia 2
  1194 + *
  1195 + * Veja:
  1196 + *
  1197 + * <INCLUISEL>
993 1198 */
994   - ativaSelecao: function(idjanela){
995   - if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible")
996   - {return;}
  1199 + ativaSelecao : function(idjanela) {
  1200 + if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") {
  1201 + return;
  1202 + }
997 1203 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible";
998   - var lista = i3GEOF.tabela.listaMarcados(idjanela),
999   - p,
1000   - cp,
1001   - temp = function(retorno){
1002   - if(retorno){
1003   - i3GEO.Interface.atualizaTema(retorno,i3GEOF.tabela.propJanelas[idjanela].tema);
  1204 + var lista = i3GEOF.tabela.listaMarcados(idjanela), p, cp, temp = function(retorno) {
  1205 + if (retorno) {
  1206 + i3GEO.Interface.atualizaTema(
  1207 + retorno,
  1208 + i3GEOF.tabela.propJanelas[idjanela].tema);
1004 1209 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
1005 1210 }
1006 1211 };
1007   - p = i3GEO.configura.locaplic+"/ferramentas/tabela/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=incluisel&tema="+i3GEOF.tabela.propJanelas[idjanela].tema+"&ids="+lista.toString();
  1212 + p =
  1213 + i3GEO.configura.locaplic + "/ferramentas/tabela/exec.php?g_sid=" + i3GEO.configura.sid + "&funcao=incluisel&tema=" +
  1214 + i3GEOF.tabela.propJanelas[idjanela].tema + "&ids=" + lista.toString();
1008 1215 cp = new cpaint();
1009 1216 cp.set_response_type("JSON");
1010   - cp.call(p,"incluiSel",temp);
  1217 + cp.call(
  1218 + p,
  1219 + "incluiSel",
  1220 + temp);
1011 1221 },
1012 1222 /*
1013   - Function: limpaSelecao
1014   -
1015   - Limpa a sele&ccedil;&atilde;o do tema da tabela
  1223 + * Function: limpaSelecao
  1224 + *
  1225 + * Limpa a sele&ccedil;&atilde;o do tema da tabela
1016 1226 */
1017   - limpaSelecao: function(idjanela){
1018   - if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible")
1019   - {return;}
  1227 + limpaSelecao : function(idjanela) {
  1228 + if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") {
  1229 + return;
  1230 + }
1020 1231 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible";
1021 1232 i3GEO.tema.limpasel(i3GEOF.tabela.propJanelas[idjanela].tema);
1022 1233 i3GEOF.tabela.propJanelas[idjanela].registros = [];
1023   - var lista = $i(idjanela+"i3GEOtabelatabelai").getElementsByTagName("input"),
1024   - n = lista.length,
1025   - i;
1026   - for(i=0;i<n;i++){
  1234 + var lista = $i(
  1235 + idjanela + "i3GEOtabelatabelai").getElementsByTagName(
  1236 + "input"), n = lista.length, i;
  1237 + for (i = 0; i < n; i++) {
1027 1238 lista[i].checked = false;
1028 1239 }
1029 1240 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
1030 1241 },
1031 1242 /*
1032   - Function: criaNovoTema
1033   -
1034   - Cria um novo tema contendo a sele&ccedil;&atilde;o existente
  1243 + * Function: criaNovoTema
  1244 + *
  1245 + * Cria um novo tema contendo a sele&ccedil;&atilde;o existente
1035 1246 */
1036   - criaNovoTema: function(idjanela){
1037   - if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible")
1038   - {return;}
  1247 + criaNovoTema : function(idjanela) {
  1248 + if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") {
  1249 + return;
  1250 + }
1039 1251 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible";
1040   - var temp = function(retorno){
  1252 + var temp = function(retorno) {
1041 1253 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
1042 1254 i3GEO.atualiza(retorno);
1043 1255 };
1044   - i3GEO.php.criatemaSel(temp,i3GEOF.tabela.propJanelas[idjanela].tema);
  1256 + i3GEO.php.criatemaSel(
  1257 + temp,
  1258 + i3GEOF.tabela.propJanelas[idjanela].tema);
1045 1259 },
1046 1260 /*
1047   - Function: comboItens
1048   -
1049   - Cria um combo para selecionar um item do tema escolhido
  1261 + * Function: comboItens
  1262 + *
  1263 + * Cria um combo para selecionar um item do tema escolhido
1050 1264 */
1051   - comboItensEstat: function(idjanela){
  1265 + comboItensEstat : function(idjanela) {
1052 1266 var tema = i3GEOF.tabela.propJanelas[idjanela].tema;
1053 1267 i3GEO.util.comboItens(
1054   - idjanela+"i3GEOtabelaComboItensGuia3",
1055   - tema,
1056   - function(retorno){
1057   - if(retorno.tipo === "erro"){
1058   - $i(idjanela+"i3GEOtabelaitensGuia3").innerHTML = "<br><br><span style='color:red'>"+$trad(32,i3GEOF.tabela.dicionario)+"</span><br><br>";
1059   - }
1060   - else{
1061   - $i(idjanela+"i3GEOtabelaitensGuia3").innerHTML = retorno.dados;
1062   - }
1063   - },
1064   - idjanela+"i3GEOtabelaitensGuia3",
1065   - ""
1066   - );
  1268 + idjanela + "i3GEOtabelaComboItensGuia3",
  1269 + tema,
  1270 + function(retorno) {
  1271 + if (retorno.tipo === "erro") {
  1272 + $i(idjanela + "i3GEOtabelaitensGuia3").innerHTML = "<br><br><span style='color:red'>" + $trad(
  1273 + 32,
  1274 + i3GEOF.tabela.dicionario) + "</span><br><br>";
  1275 + } else {
  1276 + $i(idjanela + "i3GEOtabelaitensGuia3").innerHTML = retorno.dados;
  1277 + }
  1278 + },
  1279 + idjanela + "i3GEOtabelaitensGuia3",
  1280 + "");
1067 1281 },
1068   - estatistica: function(idjanela){
1069   - if($i(idjanela+"i3GEOtabelaComboItensGuia3").value === ""){
  1282 + estatistica : function(idjanela) {
  1283 + if ($i(idjanela + "i3GEOtabelaComboItensGuia3").value === "") {
1070 1284 i3GEO.janela.tempoMsg("Escolha um item!");
1071 1285 return;
1072 1286 }
1073   - if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible")
1074   - {return;}
  1287 + if (i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") {
  1288 + return;
  1289 + }
1075 1290 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible";
1076   - try{
1077   - var monta = function (retorno){
1078   - var ins = "",
1079   - nome,
1080   - valor,
1081   - i,
1082   - n;
1083   - if(retorno.data.indices !== undefined){
1084   - if (retorno.data.indices){
  1291 + try {
  1292 + var monta = function(retorno) {
  1293 + var ins = "", nome, valor, i, n;
  1294 + if (retorno.data.indices !== undefined) {
  1295 + if (retorno.data.indices) {
1085 1296 n = retorno.data.indices.length;
1086   - for (i=0;i<n;i++){
1087   - nome = eval("retorno.data.variaveis."+retorno.data.indices[i]);
1088   - valor = eval("retorno.data.valores."+retorno.data.indices[i]);
1089   - ins += "<p style='text-align:left'> <span style='color:gray'>"+nome+": </span>"+valor+"</p>";
  1297 + for (i = 0; i < n; i++) {
  1298 + nome = eval("retorno.data.variaveis." + retorno.data.indices[i]);
  1299 + valor = eval("retorno.data.valores." + retorno.data.indices[i]);
  1300 + ins += "<p style='text-align:left'> <span style='color:gray'>" + nome + ": </span>" + valor + "</p>";
1090 1301 }
1091 1302 }
1092   - }
1093   - else{
  1303 + } else {
1094 1304 ins = retorno.data;
1095 1305 }
1096   - $i(idjanela+"i3GEOtabelaoperacoes").innerHTML = ins + "<br>";
  1306 + $i(idjanela + "i3GEOtabelaoperacoes").innerHTML = ins + "<br>";
1097 1307 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
1098   - },
1099   - exclui = "",
1100   - cp = new cpaint(),
1101   - p;
1102   - if ($i(idjanela+"i3GEOtabelafiltro1").value !== "")
1103   - {exclui = $i("i3GEOtabelafiltro1").value;}
1104   - p = i3GEO.configura.locaplic+
1105   - "/ferramentas/tabela/exec.php?g_sid="+i3GEO.configura.sid+
1106   - "&funcao=estatistica&item="+$i(idjanela+"i3GEOtabelaComboItensGuia3").value+
1107   - "&tema="+i3GEOF.tabela.propJanelas[idjanela].tema+
1108   - "&exclui="+exclui+
1109   - "&ext="+i3GEO.parametros.mapexten;
  1308 + }, exclui = "", cp = new cpaint(), p;
  1309 + if ($i(idjanela + "i3GEOtabelafiltro1").value !== "") {
  1310 + exclui = $i("i3GEOtabelafiltro1").value;
  1311 + }
  1312 + p =
  1313 + i3GEO.configura.locaplic + "/ferramentas/tabela/exec.php?g_sid=" + i3GEO.configura.sid + "&funcao=estatistica&item=" +
  1314 + $i(idjanela + "i3GEOtabelaComboItensGuia3").value + "&tema=" + i3GEOF.tabela.propJanelas[idjanela].tema +
  1315 + "&exclui=" + exclui + "&ext=" + i3GEO.parametros.mapexten;
1110 1316 cp.set_response_type("JSON");
1111   - cp.call(p,"estatDescritivas",monta);
1112   - }catch(e){
  1317 + cp.call(
  1318 + p,
  1319 + "estatDescritivas",
  1320 + monta);
  1321 + } catch (e) {
1113 1322 i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden";
1114   - $i("operacoes").innerHTML = "Ocorreu um erro: "+e;
  1323 + $i("operacoes").innerHTML = "Ocorreu um erro: " + e;
1115 1324 }
1116 1325 },
1117   - tabelaTexto:function(){
  1326 + tabelaTexto : function() {
1118 1327 },
1119 1328 /*
1120   - Function: relatorioTabela
1121   -
1122   - Monta o relat&oacute;rio padr&atilde;o em uma nova janela
  1329 + * Function: relatorioTabela
  1330 + *
  1331 + * Monta o relat&oacute;rio padr&atilde;o em uma nova janela
1123 1332 */
1124   - relatorioTabela: function(idjanela){
1125   - try{
1126   - $i(idjanela+"i3GEOtabelatiporelh").value = "";
1127   - $i(idjanela+"i3GEOtabelaarearelh").value = $i(idjanela+"i3GEOtabelacalculaarea").checked;
1128   - $i(idjanela+"i3GEOtabelastatrelh").value = $i(idjanela+"i3GEOtabelacalculaestat").checked;
1129   - $i(idjanela+"i3GEOtabelaexcluirvalorh").value = $i(idjanela+"i3GEOtabelaexcestat").value;
1130   - $i(idjanela+"i3GEOtabelatemarelh").value=i3GEOF.tabela.propJanelas[idjanela].tema;
1131   - $i(idjanela+"i3GEOtabelag_sidh").value=i3GEO.configura.sid;
1132   - $i(idjanela+"i3GEOtabelaitemagruparelh").value=$i(idjanela+"i3GEOtabelaagrupaItem").value;
1133   - var inputs = $i(idjanela+"i3GEOtabelaitensrelatorio").getElementsByTagName("input"),
1134   - listai = [],
1135   - listaordem = [],
1136   - listanomes = [],
1137   - nome,ordem,
1138   - i,temp,
1139   - n = inputs.length;
1140   - for (i=0;i<n; i++){
1141   - if (inputs[i].type === "checkbox" && inputs[i].checked == true){
1142   - listai.push(inputs[i].id+";"+inputs[i].name);
1143   - nome = $i(inputs[i].id+inputs[i].name).value;
  1333 + relatorioTabela : function(idjanela) {
  1334 + try {
  1335 + $i(idjanela + "i3GEOtabelatiporelh").value = "";
  1336 + $i(idjanela + "i3GEOtabelaarearelh").value = $i(idjanela + "i3GEOtabelacalculaarea").checked;
  1337 + $i(idjanela + "i3GEOtabelastatrelh").value = $i(idjanela + "i3GEOtabelacalculaestat").checked;
  1338 + $i(idjanela + "i3GEOtabelaexcluirvalorh").value = $i(idjanela + "i3GEOtabelaexcestat").value;
  1339 + $i(idjanela + "i3GEOtabelatemarelh").value = i3GEOF.tabela.propJanelas[idjanela].tema;
  1340 + $i(idjanela + "i3GEOtabelag_sidh").value = i3GEO.configura.sid;
  1341 + $i(idjanela + "i3GEOtabelaitemagruparelh").value = $i(idjanela + "i3GEOtabelaagrupaItem").value;
  1342 + var inputs = $i(
  1343 + idjanela + "i3GEOtabelaitensrelatorio").getElementsByTagName(
  1344 + "input"), listai = [], listaordem = [], listanomes = [], nome, ordem, i, temp, n = inputs.length;
  1345 + for (i = 0; i < n; i++) {
  1346 + if (inputs[i].type === "checkbox" && inputs[i].checked == true) {
  1347 + listai.push(inputs[i].id + ";" + inputs[i].name);
  1348 + nome = $i(inputs[i].id + inputs[i].name).value;
1144 1349 listanomes.push(nome);
1145   - ordem = $i("ordem_"+inputs[i].id+inputs[i].name).value;
1146   - if(ordem === ""){
  1350 + ordem = $i("ordem_" + inputs[i].id + inputs[i].name).value;
  1351 + if (ordem === "") {
1147 1352 ordem = 0;
1148 1353 }
1149 1354 listaordem.push(ordem);
1150 1355 }
1151 1356 }
1152   - $i(idjanela+"i3GEOtabelaordemrel").value=listaordem;
1153   - $i(idjanela+"i3GEOtabelanomesrelh").value=listanomes;
1154   - $i(idjanela+"i3GEOtabelaitensrelh").value=listai;
1155   - temp = $i(idjanela+"i3GEOtabelarelatorio").action;
1156   - $i(idjanela+"i3GEOtabelarelatorio").action += "?ext="+i3GEO.parametros.mapexten;
1157   - $i(idjanela+"i3GEOtabelarelatorio").submit();
1158   - $i(idjanela+"i3GEOtabelarelatorio").action = temp;
1159   - }catch(e){i3GEO.janela.tempoMsg(e);}
  1357 + $i(idjanela + "i3GEOtabelaordemrel").value = listaordem;
  1358 + $i(idjanela + "i3GEOtabelanomesrelh").value = listanomes;
  1359 + $i(idjanela + "i3GEOtabelaitensrelh").value = listai;
  1360 + temp = $i(idjanela + "i3GEOtabelarelatorio").action;
  1361 + $i(idjanela + "i3GEOtabelarelatorio").action += "?ext=" + i3GEO.parametros.mapexten;
  1362 + $i(
  1363 + idjanela + "i3GEOtabelarelatorio").submit();
  1364 + $i(idjanela + "i3GEOtabelarelatorio").action = temp;
  1365 + } catch (e) {
  1366 + i3GEO.janela.tempoMsg(e);
  1367 + }
1160 1368 },
1161 1369 /*
1162   - Function: relatorioTexto
1163   -
1164   - Gera o relat&oacute;rio no formato CSV
  1370 + * Function: relatorioTexto
  1371 + *
  1372 + * Gera o relat&oacute;rio no formato CSV
1165 1373 */
1166   - relatorioTexto: function(){
1167   - try{
  1374 + relatorioTexto : function() {
  1375 + try {
1168 1376 $i("i3GEOtabelaarearelh").value = $i("i3GEOtabelacalculaarea").checked;
1169 1377 $i("i3GEOtabelastatrelh").value = $i("i3GEOtabelacalculaestat").checked;
1170 1378 $i("i3GEOtabelaexcluirvalorh").value = $i("i3GEOtabelaexcestat").value;
1171   - $i("i3GEOtabelatemarelh").value=i3GEOF.tabela.tema;
1172   - $i("i3GEOtabelag_sidh").value=i3GEO.configura.sid;
1173   - $i("i3GEOtabelaitemagruparelh").value=$i("i3GEOtabelaagrupaItem").value;
  1379 + $i("i3GEOtabelatemarelh").value = i3GEOF.tabela.tema;
  1380 + $i("i3GEOtabelag_sidh").value = i3GEO.configura.sid;
  1381 + $i("i3GEOtabelaitemagruparelh").value = $i("i3GEOtabelaagrupaItem").value;
1174 1382 $i("i3GEOtabelatiporelh").value = "csv";
1175   - var inputs = $i("i3GEOtabelaitensrelatorio").getElementsByTagName("input"),
1176   - listai = [],
1177   - listanomes = [],
1178   - nome,
1179   - i,temp,
1180   - n = inputs.length;
1181   - for (i=0;i<n; i++)
1182   - {
1183   - if (inputs[i].checked === true)
1184   - {
1185   - listai.push(inputs[i].id+";"+inputs[i].name);
1186   - nome = $i(inputs[i].id+inputs[i].name).value;
  1383 + var inputs = $i(
  1384 + "i3GEOtabelaitensrelatorio").getElementsByTagName(
  1385 + "input"), listai = [], listanomes = [], nome, i, temp, n = inputs.length;
  1386 + for (i = 0; i < n; i++) {
  1387 + if (inputs[i].checked === true) {
  1388 + listai.push(inputs[i].id + ";" + inputs[i].name);
  1389 + nome = $i(inputs[i].id + inputs[i].name).value;
1187 1390 listanomes.push(nome);
1188 1391 }
1189 1392 }
1190   - $i("i3GEOtabelanomesrelh").value=listanomes;
1191   - $i("i3GEOtabelaitensrelh").value=listai;
  1393 + $i("i3GEOtabelanomesrelh").value = listanomes;
  1394 + $i("i3GEOtabelaitensrelh").value = listai;
1192 1395 temp = $i("i3GEOtabelarelatorio").action;
1193   - $i("i3GEOtabelarelatorio").action += "?ext="+i3GEO.parametros.mapexten;
1194   - $i("i3GEOtabelarelatorio").submit();
  1396 + $i("i3GEOtabelarelatorio").action += "?ext=" + i3GEO.parametros.mapexten;
  1397 + $i(
  1398 + "i3GEOtabelarelatorio").submit();
1195 1399 $i("i3GEOtabelarelatorio").action = temp;
1196   - }catch(e){i3GEO.janela.tempoMsg(e);}
  1400 + } catch (e) {
  1401 + i3GEO.janela.tempoMsg(e);
  1402 + }
1197 1403 }
1198   -};
  1404 + };
... ...
formatEclipse.xml
... ... @@ -30,7 +30,7 @@
30 30 <setting id="org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
31 31 <setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
32 32 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
33   -<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_assignment" value="0"/>
  33 +<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_assignment" value="16"/>
34 34 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
35 35 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
36 36 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
... ... @@ -50,7 +50,7 @@
50 50 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
51 51 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
52 52 <setting id="org.eclipse.wst.jsdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
53   -<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="48"/>
  53 +<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="37"/>
54 54 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
55 55 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
56 56 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
... ... @@ -58,7 +58,7 @@
58 58 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
59 59 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
60 60 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
61   -<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation" value="49"/>
  61 +<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation" value="53"/>
62 62 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
63 63 <setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_objlit_initializer" value="1"/>
64 64 <setting id="org.eclipse.wst.jsdt.core.compiler.compliance" value="1.5"/>
... ... @@ -73,7 +73,7 @@
73 73 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
74 74 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
75 75 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
76   -<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
  76 +<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_array_initializer" value="1"/>
77 77 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
78 78 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
79 79 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
... ... @@ -88,7 +88,7 @@
88 88 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
89 89 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
90 90 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
91   -<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
  91 +<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_expressions_in_array_initializer" value="49"/>
92 92 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
93 93 <setting id="org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package" value="1"/>
94 94 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_comma_in_objlit_initializer" value="insert"/>
... ... @@ -144,9 +144,9 @@
144 144 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
145 145 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
146 146 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
147   -<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation" value="2"/>
  147 +<setting id="org.eclipse.wst.jsdt.core.formatter.continuation_indentation" value="1"/>
148 148 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
149   -<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_conditional_expression" value="80"/>
  149 +<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_conditional_expression" value="0"/>
150 150 <setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
151 151 <setting id="org.eclipse.wst.jsdt.core.formatter.comment.indent_parameter_description" value="true"/>
152 152 <setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
... ...