Commit 114ebd458ed9535dd2b4c608e96284d6e44374e1
1 parent
fbeb11c9
Exists in
master
and in
7 other branches
--no commit message
Showing
1 changed file
with
23 additions
and
2 deletions
Show diff stats
ferramentas/metaestat/index.js
... | ... | @@ -337,7 +337,28 @@ i3GEOF.metaestat = { |
337 | 337 | if($i("i3GEOF.junta_corpo")){ |
338 | 338 | return; |
339 | 339 | } |
340 | - var minimiza,cabecalho,titulo,ins,n,i,lista = "<table class=lista4 >"; | |
340 | + var aplica,minimiza,cabecalho,titulo,ins,n,i,lista = "<table class=lista4 >"; | |
341 | + aplica = function(){ | |
342 | + var atualiza,p,lista,i,ics = $i("i3GEOF.junta_corpo").getElementsByTagName("input"); | |
343 | + n = ics.length; | |
344 | + for(i=0;i<n;i++){ | |
345 | + if(ics[i].type == "checkbox" && ics[i].checked == true){ | |
346 | + lista.push(ics[i].value); | |
347 | + } | |
348 | + } | |
349 | + if(lista.length == 0){ | |
350 | + alert("Escolha uma camada"); | |
351 | + return; | |
352 | + } | |
353 | + i3GEO.janela.abreAguarde("aguardeBuscaDados","Aguarde..."); | |
354 | + p = i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?g_sid="+i3GEO.configura.sid + | |
355 | + "&funcao=juntaMedidasVariaveis&layerNames=".lista.join(","); | |
356 | + atualiza = function(){ | |
357 | + i3GEO.janela.fechaAguarde("aguardeBuscaDados"); | |
358 | + i3GEO.atualiza(); | |
359 | + }; | |
360 | + i3GEO.util.ajaxGet(p,atualiza); | |
361 | + }; | |
341 | 362 | cabecalho = function(){ |
342 | 363 | }; |
343 | 364 | minimiza = function(){ |
... | ... | @@ -371,7 +392,7 @@ i3GEOF.metaestat = { |
371 | 392 | $i("i3GEOF.junta_corpo").innerHTML = ins; |
372 | 393 | new YAHOO.widget.Button( |
373 | 394 | "i3geojuntaAplica", |
374 | - {onclick:{fn: i3GEOF.metaestat.analise.filtraPeriodo.adicionaFiltro}} | |
395 | + {onclick:{fn: aplica}} | |
375 | 396 | ); |
376 | 397 | }; |
377 | 398 | i3GEO.janela.abreAguarde("aguardeBuscaDados","Aguarde..."); | ... | ... |