Commit d1d64d3ff098efa644cca83a5b86d7975810bd11

Authored by Edmar Moretti
1 parent a24f9c6e

$1

admin/admin.db
No preview for this file type
admin/js/estat_variavel.js
... ... @@ -434,8 +434,44 @@ i3GEOadmin.variaveis = {
434 434 "&nbsp;<input id=i3GEOFmetaestatEditorBotao6 type='button' value='Divis&atilde;o em quartis' />" +
435 435 "&nbsp;<input id=i3GEOFmetaestatEditorBotao7 type='button' value='Intervalos iguais' />" +
436 436 "&nbsp;<input id=i3GEOFmetaestatEditorBotaoQN type='button' value='Quebras naturais' />" +
  437 + "&nbsp;<p class=paragrafo >Opera&ccedil;&otilde;es de ajuste das classes</p>"+
  438 + "&nbsp;<input id=i3GEOFmetaestatEditorBotaoTAM type='button' value='Calcula tamanho' />" +
  439 + "<div style='left:140px;position:relative;top:-30px;width:250px;'>" +
  440 + " &nbsp;Iniciar: <input alt='tamanho aplicado a primeira classe' type=text value=6 size=1 id='i3GEOFmetaestatEditorTamanho'/>" +
  441 + " &nbsp;Aumentar: <input alt='valor que sera somado ao segundo em diante' type=text value=10 size=1 id='i3GEOFmetaestatEditorAumentar'/>" +
  442 + "</div>" +
437 443 '<input type=hidden value="" id="listaColourRampEditor" />'; //utilizado pelo seletor de colourramp;
438 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 475 new YAHOO.widget.Button(
440 476 "i3GEOFmetaestatEditorBotao8",
441 477 {onclick:{fn:
... ...
admin/php/classe_metaestat.php
... ... @@ -1588,7 +1588,6 @@ class Metaestat{
1588 1588 $expressao = str_replace("''",'',$expressao);
1589 1589 $expressao = str_replace("##","'",$expressao);
1590 1590 }
1591   -
1592 1591 $this->testaNumerico(array($id_classificacao,$id_classe));
1593 1592 try {
1594 1593 if($id_classe != ""){
... ...
admin/php/metaestat.php
... ... @@ -89,7 +89,8 @@ $funcoesEdicao = array(
89 89 "EXCLUIATRIBUTOSMEDIDAVARIAVEL",
90 90 "REGIAO2SHP",
91 91 "ESQUEMASCONEXAO",
92   - "TABELASESQUEMA"
  92 + "TABELASESQUEMA",
  93 + "ALTERAESTILOSCLASSIFICACAO"
93 94 );
94 95 if(in_array(strtoupper($funcao),$funcoesEdicao)){
95 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 637 retornaJSON("ok");
637 638 exit;
638 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 673 Valor: ALTERACLASSECLASSIFICACAO
641 674  
... ...