Commit d1d64d3ff098efa644cca83a5b86d7975810bd11
1 parent
a24f9c6e
Exists in
master
and in
7 other branches
$1
Showing
4 changed files
with
70 additions
and
2 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/js/estat_variavel.js
| @@ -434,8 +434,44 @@ i3GEOadmin.variaveis = { | @@ -434,8 +434,44 @@ i3GEOadmin.variaveis = { | ||
| 434 | " <input id=i3GEOFmetaestatEditorBotao6 type='button' value='Divisão em quartis' />" + | 434 | " <input id=i3GEOFmetaestatEditorBotao6 type='button' value='Divisão em quartis' />" + |
| 435 | " <input id=i3GEOFmetaestatEditorBotao7 type='button' value='Intervalos iguais' />" + | 435 | " <input id=i3GEOFmetaestatEditorBotao7 type='button' value='Intervalos iguais' />" + |
| 436 | " <input id=i3GEOFmetaestatEditorBotaoQN type='button' value='Quebras naturais' />" + | 436 | " <input id=i3GEOFmetaestatEditorBotaoQN type='button' value='Quebras naturais' />" + |
| 437 | + " <p class=paragrafo >Operações de ajuste das classes</p>"+ | ||
| 438 | + " <input id=i3GEOFmetaestatEditorBotaoTAM type='button' value='Calcula tamanho' />" + | ||
| 439 | + "<div style='left:140px;position:relative;top:-30px;width:250px;'>" + | ||
| 440 | + " Iniciar: <input alt='tamanho aplicado a primeira classe' type=text value=6 size=1 id='i3GEOFmetaestatEditorTamanho'/>" + | ||
| 441 | + " Aumentar: <input alt='valor que sera somado ao segundo em diante' type=text value=10 size=1 id='i3GEOFmetaestatEditorAumentar'/>" + | ||
| 442 | + "</div>" + | ||
| 437 | '<input type=hidden value="" id="listaColourRampEditor" />'; //utilizado pelo seletor de colourramp; | 443 | '<input type=hidden value="" id="listaColourRampEditor" />'; //utilizado pelo seletor de colourramp; |
| 438 | $i("editor_bd").innerHTML = ins; | 444 | $i("editor_bd").innerHTML = ins; |
| 445 | + | ||
| 446 | + | ||
| 447 | + new YAHOO.widget.Button( | ||
| 448 | + "i3GEOFmetaestatEditorBotaoTAM", | ||
| 449 | + {onclick:{fn: | ||
| 450 | + function(){ | ||
| 451 | + var p = i3GEO.configura.locaplic+"/admin/php/metaestat.php?funcao=ALTERAESTILOSCLASSIFICACAO&tipo=tamanho&id_classificacao="+id_classificacao+"&id_medida_variavel="+id_medida_variavel, | ||
| 452 | + tamanhoini = $i("i3GEOFmetaestatEditorTamanho").value, | ||
| 453 | + aumentar = $i("i3GEOFmetaestatEditorAumentar").value, | ||
| 454 | + callback; | ||
| 455 | + callback = { | ||
| 456 | + success:function(o){ | ||
| 457 | + try { | ||
| 458 | + core_carregando("desativa"); | ||
| 459 | + var no = tree.getNodeByProperty("id_classificacao",id_classificacao); | ||
| 460 | + tree.removeChildren(no) ; | ||
| 461 | + no.expand(); | ||
| 462 | + } | ||
| 463 | + catch(e){core_handleFailure(e,o.responseText);} | ||
| 464 | + }, | ||
| 465 | + failure:core_handleFailure, | ||
| 466 | + argument: { foo:"foo", bar:"bar" } | ||
| 467 | + }; | ||
| 468 | + core_carregando("ativa"); | ||
| 469 | + p += "&tamanhoini=" + tamanhoini + | ||
| 470 | + "&aumentar=" + aumentar; | ||
| 471 | + core_makeRequest(p,callback); | ||
| 472 | + } | ||
| 473 | + }} | ||
| 474 | + ); | ||
| 439 | new YAHOO.widget.Button( | 475 | new YAHOO.widget.Button( |
| 440 | "i3GEOFmetaestatEditorBotao8", | 476 | "i3GEOFmetaestatEditorBotao8", |
| 441 | {onclick:{fn: | 477 | {onclick:{fn: |
admin/php/classe_metaestat.php
| @@ -1588,7 +1588,6 @@ class Metaestat{ | @@ -1588,7 +1588,6 @@ class Metaestat{ | ||
| 1588 | $expressao = str_replace("''",'',$expressao); | 1588 | $expressao = str_replace("''",'',$expressao); |
| 1589 | $expressao = str_replace("##","'",$expressao); | 1589 | $expressao = str_replace("##","'",$expressao); |
| 1590 | } | 1590 | } |
| 1591 | - | ||
| 1592 | $this->testaNumerico(array($id_classificacao,$id_classe)); | 1591 | $this->testaNumerico(array($id_classificacao,$id_classe)); |
| 1593 | try { | 1592 | try { |
| 1594 | if($id_classe != ""){ | 1593 | if($id_classe != ""){ |
admin/php/metaestat.php
| @@ -89,7 +89,8 @@ $funcoesEdicao = array( | @@ -89,7 +89,8 @@ $funcoesEdicao = array( | ||
| 89 | "EXCLUIATRIBUTOSMEDIDAVARIAVEL", | 89 | "EXCLUIATRIBUTOSMEDIDAVARIAVEL", |
| 90 | "REGIAO2SHP", | 90 | "REGIAO2SHP", |
| 91 | "ESQUEMASCONEXAO", | 91 | "ESQUEMASCONEXAO", |
| 92 | - "TABELASESQUEMA" | 92 | + "TABELASESQUEMA", |
| 93 | + "ALTERAESTILOSCLASSIFICACAO" | ||
| 93 | ); | 94 | ); |
| 94 | if(in_array(strtoupper($funcao),$funcoesEdicao)){ | 95 | if(in_array(strtoupper($funcao),$funcoesEdicao)){ |
| 95 | //se a funcao esta no array eh feita a verificacao se o usuario esta logado e se ele esta em um grupo que | 96 | //se a funcao esta no array eh feita a verificacao se o usuario esta logado e se ele esta em um grupo que |
| @@ -636,6 +637,38 @@ switch (strtoupper($funcao)) | @@ -636,6 +637,38 @@ switch (strtoupper($funcao)) | ||
| 636 | retornaJSON("ok"); | 637 | retornaJSON("ok"); |
| 637 | exit; | 638 | exit; |
| 638 | break; | 639 | break; |
| 640 | + case "ALTERAESTILOSCLASSIFICACAO": | ||
| 641 | + if($tipo == "tamanho"){ | ||
| 642 | + $m = new Metaestat(); | ||
| 643 | + $classes = $m->listaClasseClassificacao($id_classificacao); | ||
| 644 | + $nclasses = count($classes); | ||
| 645 | + $tamanhoini -= $aumentar; | ||
| 646 | + for($i=0;$i<$nclasses;$i++){ | ||
| 647 | + $c = $classes[$i]; | ||
| 648 | + $m->alteraClasseClassificacao( | ||
| 649 | + $id_classificacao, | ||
| 650 | + $c["id_classe"], | ||
| 651 | + $c["titulo"], | ||
| 652 | + $c["expressao"], | ||
| 653 | + $c["vermelho"], | ||
| 654 | + $c["verde"], | ||
| 655 | + $c["azul"], | ||
| 656 | + $tamanhoini + $aumentar, | ||
| 657 | + $c["simbolo"], | ||
| 658 | + $c["overmelho"], | ||
| 659 | + $c["overde"], | ||
| 660 | + $c["oazul"], | ||
| 661 | + $tamanhoini + $aumentar | ||
| 662 | + ); | ||
| 663 | + $aumentar += $aumentar; | ||
| 664 | + } | ||
| 665 | + retornaJSON("ok"); | ||
| 666 | + exit; | ||
| 667 | + } | ||
| 668 | + retornaJSON("ok"); | ||
| 669 | + exit; | ||
| 670 | + break; | ||
| 671 | + | ||
| 639 | /* | 672 | /* |
| 640 | Valor: ALTERACLASSECLASSIFICACAO | 673 | Valor: ALTERACLASSECLASSIFICACAO |
| 641 | 674 |