Commit df17ee6ce7b005bc946503a4e3c004f3bc51c537
1 parent
8a313e9c
Exists in
master
and in
7 other branches
Alterações na ferramenta tabela para permitir uso de multiplas janelas
Showing
4 changed files
with
109 additions
and
756 deletions
Show diff stats
ferramentas/graficointerativo1/index.js
ferramentas/identifica/index.js
... | ... | @@ -54,12 +54,6 @@ i3GEOF.identifica = { |
54 | 54 | janelas: [], |
55 | 55 | propJanelas: {}, |
56 | 56 | /* |
57 | - Variavel: aguarde | |
58 | - | |
59 | - Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. | |
60 | - */ | |
61 | - aguarde: "", | |
62 | - /* | |
63 | 57 | Propriedade: mostraLinkGeohack |
64 | 58 | |
65 | 59 | Mostra ou não o link para abrir o site GeoHack. |
... | ... | @@ -358,7 +352,7 @@ i3GEOF.identifica = { |
358 | 352 | } |
359 | 353 | i3GEOF.identifica.inicia(i3GEO.temaAtivo,objposicaocursor.ddx,objposicaocursor.ddy,divid,true,true,id); |
360 | 354 | $i(id+"_corpo").style.backgroundColor = "white"; |
361 | - i3GEOF.identifica.aguarde = $i(id+"_imagemCabecalho").style; | |
355 | + i3GEOF.identifica.propJanelas[id].aguarde = $i(id+"_imagemCabecalho").style; | |
362 | 356 | i3GEOF.identifica.propJanelas[id].atualiza = true; |
363 | 357 | temp = 'i3GEOF.identifica.propJanelas["'+id+'"].atualiza = this.checked'; |
364 | 358 | janela[0].setFooter("<div style=background-color:#F2F2F2; ><input class='inputsb' style='cursor:pointer;position:relative;top:2px;' checked onclick='"+temp+"' type=checkbox /> "+$trad(28,i3GEOF.identifica.dicionario)+"</div>"); |
... | ... | @@ -920,7 +914,7 @@ i3GEOF.identifica = { |
920 | 914 | resultados = retorno[i].resultado; |
921 | 915 | res += "<div style='padding-top:6px;left:2px;text-align:left;width:100%;' ><b>" + |
922 | 916 | retorno[i].nome + |
923 | - "<img onclick='i3GEOF.identifica.removeFiltro(\""+retorno[i].tema+"\")' style='margin-right:2px;position:relative;top:3px;width:10px;' src='"+i3GEO.configura.locaplic+"/imagens/oxygen/16x16/remove-filter.png' title='"+$trad(27,i3GEOF.identifica.dicionario)+"' />" + | |
917 | + "<img onclick='i3GEOF.identifica.removeFiltro(\""+retorno[i].tema+"\",\""+idjanela+"\")' style='margin-right:2px;position:relative;top:3px;width:10px;' src='"+i3GEO.configura.locaplic+"/imagens/oxygen/16x16/remove-filter.png' title='"+$trad(27,i3GEOF.identifica.dicionario)+"' />" + | |
924 | 918 | "</b></div>"; |
925 | 919 | //encontrou algo |
926 | 920 | if(resultados[0] !== " "){ |
... | ... | @@ -966,7 +960,7 @@ i3GEOF.identifica = { |
966 | 960 | else{ |
967 | 961 | tip = "<img style='margin-right:2px;position:relative;top:3px;width:12px;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' title='' />"; |
968 | 962 | } |
969 | - filtro = "onclick=i3GEOF.identifica.filtrar('"+retorno[i].tema+"','"+resultados[j][k].item+"','"+resultados[j][k].valor+"')"; | |
963 | + filtro = "onclick=i3GEOF.identifica.filtrar('"+retorno[i].tema+"','"+resultados[j][k].item+"','"+resultados[j][k].valor+"','"+idjanela+"')"; | |
970 | 964 | filtro = "<img "+filtro+" style='margin-right:2px;position:relative;top:3px;width:12px;' src='"+i3GEO.configura.locaplic+"/imagens/oxygen/16x16/view-filter.png' title='"+$trad(26,i3GEOF.identifica.dicionario)+"' />"; |
971 | 965 | if(resultados[j][k].link === ""){ |
972 | 966 | res += "<div style='width:100%;text-align:left;background-color:"+ |
... | ... | @@ -1010,13 +1004,13 @@ i3GEOF.identifica = { |
1010 | 1004 | $i(idjanela+"i3GEOidentificaocorrencia").innerHTML=res; |
1011 | 1005 | } |
1012 | 1006 | }, |
1013 | - filtrar: function(tema,item,valor){ | |
1014 | - if(i3GEOF.identifica.aguarde.visibility === "visible") | |
1007 | + filtrar: function(tema,item,valor,idjanela){ | |
1008 | + if(i3GEOF.identifica.propJanelas[idjanela].aguarde.visibility === "visible") | |
1015 | 1009 | {return;} |
1016 | - i3GEOF.identifica.aguarde.visibility = "visible"; | |
1010 | + i3GEOF.identifica.propJanelas[idjanela].aguarde.visibility = "visible"; | |
1017 | 1011 | var filtro = "(|["+item+"]| = |"+valor+"|)", |
1018 | 1012 | temp = function(retorno){ |
1019 | - i3GEOF.identifica.aguarde.visibility = "hidden"; | |
1013 | + i3GEOF.identifica.propJanelas[idjanela].aguarde.visibility = "hidden"; | |
1020 | 1014 | i3GEO.Interface.atualizaTema(retorno,tema); |
1021 | 1015 | }, |
1022 | 1016 | p = i3GEO.configura.locaplic+"/ferramentas/filtro/exec.php?base64=sim&g_sid="+i3GEO.configura.sid+"&funcao=inserefiltro", |
... | ... | @@ -1025,12 +1019,12 @@ i3GEOF.identifica = { |
1025 | 1019 | cp.set_transfer_mode('POST'); |
1026 | 1020 | cp.call(p,"insereFiltro",temp,"tema="+tema,"filtro="+i3GEO.util.base64encode(filtro)); |
1027 | 1021 | }, |
1028 | - removeFiltro: function(tema){ | |
1029 | - if(i3GEOF.identifica.aguarde.visibility === "visible") | |
1022 | + removeFiltro: function(tema,idjanela){ | |
1023 | + if(i3GEOF.identifica.propJanelas[idjanela].visibility === "visible") | |
1030 | 1024 | {return;} |
1031 | - i3GEOF.identifica.aguarde.visibility = "visible"; | |
1025 | + i3GEOF.identifica.propJanelas[idjanela].aguarde.visibility = "visible"; | |
1032 | 1026 | var temp = function(retorno){ |
1033 | - i3GEOF.identifica.aguarde.visibility = "hidden"; | |
1027 | + i3GEOF.identifica.propJanelas[idjanela].aguarde.visibility = "hidden"; | |
1034 | 1028 | i3GEO.Interface.atualizaTema(retorno,tema); |
1035 | 1029 | }, |
1036 | 1030 | p = i3GEO.configura.locaplic+"/ferramentas/filtro/exec.php?base64=nao&g_sid="+i3GEO.configura.sid+"&funcao=inserefiltro", | ... | ... |
ferramentas/tabela/dicionario.js
ferramentas/tabela/index.js
... | ... | @@ -11,53 +11,6 @@ i3GEOF.tabela = { |
11 | 11 | janelas: [], |
12 | 12 | propJanelas: {}, |
13 | 13 | /* |
14 | - Variavel: aguarde | |
15 | - | |
16 | - Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. | |
17 | - */ | |
18 | - aguarde: "", | |
19 | - /* | |
20 | - Variavel: tipoDeGrafico | |
21 | - | |
22 | - Guarda o tipo de grafico escolhido pelo usuário | |
23 | - */ | |
24 | - tipoDeGrafico: "", | |
25 | - /* | |
26 | - Variavel: tema | |
27 | - | |
28 | - Tema que será utilizado | |
29 | - | |
30 | - Type: | |
31 | - {string} | |
32 | - */ | |
33 | - tema: i3GEO.temaAtivo, | |
34 | - /* | |
35 | - Variavel: registros | |
36 | - | |
37 | - Guarda os índices dos registros escolhidos na tabela | |
38 | - | |
39 | - Type: | |
40 | - {array} | |
41 | - */ | |
42 | - registros: [], | |
43 | - /* | |
44 | - Variavel: parametros | |
45 | - | |
46 | - Parametros utilizados para o gráfico. | |
47 | - | |
48 | - É definido em função do tipo de gráfico escolhido | |
49 | - | |
50 | - Type: | |
51 | - {string} | |
52 | - */ | |
53 | - parametros: "", | |
54 | - /* | |
55 | - Variable: nomeArquivoGr | |
56 | - | |
57 | - Nome do arquivo gerado com os dados para o gráfico | |
58 | - */ | |
59 | - nomeArquivoGr: "", | |
60 | - /* | |
61 | 14 | Para efeitos de compatibilidade antes da versão 4.7 que não tinha dicionário |
62 | 15 | */ |
63 | 16 | criaJanelaFlutuante: function(){ |
... | ... | @@ -105,11 +58,10 @@ i3GEOF.tabela = { |
105 | 58 | } |
106 | 59 | }; |
107 | 60 | i3GEO.janela.comboCabecalhoTemas(idjanela+"i3GEOFtabelaComboCabeca",idjanela+"i3GEOFtabelaComboCabecaSel","tabela","ligadosComTabela",onButtonClick); |
108 | - if(i3GEOF.tabela.propJanelas[idjanela].tema === "" || i3GEOF.tabela.janelas.length > 1){ | |
61 | + if(i3GEOF.tabela.propJanelas[idjanela].tema === ""){ | |
109 | 62 | $i(iddiv).innerHTML = "";//'<p style="position: relative; top: 0px; font-size: 15px; text-align: left;">'+$trad("x33")+'</p>'; |
110 | 63 | return; |
111 | 64 | } |
112 | - //TODO | |
113 | 65 | try{ |
114 | 66 | $i(iddiv).innerHTML = i3GEOF.tabela.html(idjanela); |
115 | 67 | i3GEO.guias.mostraGuiaFerramenta(idjanela+"i3GEOtabelaguia1",idjanela+"i3GEOtabelaguia"); |
... | ... | @@ -126,10 +78,6 @@ i3GEOF.tabela = { |
126 | 78 | i3GEOF.tabela.comboItensEstat(idjanela); |
127 | 79 | } |
128 | 80 | }; |
129 | - $i(idjanela+"i3GEOtabelaguia4").onclick = function(){ | |
130 | - i3GEO.guias.mostraGuiaFerramenta(idjanela+"i3GEOtabelaguia4",idjanela+"i3GEOtabelaguia"); | |
131 | - i3GEOF.tabela.t0(idjanela); | |
132 | - }; | |
133 | 81 | //relatorio |
134 | 82 | $i(idjanela+"i3GEOtabelaguia5").onclick = function(){ |
135 | 83 | i3GEO.guias.mostraGuiaFerramenta(idjanela+"i3GEOtabelaguia5",idjanela+"i3GEOtabelaguia"); |
... | ... | @@ -184,7 +132,14 @@ i3GEOF.tabela = { |
184 | 132 | i3GEOF.tabela.pegaRegistros(idjanela); |
185 | 133 | }}} |
186 | 134 | ); |
187 | - | |
135 | + 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(); | |
140 | + } | |
141 | + }} | |
142 | + ); | |
188 | 143 | $i(idjanela+"i3GEOtabelabotaoLista-button").style.minHeight = "1em"; |
189 | 144 | $i(idjanela+"i3GEOtabelabotaoLista-button").style.padding = "0px 15px"; |
190 | 145 | $i(idjanela+"i3GEOtabelabotaoLista-button").style.lineHeight = "1.3"; |
... | ... | @@ -235,22 +190,14 @@ i3GEOF.tabela = { |
235 | 190 | 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>'; |
236 | 191 | ins += ' <li><a ><em><div id="'+idjanela+'i3GEOtabelaguia1" style="text-align:center;left:0px;" >'+$trad(3,i3GEOF.tabela.dicionario)+'</div></em></a></li>'; |
237 | 192 | ins += ' <li><a ><em><div id="'+idjanela+'i3GEOtabelaguia3" style="text-align:center;left:0px;" >'+$trad(4,i3GEOF.tabela.dicionario)+'</div></em></a></li>'; |
238 | - ins += ' <li><a ><em><div id="'+idjanela+'i3GEOtabelaguia4" style="text-align:center;left:0px;" >'+$trad("t37")+'</div></em></a></li>'; | |
239 | 193 | ins += ' <li><a ><em><div id="'+idjanela+'i3GEOtabelaguia5" style="text-align:center;left:0px;" >'+$trad(5,i3GEOF.tabela.dicionario)+'</div></em></a></li>'; |
240 | 194 | ins += '</ul>'; |
241 | 195 | ins += '</div><br>'; |
242 | 196 | ins += ' <div id='+idjanela+'i3GEOtabelaresultadotab style="background-color:#F2F2F2;position:relative;top:5px;left:0px"></div>'; |
197 | + //propriedades | |
243 | 198 | ins += ' <div id='+idjanela+'i3GEOtabelaguia6obj style="width:99%">'; |
244 | 199 | ins += ' <table summary="" class=lista2 >'; |
245 | 200 | ins += ' <tr>'; |
246 | - ins += ' <td><input style="cursor:pointer;border:0px solid white;" onclick="i3GEOF.tabela.pegaRegistros(\''+idjanela+'\')" type=checkbox id='+idjanela+'i3GEOtabelatiporeg CHECKED /></td>'; | |
247 | - ins += ' <td>'+$trad(6,i3GEOF.tabela.dicionario)+'</td>'; | |
248 | - ins += ' </tr>'; | |
249 | - ins += ' <tr>'; | |
250 | - ins += ' <td><input style="cursor:pointer;border:0px solid white;" type=checkbox onclick="i3GEOF.tabela.ativaAutoAtualiza(this)" /></td>'; | |
251 | - ins += ' <td>'+$trad(7,i3GEOF.tabela.dicionario)+'</td>'; | |
252 | - ins += ' </tr>'; | |
253 | - ins += ' <tr>'; | |
254 | 201 | ins += ' <td><input style="cursor:pointer;border:0px solid white;" onclick="i3GEOF.tabela.pegaRegistros(\''+idjanela+'\')" type=checkbox id='+idjanela+'i3GEOtabelatipolista /></td>'; |
255 | 202 | ins += ' <td>'+$trad(8,i3GEOF.tabela.dicionario)+'</td>'; |
256 | 203 | ins += ' </tr>'; |
... | ... | @@ -260,12 +207,14 @@ i3GEOF.tabela = { |
260 | 207 | ins += ' </tr>'; |
261 | 208 | ins += ' </table>'; |
262 | 209 | ins += ' </div>'; |
210 | + | |
263 | 211 | ins += ' <div id='+idjanela+'i3GEOtabelaguia1obj style="width:99%">'; |
264 | 212 | ins += ' <div id='+idjanela+'i3GEOtabelacombot style="position:relative;top:5px;left:0px;display:none;">'; |
265 | 213 | ins += ' </div>'; |
266 | 214 | ins += ' <input title="'+$trad(10,i3GEOF.tabela.dicionario)+'" id='+idjanela+'i3GEOtabelabotao2 size=25 type=button value="'+$trad(11,i3GEOF.tabela.dicionario)+'" />'; |
267 | 215 | ins += ' <input title="'+$trad(12,i3GEOF.tabela.dicionario)+'" id='+idjanela+'i3GEOtabelabotao3 size=25 type=button value="'+$trad(13,i3GEOF.tabela.dicionario)+'"/>'; |
268 | 216 | ins += ' <input title="'+$trad(14,i3GEOF.tabela.dicionario)+'" id='+idjanela+'i3GEOtabelabotao6 size=30 type=button value="'+$trad(15,i3GEOF.tabela.dicionario)+'"/>'; |
217 | + ins += ' <input type=button value="'+$trad("t37b")+'" id='+idjanela+'i3GEOtabelaGraficoI />'; | |
269 | 218 | 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;">'; |
270 | 219 | ins += ' '+$trad(16,i3GEOF.tabela.dicionario)+' <img style=cursor:pointer onclick="i3GEOF.tabela.menos(\''+idjanela+'\')" src="'+i3GEO.configura.locaplic+'/imagens/minus.gif" />'; |
271 | 220 | ins += $inputText("","",idjanela+"i3GEOtabelainicio","",5,"1"); |
... | ... | @@ -273,14 +222,13 @@ i3GEOF.tabela = { |
273 | 222 | ins += ' <img style=cursor:pointer onclick="i3GEOF.tabela.mais(\''+idjanela+'\')" src="'+i3GEO.configura.locaplic+'/imagens/plus.gif" />'; |
274 | 223 | ins += $inputText("","",idjanela+"i3GEOtabelafim","",5,"20"); |
275 | 224 | 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" />'; |
276 | - | |
277 | 225 | ins += ' <input title="'+$trad(18,i3GEOF.tabela.dicionario)+'" id='+idjanela+'i3GEOtabelabotaoLista size=25 style="position:relative;" type=button value="'+$trad(19,i3GEOF.tabela.dicionario)+'"/>'; |
278 | - | |
279 | - ins += ' <a href="#" onclick="i3GEOF.tabela.novaJanela()" >'+$trad(36,i3GEOF.tabela.dicionario)+'</a>'; | |
226 | + //ins += ' <a href="#" onclick="i3GEOF.tabela.novaJanela()" >'+$trad(36,i3GEOF.tabela.dicionario)+'</a>'; | |
280 | 227 | ins += ' </div>'; |
281 | 228 | ins += ' <div id='+idjanela+'i3GEOtabelaregistros style="position:relative;top:20px;left:0px;text-align:left;">'; |
282 | 229 | ins += ' </div>'; |
283 | 230 | ins += ' </div>'; |
231 | + | |
284 | 232 | ins += ' <div id='+idjanela+'i3GEOtabelaguia3obj style="display:none;width:99%;left:0px" >'; |
285 | 233 | ins += ' <p class="paragrafo" ><label>'+$trad(20,i3GEOF.tabela.dicionario)+':</label> <span id='+idjanela+'i3GEOtabelaitensGuia3 ></span>'; |
286 | 234 | ins += ' <p class="paragrafo" ><label>'+$trad(21,i3GEOF.tabela.dicionario)+':</label>'; |
... | ... | @@ -292,11 +240,7 @@ i3GEOF.tabela = { |
292 | 240 | ins += ' <p class="paragrafo" >'+$trad(23,i3GEOF.tabela.dicionario); |
293 | 241 | ins += ' </div>'; |
294 | 242 | ins += ' </div>'; |
295 | - ins += ' <div id='+idjanela+'i3GEOtabelaguia4obj style="display:none;width:99%;left:0px">'; | |
296 | - ins += ' <div style="top:5px;left:0px;display:block;background-color:white;" id="'+idjanela+'i3GEOtabelaresultado" >'; | |
297 | - ins += ' </div>'; | |
298 | - ins += ' </div>'; | |
299 | - | |
243 | + //relatorios | |
300 | 244 | ins += ' <div id='+idjanela+'i3GEOtabelaguia5obj style="width:99%;display:none">'; |
301 | 245 | ins += ' <p class="paragrafo" >'+$trad(24,i3GEOF.tabela.dicionario)+':'; |
302 | 246 | ins += ' <p class="paragrafo" ><div id='+idjanela+'i3GEOtabelaitensrelatorio class=digitar style="text-align:left;overflow:auto;height:100px">'; |
... | ... | @@ -333,10 +277,12 @@ i3GEOF.tabela = { |
333 | 277 | iniciaJanelaFlutuante: function(){ |
334 | 278 | var minimiza,cabecalho,janela,divid,temp,titulo, |
335 | 279 | id = "tabela"+parseInt(Math.random()*1000000,10); |
280 | + //i3GEO.janela.tempoMsg($trad(38,i3GEOF.tabela.dicionario)); | |
336 | 281 | i3GEOF.tabela.janelas.push(id); |
337 | 282 | i3GEOF.tabela.propJanelas[id] = {}; |
338 | 283 | i3GEOF.tabela.propJanelas[id].registros = []; |
339 | 284 | i3GEOF.tabela.propJanelas[id].tema = i3GEO.temaAtivo; |
285 | + i3GEOF.tabela.propJanelas[id].atualiza = false; | |
340 | 286 | |
341 | 287 | cabecalho = function(){ |
342 | 288 | i3GEOF.tabela.ativaFoco(id); |
... | ... | @@ -363,8 +309,8 @@ i3GEOF.tabela = { |
363 | 309 | minimiza, |
364 | 310 | "", |
365 | 311 | true, |
366 | - i3GEO.configura.locaplic+"/imagens/oxygen/16x16/view-form-table.png"//, | |
367 | - //duplica | |
312 | + i3GEO.configura.locaplic+"/imagens/oxygen/16x16/view-form-table.png", | |
313 | + duplica | |
368 | 314 | ); |
369 | 315 | divid = janela[2].id; |
370 | 316 | if(i3GEOF.tabela.janelas.length > 1){ |
... | ... | @@ -372,19 +318,34 @@ i3GEOF.tabela = { |
372 | 318 | janela[0].moveTo(temp.x.value + (i3GEOF.tabela.janelas.length * 50),temp.y.value + (i3GEOF.tabela.janelas.length * 15)); |
373 | 319 | } |
374 | 320 | $i(id+"_corpo").style.backgroundColor = "white"; |
375 | - i3GEOF.tabela.aguarde = $i(id+"_imagemCabecalho").style; | |
321 | + i3GEOF.tabela.propJanelas[id].aguarde = $i(id+"_imagemCabecalho").style; | |
376 | 322 | i3GEOF.tabela.propJanelas[id].atualiza = true; |
323 | + //indica se a janela sera atualizada na navegacao | |
377 | 324 | temp = 'i3GEOF.tabela.propJanelas["'+id+'"].atualiza = this.checked'; |
378 | - //janela[0].setFooter("<div style=background-color:#F2F2F2; ><input class='inputsb' style='cursor:pointer;position:relative;top:2px;' checked onclick='"+temp+"' type=checkbox /> "+$trad(41,i3GEOF.tabela.dicionario)+"</div>"); | |
325 | + janela[0].setFooter("<div style=background-color:#F2F2F2; ><input class='inputsb' style='cursor:pointer;position:relative;top:2px;' onclick='"+temp+"' type=checkbox /> "+$trad(41,i3GEOF.tabela.dicionario)+"</div>"); | |
379 | 326 | |
380 | 327 | |
381 | 328 | i3GEOF.tabela.inicia(divid,id); |
329 | + //inicia os eventos | |
330 | + if(i3GEO.Interface.ATUAL === "openlayers"){ | |
331 | + if(i3GEO.eventos.NAVEGAMAPA.toString().search('i3GEOF.tabela.atualizaListaDeRegistros()') < 0){ | |
332 | + i3GEO.eventos.NAVEGAMAPA.push("i3GEOF.tabela.atualizaListaDeRegistros()"); | |
333 | + } | |
334 | + } | |
335 | + if(i3GEO.Interface.ATUAL === "googlemaps" && !tabelaDragend){ | |
336 | + tabelaDragend = google.maps.event.addListener(i3GeoMap, "dragend", function() {i3GEOF.tabela.atualizaListaDeRegistros();}); | |
337 | + tabelaZoomend = google.maps.event.addListener(i3GeoMap, "zoomend", function() {i3GEOF.tebela.atualizaListaDeRegistros();}); | |
338 | + } | |
339 | + if(i3GEO.Interface.ATUAL === "googleearth" && !tabelaDragend){ | |
340 | + tabelaDragend = google.earth.addEventListener(i3GeoMap.getView(), "viewchangeend", function() {i3GEOF.tabela.atualizaListaDeRegistros();}); | |
341 | + } | |
342 | + | |
382 | 343 | temp = function(){ |
383 | 344 | i3GEOF.tabela.janelas.remove(id); |
384 | 345 | i3GEOF.tabela.propJanelas[id] = null; |
385 | 346 | if(i3GEOF.tabela.janelas.length === 0){ |
386 | - if(i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth"){ | |
387 | - i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.tabela.pegaRegistros('"+id+"')"); | |
347 | + if(i3GEO.Interface.ATUAL === "openlayers"){ | |
348 | + i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.tabela.atualizaListaDeRegistros()"); | |
388 | 349 | } |
389 | 350 | if(i3GEO.Interface.ATUAL === "googlemaps"){ |
390 | 351 | google.maps.event.removeListener(tabelaDragend); |
... | ... | @@ -393,9 +354,6 @@ i3GEOF.tabela = { |
393 | 354 | if(i3GEO.Interface.ATUAL === "googleearth"){ |
394 | 355 | google.earth.removeEventListener(tabelaDragend); |
395 | 356 | } |
396 | - //if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search('i3GEO.janela.comboCabecalhoTemas("'+id+'i3GEOFtabelaComboCabeca",""'+id+'i3GEOFtabelaComboCabecaSel","tabela","ligadosComTabela")') > 0){ | |
397 | - // i3GEO.eventos.ATUALIZAARVORECAMADAS.remove('i3GEO.janela.atualizaCombosCabecalhos()'); | |
398 | - //} | |
399 | 357 | } |
400 | 358 | }; |
401 | 359 | YAHOO.util.Event.addListener(janela[0].close, "click", temp); |
... | ... | @@ -521,7 +479,7 @@ i3GEOF.tabela = { |
521 | 479 | i3GEO.vincularTabelas.janelas.push(id); |
522 | 480 | i3GEO.vincularTabelas.colunas[id] = ""; |
523 | 481 | temp = function(retorno){ |
524 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | |
482 | + i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden"; | |
525 | 483 | if (retorno.data !== undefined){ |
526 | 484 | var ins, |
527 | 485 | i, |
... | ... | @@ -578,30 +536,14 @@ i3GEOF.tabela = { |
578 | 536 | |
579 | 537 | Ativa ou desativa a atualização automática da tabela quando o usuário navega no mapa |
580 | 538 | */ |
581 | - ativaAutoAtualiza:function(obj){ | |
582 | - //TODO | |
583 | - if(obj.checked == true){ | |
584 | - if(i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth"){ | |
585 | - i3GEO.eventos.NAVEGAMAPA.push("i3GEOF.tabela.pegaRegistros()"); | |
586 | - } | |
587 | - if(i3GEO.Interface.ATUAL === "googlemaps"){ | |
588 | - tabelaDragend = google.maps.event.addListener(i3GeoMap, "dragend", function() {i3GEOF.tabela.pegaRegistros();}); | |
589 | - tabelaZoomend = google.maps.event.addListener(i3GeoMap, "zoomend", function() {i3GEOF.tebela.pegaRegistros();}); | |
590 | - } | |
591 | - if(i3GEO.Interface.ATUAL === "googleearth"){ | |
592 | - tabelaDragend = google.earth.addEventListener(i3GeoMap.getView(), "viewchangeend", function() {i3GEOF.tabela.pegaRegistros();}); | |
593 | - } | |
594 | - } | |
595 | - else{ | |
596 | - if(i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth"){ | |
597 | - i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.tabela.pegaRegistros()"); | |
598 | - } | |
599 | - if(i3GEO.Interface.ATUAL === "googlemaps"){ | |
600 | - google.maps.event.removeListener(tabelaDragend); | |
601 | - google.maps.event.removeListener(tabelaZoomend); | |
602 | - } | |
603 | - if(i3GEO.Interface.ATUAL === "googleearth"){ | |
604 | - google.earth.removeEventListener(tabelaDragend); | |
539 | + atualizaListaDeRegistros:function(){ | |
540 | + var i, | |
541 | + janelas = i3GEOF.tabela.janelas, | |
542 | + propJanelas = i3GEOF.tabela.propJanelas, | |
543 | + n = janelas.length; | |
544 | + for(i=0;i<n;i++){ | |
545 | + if(propJanelas[janelas[i]].atualiza === true){ | |
546 | + i3GEOF.tabela.pegaRegistros(janelas[i]); | |
605 | 547 | } |
606 | 548 | } |
607 | 549 | }, |
... | ... | @@ -614,23 +556,20 @@ i3GEOF.tabela = { |
614 | 556 | |
615 | 557 | <LISTAREGISTROS> |
616 | 558 | */ |
617 | - pegaRegistros: function(idjanela,tiporeg,tipolista,dadosDaClasse,inicio,fim,funcao){ | |
618 | - if(i3GEOF.tabela.aguarde.visibility === "visible") | |
559 | + pegaRegistros: function(idjanela,tipolista,dadosDaClasse,inicio,fim,funcao){ | |
560 | + if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") | |
619 | 561 | {return;} |
620 | 562 | if(!idjanela){ |
621 | 563 | idjanela = ""; |
622 | 564 | } |
623 | - i3GEOF.tabela.aguarde.visibility = "visible"; | |
565 | + i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible"; | |
566 | + $i(idjanela+"i3GEOtabelaregistros").innerHTML = ""; | |
624 | 567 | var p,ext, |
568 | + tiporeg = "brasil", | |
625 | 569 | cp = new cpaint(); |
626 | - if(!tiporeg){ | |
627 | - if($i(idjanela+"i3GEOtabelatiporeg").checked){ | |
628 | - tiporeg = "mapa"; | |
629 | - i3GEO.janela.tempoMsg($trad(38,i3GEOF.tabela.dicionario)); | |
630 | - } | |
631 | - else{ | |
632 | - tiporeg = "brasil"; | |
633 | - } | |
570 | + //verifica se esta no modo de atualizacao automatica | |
571 | + if(i3GEOF.tabela.propJanelas[idjanela].atualiza === true){ | |
572 | + tiporeg = "mapa"; | |
634 | 573 | } |
635 | 574 | if(!tipolista){ |
636 | 575 | if ($i(idjanela+"i3GEOtabelatipolista").checked){ |
... | ... | @@ -662,6 +601,7 @@ i3GEOF.tabela = { |
662 | 601 | } |
663 | 602 | if(!funcao){ |
664 | 603 | funcao = function(retorno){ |
604 | + i3GEOF.tabela.propJanelas[idjanela].registros = []; | |
665 | 605 | i3GEOF.tabela.montaTabela(retorno,idjanela); |
666 | 606 | }; |
667 | 607 | } |
... | ... | @@ -752,7 +692,7 @@ i3GEOF.tabela = { |
752 | 692 | } |
753 | 693 | $i(idjanela+"i3GEOtabelaregistros").innerHTML = ins; |
754 | 694 | } |
755 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | |
695 | + i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden"; | |
756 | 696 | }, |
757 | 697 | /* |
758 | 698 | Function: mais |
... | ... | @@ -760,7 +700,7 @@ i3GEOF.tabela = { |
760 | 700 | Avança o contador de registros para a listagem |
761 | 701 | */ |
762 | 702 | mais:function(idjanela){ |
763 | - if(i3GEOF.tabela.aguarde.visibility === "visible") | |
703 | + if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") | |
764 | 704 | {return;} |
765 | 705 | var i = $i(idjanela+"i3GEOtabelainicio").value * 1, |
766 | 706 | f = $i(idjanela+"i3GEOtabelafim").value * 1, |
... | ... | @@ -775,7 +715,7 @@ i3GEOF.tabela = { |
775 | 715 | Avança o contador de registros para o fim da listagem |
776 | 716 | */ |
777 | 717 | todos:function(idjanela){ |
778 | - if(i3GEOF.tabela.aguarde.visibility === "visible") | |
718 | + if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") | |
779 | 719 | {return;} |
780 | 720 | $i(idjanela+"i3GEOtabelainicio").value = 1; |
781 | 721 | $i(idjanela+"i3GEOtabelafim").value = ""; |
... | ... | @@ -787,7 +727,7 @@ i3GEOF.tabela = { |
787 | 727 | Retrocede o contador de registros para a listagem |
788 | 728 | */ |
789 | 729 | menos: function(idjanela){ |
790 | - if(i3GEOF.tabela.aguarde.visibility === "visible") | |
730 | + if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") | |
791 | 731 | {return;} |
792 | 732 | var i = $i(idjanela+"i3GEOtabelainicio").value * 1, |
793 | 733 | f = $i(idjanela+"i3GEOtabelafim").value * 1, |
... | ... | @@ -807,7 +747,7 @@ i3GEOF.tabela = { |
807 | 747 | */ |
808 | 748 | excluiColuna: function(coluna,cid){ |
809 | 749 | //TODO |
810 | - i3GEOF.tabela.aguarde.visibility = "visible"; | |
750 | + i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible"; | |
811 | 751 | try{ |
812 | 752 | var tabela = $i(idjanela+"i3GEOtabelatabelai"), |
813 | 753 | trs, |
... | ... | @@ -834,9 +774,9 @@ i3GEOF.tabela = { |
834 | 774 | i.removeChild(ni); |
835 | 775 | } |
836 | 776 | } |
837 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | |
777 | + i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden"; | |
838 | 778 | }catch(e){ |
839 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | |
779 | + i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden"; | |
840 | 780 | if(typeof(console) !== 'undefined'){console.error(e);} |
841 | 781 | } |
842 | 782 | }, |
... | ... | @@ -846,7 +786,6 @@ i3GEOF.tabela = { |
846 | 786 | Ordena uma coluna da tabela |
847 | 787 | */ |
848 | 788 | ordenaColuna: function(coluna,cid){ |
849 | - i3GEOF.tabela.aguarde.visibility = "visible"; | |
850 | 789 | try{ |
851 | 790 | var tabela = $i("i3GEOtabelatabelai"), |
852 | 791 | trs = tabela.getElementsByTagName("tr"), |
... | ... | @@ -894,7 +833,6 @@ i3GEOF.tabela = { |
894 | 833 | {ins += "<tr>" + trs[e].innerHTML + "</tr>";} |
895 | 834 | } |
896 | 835 | $i("i3GEOtabelaregistros").innerHTML = ins+"</table>"; |
897 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | |
898 | 836 | } |
899 | 837 | catch(e){i3GEOF.tabela.aguarde.visibility = "hidden";if(typeof(console) !== 'undefined'){console.error(e);}} |
900 | 838 | }, |
... | ... | @@ -906,12 +844,11 @@ i3GEOF.tabela = { |
906 | 844 | p.parentNode.removeChild(p); |
907 | 845 | }, |
908 | 846 | zoomExt: function(ext,idjanela){ |
909 | - //TODO | |
910 | - if(i3GEOF.tabela.aguarde.visibility === "visible") | |
847 | + if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") | |
911 | 848 | {return;} |
912 | - i3GEOF.tabela.aguarde.visibility = "visible"; | |
849 | + i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible"; | |
913 | 850 | var funcao = function(){ |
914 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | |
851 | + i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden"; | |
915 | 852 | i3GEOF.tabela.pegaRegistros(idjanela); |
916 | 853 | i3GEO.atualiza(); |
917 | 854 | }; |
... | ... | @@ -947,16 +884,16 @@ i3GEOF.tabela = { |
947 | 884 | <INCLUISEL> |
948 | 885 | */ |
949 | 886 | ativaSelecao: function(idjanela){ |
950 | - if(i3GEOF.tabela.aguarde.visibility === "visible") | |
887 | + if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") | |
951 | 888 | {return;} |
952 | - i3GEOF.tabela.aguarde.visibility = "visible"; | |
889 | + i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible"; | |
953 | 890 | var lista = i3GEOF.tabela.listaMarcados(idjanela), |
954 | 891 | p, |
955 | 892 | cp, |
956 | 893 | temp = function(retorno){ |
957 | 894 | if(retorno){ |
958 | 895 | i3GEO.Interface.atualizaTema(retorno,i3GEOF.tabela.propJanelas[idjanela].tema); |
959 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | |
896 | + i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden"; | |
960 | 897 | } |
961 | 898 | }; |
962 | 899 | p = i3GEO.configura.locaplic+"/ferramentas/tabela/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=incluisel&tema="+i3GEOF.tabela.propJanelas[idjanela].tema+"&ids="+lista.toString(); |
... | ... | @@ -970,9 +907,9 @@ i3GEOF.tabela = { |
970 | 907 | Limpa a seleção do tema da tabela |
971 | 908 | */ |
972 | 909 | limpaSelecao: function(idjanela){ |
973 | - if(i3GEOF.tabela.aguarde.visibility === "visible") | |
910 | + if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") | |
974 | 911 | {return;} |
975 | - i3GEOF.tabela.aguarde.visibility = "visible"; | |
912 | + i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible"; | |
976 | 913 | i3GEO.tema.limpasel(i3GEOF.tabela.propJanelas[idjanela].tema); |
977 | 914 | i3GEOF.tabela.propJanelas[idjanela].registros = []; |
978 | 915 | var lista = $i(idjanela+"i3GEOtabelatabelai").getElementsByTagName("input"), |
... | ... | @@ -981,7 +918,7 @@ i3GEOF.tabela = { |
981 | 918 | for(i=0;i<n;i++){ |
982 | 919 | lista[i].checked = false; |
983 | 920 | } |
984 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | |
921 | + i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden"; | |
985 | 922 | }, |
986 | 923 | /* |
987 | 924 | Function: criaNovoTema |
... | ... | @@ -989,11 +926,11 @@ i3GEOF.tabela = { |
989 | 926 | Cria um novo tema contendo a seleção existente |
990 | 927 | */ |
991 | 928 | criaNovoTema: function(idjanela){ |
992 | - if(i3GEOF.tabela.aguarde.visibility === "visible") | |
929 | + if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") | |
993 | 930 | {return;} |
994 | - i3GEOF.tabela.aguarde.visibility = "visible"; | |
931 | + i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible"; | |
995 | 932 | var temp = function(retorno){ |
996 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | |
933 | + i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden"; | |
997 | 934 | i3GEO.atualiza(retorno); |
998 | 935 | }; |
999 | 936 | i3GEO.php.criatemaSel(temp,i3GEOF.tabela.propJanelas[idjanela].tema); |
... | ... | @@ -1025,9 +962,9 @@ i3GEOF.tabela = { |
1025 | 962 | i3GEO.janela.tempoMsg("Escolha um item!"); |
1026 | 963 | return; |
1027 | 964 | } |
1028 | - if(i3GEOF.tabela.aguarde.visibility === "visible") | |
965 | + if(i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility === "visible") | |
1029 | 966 | {return;} |
1030 | - i3GEOF.tabela.aguarde.visibility = "visible"; | |
967 | + i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "visible"; | |
1031 | 968 | try{ |
1032 | 969 | var monta = function (retorno){ |
1033 | 970 | var ins = "", |
... | ... | @@ -1049,7 +986,7 @@ i3GEOF.tabela = { |
1049 | 986 | ins = retorno.data; |
1050 | 987 | } |
1051 | 988 | $i(idjanela+"i3GEOtabelaoperacoes").innerHTML = ins + "<br>"; |
1052 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | |
989 | + i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden"; | |
1053 | 990 | }, |
1054 | 991 | exclui = "", |
1055 | 992 | cp = new cpaint(), |
... | ... | @@ -1065,606 +1002,27 @@ i3GEOF.tabela = { |
1065 | 1002 | cp.set_response_type("JSON"); |
1066 | 1003 | cp.call(p,"estatDescritivas",monta); |
1067 | 1004 | }catch(e){ |
1068 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | |
1005 | + i3GEOF.tabela.propJanelas[idjanela].aguarde.visibility = "hidden"; | |
1069 | 1006 | $i("operacoes").innerHTML = "Ocorreu um erro: "+e; |
1070 | 1007 | } |
1071 | 1008 | }, |
1072 | 1009 | tabelaTexto:function(){ |
1073 | 1010 | }, |
1074 | - t0: function(idjanela){ | |
1075 | - $i(idjanela+"i3GEOtabelaresultado").innerHTML = ""; | |
1076 | - var ins = ""; | |
1077 | - ins += "<p class='paragrafo' >"+$trad(33,i3GEOF.tabela.dicionario)+"."; | |
1078 | - ins += "<p class='paragrafo' ><a href='http://www.r-project.org/' target=blank >"+$trad(34,i3GEOF.tabela.dicionario); | |
1079 | - ins += "<p class='paragrafo' ><input type=button value='"+$trad("t37b")+"' id="+idjanela+"i3GEOtabelaGraficoI /></p>"; | |
1080 | - ins += "<br><br><p class='paragrafo' >"+$trad(35,i3GEOF.tabela.dicionario)+"."; | |
1081 | - | |
1082 | - i3GEO.util.proximoAnterior("","i3GEOF.tabela.t1('"+idjanela+"')",ins,idjanela+"i3GEOFtabelat0",idjanela+"i3GEOtabelaresultado"); | |
1083 | - new YAHOO.widget.Button( | |
1084 | - idjanela+"i3GEOtabelaGraficoI", | |
1085 | - {onclick:{fn: function(){ | |
1086 | - i3GEO.mapa.ativaTema(i3GEOF.tabela.propJanelas[idjanela].tema); | |
1087 | - i3GEO.analise.dialogo.graficoInterativo(); | |
1088 | - } | |
1089 | - }} | |
1090 | - ); | |
1091 | - | |
1092 | - }, | |
1093 | - t1: function(idjanela){ | |
1094 | - var ins = "<p class='paragrafo' >Escolha o tipo de gráfico:</p>"; | |
1095 | - ins += "<table><tr>"; | |
1096 | - ins += "<td><img title='Pizza' onclick='javascript:i3GEOF.tabela.tipoDeGrafico=\"pie\";i3GEOF.tabela.validaT1('"+idjanela+"')' style='cursor:pointer' src='"+i3GEO.configura.locaplic+"/imagens/grtorta.png' /></td>"; | |
1097 | - ins += "<td><img title='Barras' onclick='javascript:i3GEOF.tabela.tipoDeGrafico=\"barplot\";i3GEOF.tabela.validaT1('"+idjanela+"')' style='cursor:pointer' src='"+i3GEO.configura.locaplic+"/imagens/grbarras.png' /></td>"; | |
1098 | - ins += "<td><img title='histograma' onclick='javascript:i3GEOF.tabela.tipoDeGrafico=\"hist\";i3GEOF.tabela.validaT1('"+idjanela+"')' style='cursor:pointer' src='"+i3GEO.configura.locaplic+"/imagens/grhist.png' /></td>"; | |
1099 | - ins += "<tr><td> </td><td></td><td></td></tr>"; | |
1100 | - ins += "<tr><td><img title='linhas' onclick='javascript:i3GEOF.tabela.tipoDeGrafico=\"linhas\";i3GEOF.tabela.validaT1('"+idjanela+"')' style='cursor:pointer' src='"+i3GEO.configura.locaplic+"/imagens/grlinhas.png' /></td>"; | |
1101 | - ins += "<td><img onclick='javascript:i3GEOF.tabela.tipoDeGrafico=\"scatter\";i3GEOF.tabela.validaT1('"+idjanela+"')' style='cursor:pointer' src='"+i3GEO.configura.locaplic+"/imagens/grdisp.png' /></td>"; | |
1102 | - ins += "<td><img onclick='javascript:i3GEOF.tabela.tipoDeGrafico=\"scatterbins\";i3GEOF.tabela.validaT1('"+idjanela+"')' style='cursor:pointer' src='"+i3GEO.configura.locaplic+"/imagens/grscatterbins.png' /></td>"; | |
1103 | - ins += "</table></tr>"; | |
1104 | - i3GEO.util.proximoAnterior("i3GEOF.tabela.t0('"+idjanela+"')","i3GEOF.tabela.validaT1('"+idjanela+"')",ins,"i3GEOF.tabela.t1('"+idjanela+"')",idjanela+"i3GEOtabelaresultado"); | |
1105 | - }, | |
1106 | - validaT1: function(idjanela){ | |
1107 | - if (i3GEOF.tabela.tipoDeGrafico === ""){ | |
1108 | - i3GEO.janela.tempoMsg("Selecione um tipo de Grafico"); | |
1109 | - i3GEOF.tabela.t1(idjanela); | |
1110 | - } | |
1111 | - else{ | |
1112 | - if(i3GEOF.tabela.aguarde.visibility === "visible") | |
1113 | - {return;} | |
1114 | - i3GEOF.tabela.aguarde.visibility = "visible"; | |
1115 | - i3GEO.util.comboItens( | |
1116 | - idjanela+"i3GEOFtabelagi1", | |
1117 | - i3GEOF.tabela.tema, | |
1118 | - function(retorno){ | |
1119 | - i3GEOF.tabela.t2(retorno.dados,retorno.dados.replace("i3GEOFtabelagi1","i3GEOFtabelagi2"),idjanela); | |
1120 | - } | |
1121 | - ); | |
1122 | - } | |
1123 | - }, | |
1124 | - t2:function(combo1,combo2,idjanela){ | |
1125 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | |
1126 | - var ins = "<p class='paragrafo' >Item com os valores ou eixo y:"; | |
1127 | - ins += "<p class='paragrafo' >"+combo1; | |
1128 | - if ((i3GEOF.tabela.tipoDeGrafico !== "hist")) | |
1129 | - { | |
1130 | - ins += "<p class='paragrafo' >Item com as categorias ou eixo x:<br>"; | |
1131 | - ins += "<p class='paragrafo' >"+combo2; | |
1132 | - } | |
1133 | - if ((i3GEOF.tabela.tipoDeGrafico !== "hist") && (i3GEOF.tabela.tipoDeGrafico !== "scatter") && (i3GEOF.tabela.tipoDeGrafico !== "scatterbins")) | |
1134 | - { | |
1135 | - ins += "<p class='paragrafo' >Os valores serão agrupados pelas categorias por:"; | |
1136 | - ins += "<p class='paragrafo' ><select id="+idjanela+"i3GEOtabelaagrupar >"; | |
1137 | - ins += "<option value=soma SELECTED >soma</option>"; | |
1138 | - ins += "<option value=conta >contagem</option>"; | |
1139 | - ins += "<option value=media >média</option></select>"; | |
1140 | - } | |
1141 | - ins += "<p class='paragrafo' >Excluir valores:"; | |
1142 | - ins += "<p class='paragrafo' ><input onclick='javascript:this.select();' class=digitar type=text value='' size=4 id="+idjanela+"i3GEOtabelagexcluir />"; | |
1143 | - i3GEO.util.proximoAnterior("i3GEOF.tabela.t1('"+idjanela+"')","i3GEOF.tabela.t3('"+idjanela+"')",ins,"i3GEOF.tabela.t2('"+idjanela+"')","i3GEOtabelaresultado"); | |
1144 | - }, | |
1145 | - t3: function(idjanela){ | |
1146 | - if(i3GEOF.tabela.aguarde.visibility === "visible") | |
1147 | - {return;} | |
1148 | - i3GEOF.tabela.aguarde.visibility = "visible"; | |
1149 | - var temp, | |
1150 | - i, | |
1151 | - n; | |
1152 | - if (i3GEOF.tabela.tipoDeGrafico === "pie") | |
1153 | - {i3GEOF.tabela.parametros = "radius,Tgrid,border,Bgrafico,margem,margemexterna,margeminterna,Ttitulo,main,fontmain,cexmain,colmain,Tsubtitulo,sub,fontsub,cexsub,Trotulos,cex,font,Toutros,lty,bg,gw,gh,res,percentual";} | |
1154 | - if (i3GEOF.tabela.tipoDeGrafico === "barplot") | |
1155 | - {i3GEOF.tabela.parametros = "Tgrid,grid,border,Bgrafico,margem,margemexterna,margeminterna,Ttitulo,main,fontmain,cexmain,colmain,Tsubtitulo,sub,fontsub,cexsub,Teixo,ylab,xlab,cexlab,collab,fontlab,Trotulos,font,las,cexaxis,Toutros,space,bg,gw,gh,res,percentual,setasdv";} | |
1156 | - if (i3GEOF.tabela.tipoDeGrafico === "hist") | |
1157 | - {i3GEOF.tabela.parametros = "Tgrid,grid,border,Bgrafico,margem,margemexterna,margeminterna,Ttitulo,main,fontmain,cexmain,colmain,Tsubtitulo,sub,fontsub,cexsub,Teixo,ylab,xlab,cexlab,collab,fontlab,las,Trotulos,cexaxis,font,Toutros,corbarras,breaks,lwd,bg,gw,gh,res,densidade";} | |
1158 | - if (i3GEOF.tabela.tipoDeGrafico === "linhas") | |
1159 | - {i3GEOF.tabela.parametros = "Tgrid,grid,border,Bgrafico,margem,margemexterna,margeminterna,Ttitulo,main,fontmain,cexmain,colmain,Tsubtitulo,sub,fontsub,cexsub,Teixo,ylab,xlab,cexlab,collab,fontlab,las,Trotulos,cexaxis,colaxis,Toutros,pch,spline,tpt,ppontos,lty,tck,lwd,bg,gw,gh,res";} | |
1160 | - if (i3GEOF.tabela.tipoDeGrafico === "scatter") | |
1161 | - {i3GEOF.tabela.parametros = "grid,border,Bgrafico,margem,margemexterna,margeminterna,Ttitulo,main,fontmain,cexmain,colmain,Tsubtitulo,sub,fontsub,cexsub,Teixo,ylab,xlab,cexlab,collab,fontlab,las,Trotulos,cexaxis,colaxis,Toutros,pch,tpt,ppontos,lty,tck,lwd,bg,gw,gh,res,corlinha";} | |
1162 | - if (i3GEOF.tabela.tipoDeGrafico === "scatterbins") | |
1163 | - {i3GEOF.tabela.parametros = "grid,border,Bgrafico,margem,margemexterna,margeminterna,Ttitulo,main,fontmain,cexmain,colmain,Tsubtitulo,sub,fontsub,cexsub,Teixo,ylab,xlab,cexlab,collab,fontlab,las,Trotulos,cexaxis,colaxis,Toutros,pch,tpt,ppontos,lty,tck,lwd,bg,gw,gh,res,corlinha,nbins,plota3d";} | |
1164 | - | |
1165 | - ins = "<p class='paragrafo' > <input id="+idjanela+"i3GEOtabelabotao7 type=button value='Gera em uma nova janela' size=15 />"; | |
1166 | - ins += "<input id="+idjanela+"i3GEOtabelabotao10 type=button value='Nessa janela' size=15 />"; | |
1167 | - ins += "<input id="+idjanela+"i3GEOtabelabotao8 type=button value='Fusão' size=30 /><br>"; | |
1168 | - ins += "<div id="+idjanela+"i3GEOtabelaimgG ></div>"; | |
1169 | - ins += "<br><br><table class=lista5 >"; | |
1170 | - ins += "<tr><td><b>Tamanho da figura</b></td><td></td></tr>"; | |
1171 | - ins += "<tr><td>Largura em pixels</td>"; | |
1172 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value=400 size=20 id='"+idjanela+"i3GEOtabelagw' /></td></tr>"; | |
1173 | - ins += "<tr><td>Altura em pixels</td>"; | |
1174 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value=400 size=20 id='"+idjanela+"i3GEOtabelagh' /></td></tr>"; | |
1175 | - ins += "<tr><td>Resolução em dpi</td>"; | |
1176 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value=72 size=20 id='"+idjanela+"i3GEOtabelares' /></td></tr>"; | |
1177 | - | |
1178 | - temp = i3GEOF.tabela.parametros.split(","); | |
1179 | - n = temp.length; | |
1180 | - for(i=0;i < n;i++) | |
1181 | - {ins += i3GEOF.tabela.retornaPar(temp[i]);} | |
1182 | - ins += "</table>"; | |
1183 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | |
1184 | - i3GEO.util.proximoAnterior("i3GEOF.tabela.t1('"+idjanela+"')","",ins,"i3GEOF.tabela.t3('"+idjanela+"')",idjanela+"i3GEOtabelaresultado"); | |
1185 | - //TODO | |
1186 | - new YAHOO.widget.Button( | |
1187 | - "i3GEOtabelabotao7", | |
1188 | - {onclick:{fn: function(){i3GEOF.tabela.geraGrafico(i3GEOF.tabela.mostraGrafico);}}} | |
1189 | - ); | |
1190 | - new YAHOO.widget.Button( | |
1191 | - "i3GEOtabelabotao8", | |
1192 | - {onclick:{fn: i3GEOF.tabela.fusaoGrafico}} | |
1193 | - ); | |
1194 | - new YAHOO.widget.Button( | |
1195 | - "i3GEOtabelabotao10", | |
1196 | - {onclick:{fn: function(){i3GEOF.tabela.geraGrafico(i3GEOF.tabela.mostraImagem);}}} | |
1197 | - ); | |
1198 | - }, | |
1199 | - /* | |
1200 | - Function: retornaPar | |
1201 | - | |
1202 | - Monta os parametros adicionais de cada tipo de gráfico | |
1203 | - */ | |
1204 | - retornaPar: function(id){ | |
1205 | - try{ | |
1206 | - var ins = "", | |
1207 | - t = ""; | |
1208 | - if (id === "Tgrid") | |
1209 | - {ins += "<tr><td><b>Grade e bordas</b></td><td></td></tr>";} | |
1210 | - if (id === "Ttitulo") | |
1211 | - {ins += "<tr><td><b>Título</b></td><td></td></tr>";} | |
1212 | - if (id === "Tsubtitulo") | |
1213 | - {ins += "<tr><td><b>Sub-Título</b></td><td></td></tr>";} | |
1214 | - if (id === "Teixo") | |
1215 | - {ins += "<tr><td><b>Texto dos eixos</b></td><td></td></tr>";} | |
1216 | - if (id === "Trotulos") | |
1217 | - {ins += "<tr><td><b>Texto dos rótulos dos eixos</b></td><td></td></tr>";} | |
1218 | - if (id === "Toutros") | |
1219 | - {ins += "<tr><td><b>Outros</b></td><td></td></tr>";} | |
1220 | - if (id === "Bgrafico") | |
1221 | - {ins += "<tr><td><b>Margem do gráfico</b></td><td></td></tr>";} | |
1222 | - if (id === "corlinha"){ | |
1223 | - ins += "<tr><td>Cor da linha</td>"; | |
1224 | - ins += "<td>"+i3GEOF.tabela.combocor("i3GEOtabelacorlinha","1")+"</td></tr>"; | |
1225 | - } | |
1226 | - if (id === "corbarras"){ | |
1227 | - ins += "<tr><td>Cor das barras</td>"; | |
1228 | - ins += "<td>"+i3GEOF.tabela.combocor("i3GEOtabelacorbarras","0")+"</td></tr>"; | |
1229 | - } | |
1230 | - if (id === "plota3d"){ | |
1231 | - ins += "<tr><td>Plota em 3d?</td>"; | |
1232 | - ins += "<td>"+i3GEO.util.comboSimNao("i3GEOtabelaplota3d","nao")+"</td></tr>"; | |
1233 | - } | |
1234 | - if (id === "setasdv"){ | |
1235 | - ins += "<tr><td>Plota as marcas do desvio padrão?</td>"; | |
1236 | - ins += "<td>"+i3GEO.util.comboSimNao("i3GEOtabelasetasdv","nao")+"</td></tr>"; | |
1237 | - } | |
1238 | - tsl = []; if (id === "margem"){ | |
1239 | - ins += "<tr><td>Plota a margem?</td>"; | |
1240 | - ins += "<td>"+i3GEO.util.comboSimNao("i3GEOtabelamargem","sim")+"</td></tr>"; | |
1241 | - } | |
1242 | - if (id === "margemexterna"){ | |
1243 | - ins += "<tr><td>Margem externa</td>"; | |
1244 | - ins += "<td>"+i3GEOF.tabela.combocor("i3GEOtabelamargemexterna","0")+"</td></tr>"; | |
1245 | - } | |
1246 | - if (id === "margeminterna"){ | |
1247 | - ins += "<tr><td>Margem interna</td>"; | |
1248 | - ins += "<td>"+i3GEOF.tabela.combocor("i3GEOtabelamargeminterna","0")+"</td></tr>"; | |
1249 | - } | |
1250 | - if (id === "nbins"){ | |
1251 | - ins += "<tr><td>Número de divisões dos eixos</td>"; | |
1252 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value='40' size=20 id=i3GEOtabelanbins /></td></tr>"; | |
1253 | - } | |
1254 | - if (id === "breaks"){ | |
1255 | - ins += "<tr><td>Total de quebras</td>"; | |
1256 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value='20' size=20 id=i3GEOtabelabreaks /></td></tr>"; | |
1257 | - } | |
1258 | - if (id === "space"){ | |
1259 | - ins += "<tr><td>Espaçamento entre as barras</td>"; | |
1260 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value=0 size=20 id=i3GEOtabelaspace /></td></tr>"; | |
1261 | - } | |
1262 | - if (id === "grid"){ | |
1263 | - ins += "<tr><td>Plota a grade?</td>"; | |
1264 | - ins += "<td>"+i3GEO.util.comboSimNao("i3GEOtabelagrid","sim")+"</td></tr>"; | |
1265 | - } | |
1266 | - if (id === "radius"){ | |
1267 | - ins += "<tr><td>Redução da figura (-1 a 1)</td>"; | |
1268 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value='0.9' size=20 id=i3GEOtabelaradius /></td></tr>"; | |
1269 | - } | |
1270 | - if (id === "percentual"){ | |
1271 | - ins += "<tr><td>Plota o percentual nos rótulos?</td>"; | |
1272 | - ins += "<td>"+i3GEO.util.comboSimNao("i3GEOtabelapercentual","sim")+"</td></tr>"; | |
1273 | - } | |
1274 | - if (id === "densidade"){ | |
1275 | - ins += "<tr><td>Utiliza densidade</td>"; | |
1276 | - ins += "<td>"+i3GEO.util.comboSimNao("i3GEOtabeladensidade","nao")+"</td></tr>"; | |
1277 | - } | |
1278 | - if (id === "ann"){ | |
1279 | - ins += "<tr><td>Plota os textos?</td>"; | |
1280 | - ins += "<td>"+i3GEO.util.comboSimNao("i3GEOtabelaann","sim")+"</td></tr>"; | |
1281 | - } | |
1282 | - if (id === "adj"){ | |
1283 | - ins += "<tr><td>Posicionamento dos textos</td>"; | |
1284 | - ins += "<td><select name=adj id=i3GEOtabelaadj >"; | |
1285 | - ins += "<option value=0.5 SELECTED>centro</option>"; | |
1286 | - ins += "<option value=0 >esquerda</option>"; | |
1287 | - ins += "<option value=1 >direita</option>"; | |
1288 | - ins += "</select></td></tr>"; | |
1289 | - } | |
1290 | - if (id === "font"){ | |
1291 | - ins += '<tr><td>Estilo da fonte dos textos marginais</td>'; | |
1292 | - ins += '<td style="text-align:right">'; | |
1293 | - ins += '<select name="font" id=i3GEOtabelafont >'; | |
1294 | - ins += '<option value="2" selected >normal</option>'; | |
1295 | - ins += '<option value="3">negrito</option>'; | |
1296 | - ins += '<option value="4">itálico</option>'; | |
1297 | - ins += '<option value="5">negrito-itálico</option>'; | |
1298 | - ins += "</select>"; | |
1299 | - ins += '</td></tr>'; | |
1300 | - } | |
1301 | - if (id === "cex"){ | |
1302 | - ins += "<tr><td>Fator de escala</td>"; | |
1303 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value='.6' size=20 id=i3GEOtabelacex /></td></tr>"; | |
1304 | - } | |
1305 | - if (id === "main"){ | |
1306 | - t = ""; | |
1307 | - if ($i("i3GEOtabelagi1")) | |
1308 | - {t = $i("i3GEOtabelagi1").value;} | |
1309 | - if ($i("i3GEOtabelagi2")) | |
1310 | - {t += " " + $i("i3GEOtabelagi2").value;} | |
1311 | - ins += "<tr><td>Título</td>"; | |
1312 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value='"+t+"' size=20 id=i3GEOtabelamain /></td></tr>"; | |
1313 | - } | |
1314 | - if (id === "fontmain"){ | |
1315 | - ins += '<tr><td>Estilo</td>'; | |
1316 | - ins += '<td style="text-align:right">'; | |
1317 | - ins += '<select name="fontmain" id=i3GEOtabelafontmain >'; | |
1318 | - ins += '<option value="2" selected >normal</option>'; | |
1319 | - ins += '<option value="3">negrito</option>'; | |
1320 | - ins += '<option value="4">itálico</option>'; | |
1321 | - ins += '<option value="5">negrito-itálico</option>'; | |
1322 | - ins += "</select>"; | |
1323 | - ins += '</td></tr>'; | |
1324 | - } | |
1325 | - if (id === "cexmain"){ | |
1326 | - ins += "<tr><td>Fator de escala</td>"; | |
1327 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value=1 size=20 id=i3GEOtabelacexmain /></td></tr>"; | |
1328 | - } | |
1329 | - if (id === "colmain"){ | |
1330 | - ins += "<tr><td>Cor</td>"; | |
1331 | - ins += "<td>"+i3GEOF.tabela.combocor("i3GEOtabelacolmain","1")+"</td></tr>"; | |
1332 | - } | |
1333 | - tsl = []; | |
1334 | - if (id === "sub"){ | |
1335 | - ins += "<tr><td>Sub-Título</td>"; | |
1336 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value='' size=20 id=i3GEOtabelasub /></td></tr>"; | |
1337 | - } | |
1338 | - if (id === "fontsub"){ | |
1339 | - ins += '<tr><td>Estilo</td>'; | |
1340 | - ins += '<td style="text-align:right">'; | |
1341 | - ins += '<select id=i3GEOtabelafontsub >'; | |
1342 | - ins += '<option value="2" selected >normal</option>'; | |
1343 | - ins += '<option value="3">negrito</option>'; | |
1344 | - ins += '<option value="4">itálico</option>'; | |
1345 | - ins += '<option value="5">negrito-itálico</option>'; | |
1346 | - ins += "</select>"; | |
1347 | - ins += '</td></tr>'; | |
1348 | - } | |
1349 | - if (id === "cexsub"){ | |
1350 | - ins += "<tr><td>Fator de escala</td>"; | |
1351 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value=1 size=20 id=i3GEOtabelacexsub /></td></tr>"; | |
1352 | - } | |
1353 | - if (id === "colsub"){ | |
1354 | - ins += "<tr><td>Cor</td>"; | |
1355 | - ins += "<td>"+i3GEOF.tabela.combocor("i3GEOtabelacolsub","1")+"</td></tr>"; | |
1356 | - } | |
1357 | - if (id === "ylab"){ | |
1358 | - if ($i("i3GEOFtabelagi1")) | |
1359 | - {t = $i("i3GEOFtabelagi1").value;} | |
1360 | - if (i3GEOF.tabela.tipoDeGrafico === "hist") | |
1361 | - {t = "quantidade";} | |
1362 | - ins += "<tr><td>Nome do eixo y</td>"; | |
1363 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value='"+t+"' size=20 id=i3GEOtabelaylab /></td></tr>"; | |
1364 | - } | |
1365 | - if (id === "xlab"){ | |
1366 | - if ($i("i3GEOFtabelagi2")) | |
1367 | - {t = $i("i3GEOFtabelagi2").value;} | |
1368 | - if (i3GEOF.tabela.tipoDeGrafico === "hist") | |
1369 | - {t = "ocorrencias";} | |
1370 | - ins += "<tr><td>Nome do eixo x</td>"; | |
1371 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value='"+t+"' size=20 id=i3GEOtabelaxlab /></td></tr>"; | |
1372 | - } | |
1373 | - if (id === "cexaxis"){ | |
1374 | - ins += "<tr><td>Fator de escala</td>"; | |
1375 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value=.5 size=20 id=i3GEOtabelacexaxis /></td></tr>"; | |
1376 | - } | |
1377 | - if (id === "cexlab"){ | |
1378 | - ins += "<tr><td>Fator de escala</td>"; | |
1379 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value=1 size=20 id=i3GEOtabelacexlab /></td></tr>"; | |
1380 | - } | |
1381 | - if (id === "colaxis"){ | |
1382 | - ins += "<tr><td>Cor</td>"; | |
1383 | - ins += "<td>"+i3GEOF.tabela.combocor("i3GEOtabelacolaxis","1")+"</td></tr>"; | |
1384 | - } | |
1385 | - if (id === "collab"){ | |
1386 | - ins += "<tr><td>Cor</td>"; | |
1387 | - ins += "<td>"+i3GEOF.tabela.combocor("i3GEOtabelacollab","1")+"</td></tr>"; | |
1388 | - } | |
1389 | - if (id === "fontaxis"){ | |
1390 | - ins += '<tr><td>Estilo</td>'; | |
1391 | - ins += '<td style="text-align:right">'; | |
1392 | - ins += '<select id=i3GEOtabelafontaxis >'; | |
1393 | - ins += '<option value="2" selected >normal</option>'; | |
1394 | - ins += '<option value="3">negrito</option>'; | |
1395 | - ins += '<option value="4">itálico</option>'; | |
1396 | - ins += '<option value="5">negrito-itálico</option>'; | |
1397 | - ins += "</select>"; | |
1398 | - ins += '</td></tr>'; | |
1399 | - } | |
1400 | - if (id === "fontlab"){ | |
1401 | - ins += '<tr><td>Estilo</td>'; | |
1402 | - ins += '<td style="text-align:right">'; | |
1403 | - ins += '<select id=i3GEOtabelafontlab >'; | |
1404 | - ins += '<option value="2" selected >normal</option>'; | |
1405 | - ins += '<option value="3">negrito</option>'; | |
1406 | - ins += '<option value="4">itálico</option>'; | |
1407 | - ins += '<option value="5">negrito-itálico</option>'; | |
1408 | - ins += "</select>"; | |
1409 | - ins += '</td></tr>'; | |
1410 | - } | |
1411 | - if (id === "las"){ | |
1412 | - ins += "<tr><td>Ângulo</td>"; | |
1413 | - ins += "<td style='text-align:right'><select id=i3GEOtabelalas >"; | |
1414 | - ins += "<option value=0 SELECTED>paralelos</option>"; | |
1415 | - ins += "<option value=1 >horizontal</option>"; | |
1416 | - ins += "<option value=2 >perpendicular</option>"; | |
1417 | - ins += "<option value=3 >vertical</option>"; | |
1418 | - ins += "</select></td></tr>"; | |
1419 | - } | |
1420 | - if (id === "lty"){ | |
1421 | - ins += '<tr><td>Estilo das linhas</td>'; | |
1422 | - ins += '<td style="text-align:right">'; | |
1423 | - ins += '<select id="i3GEOtabelalty" >\n'; | |
1424 | - ins += '<option value="0" >nenhum</option>'; | |
1425 | - ins += '<option value="1" selected >sólido</option>'; | |
1426 | - ins += '<option value="2">tracejado</option>'; | |
1427 | - ins += '<option value="3">pontilhado</option>'; | |
1428 | - ins += '<option value="4">traço-ponto</option>'; | |
1429 | - ins += '<option value="5">traço longo</option>'; | |
1430 | - ins += '<option value="6">traço duplo</option>'; | |
1431 | - ins += "</select>"; | |
1432 | - ins += '</td></tr>'; | |
1433 | - } | |
1434 | - if (id === "border") { | |
1435 | - ins += "<tr><td>Cor da borda dos elementos ou linhas</td>"; | |
1436 | - ins += "<td>"+i3GEOF.tabela.combocor("i3GEOtabelaborder","1")+"</td></tr>"; | |
1437 | - } | |
1438 | - if (id === "lwd"){ | |
1439 | - ins += "<tr><td>Largura da linha</td>"; | |
1440 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value=1 size=20 id=i3GEOtabelalwd /></tr>"; | |
1441 | - } | |
1442 | - if (id === "tck"){ | |
1443 | - ins += "<tr><td>Tamanho dos tics</td>"; | |
1444 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value=1 size=20 id=i3GEOtabelatck /></td></tr>"; | |
1445 | - } | |
1446 | - if (id === "horiz"){ | |
1447 | - ins += "<tr><td>Horizontal?</td>"; | |
1448 | - ins += "<td>"+i3GEO.util.comboSimNao("i3GEOtabelahoriz","sim")+"</td></tr>"; | |
1449 | - } | |
1450 | - if (id === "spline"){ | |
1451 | - ins += "<tr><td>Suaviza as linhas?</td>"; | |
1452 | - ins += "<td>"+i3GEO.util.comboSimNao("i3GEOtabelaspline","nao")+"</td></tr>"; | |
1453 | - } | |
1454 | - if (id === "ppontos"){ | |
1455 | - ins += "<tr><td>Plota os pontos?</td>"; | |
1456 | - ins += "<td>"+i3GEO.util.comboSimNao("i3GEOtabelappontos","sim")+"</td></tr>"; | |
1457 | - } | |
1458 | - if (id === "full"){ | |
1459 | - ins += "<tr><td>Círculo inteiro?</td>"; | |
1460 | - ins += "<td>"+i3GEO.util.comboSimNao("i3GEOtabelafull","sim")+"</td></tr>"; | |
1461 | - } | |
1462 | - if (id === "pch"){ | |
1463 | - ins += "<tr><td>Símbolo dos pontos</td>"; | |
1464 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value='o' size=20 id=i3GEOtabelapch /></td></tr>"; | |
1465 | - } | |
1466 | - if (id === "tpt"){ | |
1467 | - ins += "<tr><td>Tamanho dos pontos</td>"; | |
1468 | - ins += "<td><input onclick='javascript:this.select();' class=digitar type=text value=0.5 size=20 id=i3GEOtabelatpt /></td></tr>"; | |
1469 | - } | |
1470 | - return ins; | |
1471 | - } | |
1472 | - catch(e){i3GEO.janela.tempoMsg("Erro ao capturar parametro. "+e);} | |
1473 | - }, | |
1474 | - /* | |
1475 | - Function: combocor | |
1476 | - | |
1477 | - Gera uma lista de cores no padrão do R | |
1478 | - */ | |
1479 | - combocor: function(id,def,s){ | |
1480 | - var combo = "<select name="+id+" id="+id+" >"; | |
1481 | - if (def === 0){s = 'selected';} | |
1482 | - combo += '<option value="0" '+s+' >branco</option>'; | |
1483 | - s = ""; | |
1484 | - combo +='<option value="2">vermelho</option>'; | |
1485 | - combo += '<option value="7">amarelo</option>'; | |
1486 | - if (def === 1){s = 'selected';} | |
1487 | - combo += '<option value="1" '+s+' >preto</option>'; | |
1488 | - combo += '<option value="rgb(1,1,0.8)">bege</option>'; | |
1489 | - combo += '<option value="3">verde</option>'; | |
1490 | - combo += '<option value="8">cinza</option>'; | |
1491 | - combo += '<option value="4">azul</option>'; | |
1492 | - combo += '<option value="5">ciano</option>'; | |
1493 | - combo += '<option value="6">magenta</option>'; | |
1494 | - combo += "</select>"; | |
1495 | - return(combo); | |
1496 | - }, | |
1497 | - /* | |
1498 | - Function: geraGrafico | |
1499 | - | |
1500 | - Gera a imagem do gráfico | |
1501 | - */ | |
1502 | - geraGrafico: function(funcao){ | |
1503 | - if(i3GEOF.tabela.aguarde.visibility === "visible") | |
1504 | - {return;} | |
1505 | - i3GEOF.tabela.aguarde.visibility = "visible"; | |
1506 | - | |
1507 | - var par,p, | |
1508 | - cp = new cpaint(); | |
1509 | - par = i3GEOF.tabela.montapar(i3GEOF.tabela.parametros); | |
1510 | - | |
1511 | - if (i3GEOF.tabela.tipoDeGrafico==="pie"){ | |
1512 | - p = i3GEO.configura.locaplic+"/ferramentas/tabela/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=graficopizza"+par; | |
1513 | - cp.set_response_type("JSON"); | |
1514 | - cp.call(p,"graficoPizza",funcao); | |
1515 | - } | |
1516 | - if (i3GEOF.tabela.tipoDeGrafico==="barplot"){ | |
1517 | - p = i3GEO.configura.locaplic+"/ferramentas/tabela/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=graficobarras"+par; | |
1518 | - cp.set_response_type("JSON"); | |
1519 | - cp.call(p,"graficoBarras",funcao); | |
1520 | - } | |
1521 | - if (i3GEOF.tabela.tipoDeGrafico==="hist"){ | |
1522 | - p = i3GEO.configura.locaplic+"/ferramentas/tabela/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=graficohist"+par; | |
1523 | - cp.set_response_type("JSON"); | |
1524 | - cp.call(p,"graficoHist",funcao); | |
1525 | - } | |
1526 | - if (i3GEOF.tabela.tipoDeGrafico==="linhas"){ | |
1527 | - p = i3GEO.configura.locaplic+"/ferramentas/tabela/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=graficolinhas"+par; | |
1528 | - cp.set_response_type("JSON"); | |
1529 | - cp.call(p,"graficoLinhas",funcao); | |
1530 | - } | |
1531 | - if (i3GEOF.tabela.tipoDeGrafico==="scatter"){ | |
1532 | - p = i3GEO.configura.locaplic+"/ferramentas/tabela/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=graficoscatter"+par; | |
1533 | - cp.set_response_type("JSON"); | |
1534 | - cp.call(p,"graficoScatter",funcao); | |
1535 | - } | |
1536 | - if (i3GEOF.tabela.tipoDeGrafico==="scatterbins"){ | |
1537 | - p = i3GEO.configura.locaplic+"/ferramentas/tabela/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=graficoscatterbins"+par; | |
1538 | - cp.set_response_type("JSON"); | |
1539 | - cp.call(p,"graficoScatterBins",funcao); | |
1540 | - } | |
1541 | - }, | |
1542 | - /* | |
1543 | - Function: mostraGrafico | |
1544 | - | |
1545 | - Mostra o gráfico gerado em uma nova janela do navegador | |
1546 | - */ | |
1547 | - mostraGrafico: function(retorno){ | |
1548 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | |
1549 | - if (retorno.data !== "erro") | |
1550 | - { | |
1551 | - var r = retorno.data, | |
1552 | - l = r.split(","), | |
1553 | - w = window.open(""); | |
1554 | - w.document.write("<img src='"+l[0]+"' />"); | |
1555 | - w.document.write("<br><br><br><a href="+l[1]+"> Arquivo com os valores</a>"); | |
1556 | - w.document.close(); | |
1557 | - i3GEOF.tabela.imagemG = l[0]; | |
1558 | - i3GEOF.tabela.nomeArquivoGr = l[2]; | |
1559 | - } | |
1560 | - else | |
1561 | - {i3GEO.janela.tempoMsg("Ocorreu algum erro. Verifique os tipos de dados.");} | |
1562 | - }, | |
1563 | - /* | |
1564 | - Function: mostraImagem | |
1565 | - | |
1566 | - Mostra o gráfico na janela flutuante do i3Geo | |
1567 | - | |
1568 | - */ | |
1569 | - mostraImagem: function(retorno){ | |
1570 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | |
1571 | - if (retorno.data !== "erro"){ | |
1572 | - var r = retorno.data, | |
1573 | - l = r.split(","), | |
1574 | - i = $i("i3GEOtabelaimgG"); | |
1575 | - i.innerHTML = "<img src='"+l[0]+"' />"; | |
1576 | - i.style.display="block"; | |
1577 | - i3GEOF.tabela.imagemG = l[0]; | |
1578 | - i3GEOF.tabela.nomeArquivoGr = l[2]; | |
1579 | - } | |
1580 | - else | |
1581 | - {i3GEO.janela.tempoMsg("Ocorreu algum erro. Verifique os tipos de dados.");} | |
1582 | - }, | |
1583 | - /* | |
1584 | - Function: fusaoGrafico | |
1585 | - | |
1586 | - Faz a fusão do mapa com o gráfico gerado | |
1587 | - */ | |
1588 | - fusaoGrafico: function(){ | |
1589 | - if(i3GEOF.tabela.aguarde.visibility === "visible") | |
1590 | - {return;} | |
1591 | - i3GEOF.tabela.aguarde.visibility = "visible"; | |
1592 | - if (i3GEOF.tabela.imagemG === ""){ | |
1593 | - i3GEO.janela.tempoMsg("O gráfico ainda não foi gerado."); | |
1594 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | |
1595 | - } | |
1596 | - else{ | |
1597 | - var cp = new cpaint(), | |
1598 | - i = i3GEO.gadgets.quadros.quadrosfilme[i3GEO.gadgets.quadros.quadroatual].imagem, | |
1599 | - p = i3GEO.configura.locaplic+"/ferramentasqtabela/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=fusaografico&imagem="+i+"&grafico="+i3GEOF.tabela.imagemG, | |
1600 | - temp = function(retorno){ | |
1601 | - var img = retorno.data, | |
1602 | - i = $i("img"); | |
1603 | - i.src = ""; | |
1604 | - i.src = img; | |
1605 | - window.open(img); | |
1606 | - i3GEOF.tabela.aguarde.visibility = "hidden"; | |
1607 | - }; | |
1608 | - cp.set_response_type("JSON"); | |
1609 | - cp.call(p,"fusaoGrafico",temp); | |
1610 | - } | |
1611 | - }, | |
1612 | - /* | |
1613 | - Function: montaPar | |
1614 | - | |
1615 | - Monta os par�metros para um determinado tipo de gráfico, que serão utilizados na chamada ajax de criação do gráfico | |
1616 | - */ | |
1617 | - montapar: function(parametros){ | |
1618 | - try{ | |
1619 | - var par = "&", | |
1620 | - i, | |
1621 | - v, | |
1622 | - tipo = i3GEOF.tabela.tipoDeGrafico, | |
1623 | - n; | |
1624 | - parametros = parametros.split(","); | |
1625 | - n = parametros.length; | |
1626 | - for(i=0;i < n;i++){ | |
1627 | - if ($i("i3GEOtabela"+parametros[i])){ | |
1628 | - v = $i("i3GEOtabela"+parametros[i]).value; | |
1629 | - par += "&"+parametros[i]+"="+v; | |
1630 | - } | |
1631 | - } | |
1632 | - if (i3GEOF.tabela.tipoDeGrafico === "estrela") | |
1633 | - {tipo = "estrela";} | |
1634 | - if (i3GEOF.tabela.tipoDeGrafico === "hist") | |
1635 | - {tipo = "hist";} | |
1636 | - if ((i3GEOF.tabela.tipoDeGrafico === "scatter") || (i3GEOF.tabela.tipoDeGrafico === "scatterbins")) | |
1637 | - {tipo = "scatter";} | |
1638 | - if ($i("i3GEOtabelaagrupar")) | |
1639 | - {tipo = $i("i3GEOtabelaagrupar").value;} | |
1640 | - | |
1641 | - if ((i3GEOF.tabela.tipoDeGrafico === "pie") || (i3GEOF.tabela.tipoDeGrafico === "barplot") || (i3GEOF.tabela.tipoDeGrafico === "scatter") || (i3GEOF.tabela.tipoDeGrafico === "scatterbins")) | |
1642 | - {par += "&itemvalores="+$i("i3GEOFtabelagi1").value+"&itemclasses="+$i("i3GEOFtabelagi2").value+"&tema="+i3GEOF.tabela.tema+"&exclui="+$i("i3GEOtabelagexcluir").value+"&tipo="+tipo;} | |
1643 | - if (i3GEOF.tabela.tipoDeGrafico === "hist") | |
1644 | - {par += "&itemvalores="+$i("i3GEOFtabelagi1").value+"&itemclasses="+$i("i3GEOFtabelagi1").value+"&tema="+i3GEOF.tabela.tema+"&exclui="+$i("i3GEOtabelagexcluir").value+"&tipo=nenhum";} | |
1645 | - if (i3GEOF.tabela.tipoDeGrafico === "linhas") | |
1646 | - {par += "&itemvalores="+$i("i3GEOFtabelagi1").value+"&itemclasses="+$i("i3GEOFtabelagi2").value+"&tema="+i3GEOF.tabela.tema+"&exclui="+$i("i3GEOtabelagexcluir").value+"&tipo="+tipo;} | |
1647 | - if (i3GEOF.tabela.tipoDeGrafico === "estrela") | |
1648 | - {par += "&itemvalores="+$i("i3GEOFtabelagi1").value+"&tema="+i3GEOF.tabela.tema+"&exclui="+$i("i3GEOtabelagexcluir").value+"&tipo="+tipo+"&itemclasses="+itensEstrela;} | |
1649 | - par += "&nome="+i3GEOF.tabela.nomeArquivoGr; | |
1650 | - return(par); | |
1651 | - }catch(e){i3GEO.janela.tempoMsg("Erro: "+e);i3GEOF.tabela.aguarde.visibility = "hidden";} | |
1652 | - }, | |
1653 | 1011 | /* |
1654 | 1012 | Function: relatorioTabela |
1655 | 1013 | |
1656 | 1014 | Monta o relatório padrão em uma nova janela |
1657 | 1015 | */ |
1658 | - relatorioTabela: function(){ | |
1016 | + relatorioTabela: function(idjanela){ | |
1659 | 1017 | try{ |
1660 | - $i("i3GEOtabelatiporelh").value = ""; | |
1661 | - $i("i3GEOtabelaarearelh").value = $i("i3GEOtabelacalculaarea").checked; | |
1662 | - $i("i3GEOtabelastatrelh").value = $i("i3GEOtabelacalculaestat").checked; | |
1663 | - $i("i3GEOtabelaexcluirvalorh").value = $i("i3GEOtabelaexcestat").value; | |
1664 | - $i("i3GEOtabelatemarelh").value=i3GEOF.tabela.tema; | |
1665 | - $i("i3GEOtabelag_sidh").value=i3GEO.configura.sid; | |
1666 | - $i("i3GEOtabelaitemagruparelh").value=$i("i3GEOtabelaagrupaItem").value; | |
1667 | - var inputs = $i("i3GEOtabelaitensrelatorio").getElementsByTagName("input"), | |
1018 | + $i(idjanela+"i3GEOtabelatiporelh").value = ""; | |
1019 | + $i(idjanela+"i3GEOtabelaarearelh").value = $i(idjanela+"i3GEOtabelacalculaarea").checked; | |
1020 | + $i(idjanela+"i3GEOtabelastatrelh").value = $i(idjanela+"i3GEOtabelacalculaestat").checked; | |
1021 | + $i(idjanela+"i3GEOtabelaexcluirvalorh").value = $i(idjanela+"i3GEOtabelaexcestat").value; | |
1022 | + $i(idjanela+"i3GEOtabelatemarelh").value=i3GEOF.tabela.propJanelas[idjanela].tema; | |
1023 | + $i(idjanela+"i3GEOtabelag_sidh").value=i3GEO.configura.sid; | |
1024 | + $i(idjanela+"i3GEOtabelaitemagruparelh").value=$i(idjanela+"i3GEOtabelaagrupaItem").value; | |
1025 | + var inputs = $i(idjanela+"i3GEOtabelaitensrelatorio").getElementsByTagName("input"), | |
1668 | 1026 | listai = [], |
1669 | 1027 | listaordem = [], |
1670 | 1028 | listanomes = [], |
... | ... | @@ -1683,13 +1041,13 @@ i3GEOF.tabela = { |
1683 | 1041 | listaordem.push(ordem); |
1684 | 1042 | } |
1685 | 1043 | } |
1686 | - $i("i3GEOtabelaordemrel").value=listaordem; | |
1687 | - $i("i3GEOtabelanomesrelh").value=listanomes; | |
1688 | - $i("i3GEOtabelaitensrelh").value=listai; | |
1689 | - temp = $i("i3GEOtabelarelatorio").action; | |
1690 | - $i("i3GEOtabelarelatorio").action += "?ext="+i3GEO.parametros.mapexten; | |
1691 | - $i("i3GEOtabelarelatorio").submit(); | |
1692 | - $i("i3GEOtabelarelatorio").action = temp; | |
1044 | + $i(idjanela+"i3GEOtabelaordemrel").value=listaordem; | |
1045 | + $i(idjanela+"i3GEOtabelanomesrelh").value=listanomes; | |
1046 | + $i(idjanela+"i3GEOtabelaitensrelh").value=listai; | |
1047 | + temp = $i(idjanela+"i3GEOtabelarelatorio").action; | |
1048 | + $i(idjanela+"i3GEOtabelarelatorio").action += "?ext="+i3GEO.parametros.mapexten; | |
1049 | + $i(idjanela+"i3GEOtabelarelatorio").submit(); | |
1050 | + $i(idjanela+"i3GEOtabelarelatorio").action = temp; | |
1693 | 1051 | }catch(e){i3GEO.janela.tempoMsg(e);} |
1694 | 1052 | }, |
1695 | 1053 | /* | ... | ... |