Commit 7e67c710d39b169a61eed47b7123ad0364b90bc9
1 parent
23537940
Exists in
master
and in
7 other branches
correção na opção de fusão do mapa com um gráfico na ferramenta tabela. Foram ne…
…cessárias mudanças em função da possibilidade de uso do modo cgi.
Showing
4 changed files
with
24 additions
and
12 deletions
Show diff stats
classesphp/funcoes_gerais.php
| @@ -92,12 +92,21 @@ Include: | @@ -92,12 +92,21 @@ Include: | ||
| 92 | */ | 92 | */ |
| 93 | function fusaoGrafico() | 93 | function fusaoGrafico() |
| 94 | { | 94 | { |
| 95 | - global $imagem,$grafico,$dir_tmp,$cp; | 95 | + global $imagem,$grafico,$dir_tmp,$cp,$map_file; |
| 96 | include_once("classe_imagem.php"); | 96 | include_once("classe_imagem.php"); |
| 97 | + if($map_file != "") | ||
| 98 | + { | ||
| 99 | + $mapa = ms_newMapObj($map_file); | ||
| 100 | + $imgo = $mapa->draw(); | ||
| 101 | + $nome = ($imgo->imagepath).nomeRandomico().".png"; | ||
| 102 | + $imgo->saveImage($nome); | ||
| 103 | + $imagem = ($imgo->imageurl).basename($nome); | ||
| 104 | + $imgo->free(); | ||
| 105 | + } | ||
| 97 | $m = new Imagem(dirname($dir_tmp).$imagem); | 106 | $m = new Imagem(dirname($dir_tmp).$imagem); |
| 98 | $i = $m->fundeIm(dirname($dir_tmp).$grafico); | 107 | $i = $m->fundeIm(dirname($dir_tmp).$grafico); |
| 99 | imagepng($i,dirname($dir_tmp).$imagem); | 108 | imagepng($i,dirname($dir_tmp).$imagem); |
| 100 | - $cp->set_data(dirname($dir_tmp).$imagem); | 109 | + $cp->set_data($imagem); |
| 101 | } | 110 | } |
| 102 | /* | 111 | /* |
| 103 | Section: R | 112 | Section: R |
classesphp/mapa_controle.php
| @@ -1277,6 +1277,8 @@ Include: | @@ -1277,6 +1277,8 @@ Include: | ||
| 1277 | */ | 1277 | */ |
| 1278 | case "fusaografico": | 1278 | case "fusaografico": |
| 1279 | include("graficos.php"); | 1279 | include("graficos.php"); |
| 1280 | + //$_SESSION["utilizacgi"] = "nao"; | ||
| 1281 | + //$utilizacgi = "nao"; | ||
| 1280 | restauraCon($map_file,$postgis_mapa); | 1282 | restauraCon($map_file,$postgis_mapa); |
| 1281 | $cp->register('fusaoGrafico'); | 1283 | $cp->register('fusaoGrafico'); |
| 1282 | $cp->start(); | 1284 | $cp->start(); |
ferramentas/tabela/index.htm
| @@ -25,15 +25,15 @@ | @@ -25,15 +25,15 @@ | ||
| 25 | </div> | 25 | </div> |
| 26 | <div id=combot style="position:relative;top:5px;left:0px;"> | 26 | <div id=combot style="position:relative;top:5px;left:0px;"> |
| 27 | </div> | 27 | </div> |
| 28 | - <div id=contador style="position:relative;top:15px;left:0px;text-align:center"> | ||
| 29 | - listar: <img style=cursor:pointer onclick='menosf()' src=../../imagens/minus.gif /> | 28 | + <div id=contador style="background-color:rgb(240,240,240);width:90%;position:relative;top:15px;left:0px;text-align:left"> |
| 29 | + de <img style=cursor:pointer onclick='menosf()' src=../../imagens/minus.gif /> | ||
| 30 | <input type=text class=digitar size=5 value=1 id=inicio /> | 30 | <input type=text class=digitar size=5 value=1 id=inicio /> |
| 31 | até | 31 | até |
| 32 | <input type=text class=digitar size=5 value=20 id=fim /> | 32 | <input type=text class=digitar size=5 value=20 id=fim /> |
| 33 | <img style=cursor:pointer onclick='maisf()'src=../../imagens/plus.gif /> | 33 | <img style=cursor:pointer onclick='maisf()'src=../../imagens/plus.gif /> |
| 34 | - <img style=cursor:pointer onclick='registrosf()'src=../../imagens/tic.png /> | 34 | + <span style=cursor:pointer onclick='registrosf()' ><img title='listar dados' src=../../imagens/tic.png /> Listar</span> |
| 35 | </div> | 35 | </div> |
| 36 | - <div id=registros style="position:relative;top:15px;left:0px;text-align:left;"> | 36 | + <div id=registros style="position:relative;top:20px;left:0px;text-align:left;"> |
| 37 | </div> | 37 | </div> |
| 38 | </div> | 38 | </div> |
| 39 | <div id=guia2obj style="display:none;width:95%"> | 39 | <div id=guia2obj style="display:none;width:95%"> |
| @@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
| 61 | <div onclick="listatextof()" style="position:relative;top:15px;left:0px;"> | 61 | <div onclick="listatextof()" style="position:relative;top:15px;left:0px;"> |
| 62 | <input id=botao5 size=30 type=button value="Listar no formato texto"/> | 62 | <input id=botao5 size=30 type=button value="Listar no formato texto"/> |
| 63 | </div> | 63 | </div> |
| 64 | - <div onclick="criatemaf()" style="position:relative;top:20px;left:0px;"> | 64 | + <div onclick="criatemaf()" style="position:absolute;top:40px;left:160px;"> |
| 65 | <input id=botao6 size=30 type=button value="Criar um tema novo"/> | 65 | <input id=botao6 size=30 type=button value="Criar um tema novo"/> |
| 66 | </div> | 66 | </div> |
| 67 | <div id="operacoes" class=digitar style="text-align:left;position:relative;top:25px;left:0px;overflow:auto;height:180px" > | 67 | <div id="operacoes" class=digitar style="text-align:left;position:relative;top:25px;left:0px;overflow:auto;height:180px" > |
ferramentas/tabela/index.js
| @@ -20,7 +20,6 @@ Free Software Foundation, Inc., no endereço | @@ -20,7 +20,6 @@ Free Software Foundation, Inc., no endereço | ||
| 20 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | 20 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
| 21 | */ | 21 | */ |
| 22 | //inicializa | 22 | //inicializa |
| 23 | -aguarde("block") | ||
| 24 | nomeArquivoGr = "" //nome do arquivo que conterá os dados apoós ser feito o gráfico pela primeira vez | 23 | nomeArquivoGr = "" //nome do arquivo que conterá os dados apoós ser feito o gráfico pela primeira vez |
| 25 | mensagemAjuda("men1",$i("men1").innerHTML) | 24 | mensagemAjuda("men1",$i("men1").innerHTML) |
| 26 | parametrosURL() | 25 | parametrosURL() |
| @@ -103,6 +102,7 @@ function maisf() | @@ -103,6 +102,7 @@ function maisf() | ||
| 103 | //lista os registros da tabela | 102 | //lista os registros da tabela |
| 104 | function registrosf() | 103 | function registrosf() |
| 105 | { | 104 | { |
| 105 | + aguarde("block") | ||
| 106 | var tipolista = "tudo" | 106 | var tipolista = "tudo" |
| 107 | var tiporeg = "brasil" | 107 | var tiporeg = "brasil" |
| 108 | if ($i("tiporeg").checked) | 108 | if ($i("tiporeg").checked) |
| @@ -127,13 +127,13 @@ function montaregistrosf(retorno) | @@ -127,13 +127,13 @@ function montaregistrosf(retorno) | ||
| 127 | ins = "<table id=tabelai >" | 127 | ins = "<table id=tabelai >" |
| 128 | ins += "<tr><td></td><td></td><td></td>" | 128 | ins += "<tr><td></td><td></td><td></td>" |
| 129 | for (i=0;i<retorno.data[0].itens.length;i++) | 129 | for (i=0;i<retorno.data[0].itens.length;i++) |
| 130 | - {ins += "<td id='"+(i * 1 + 3)+"' style='background-color:yellow' ><img onclick='excluicolunaf(this)' src=../../imagens/x.gif title='excluir' /><img onclick='ordenacolunaf(this)' src=../../imagens/ordena1.gif title='ordena' /> "+retorno.data[0].itens[i]+"</td>"} | 130 | + {ins += "<td id='"+(i * 1 + 3)+"' style='background-color:yellow' ><img style=cursor:pointer onclick='excluicolunaf(this)' src=../../imagens/x.gif title='excluir' /><img style=cursor:pointer onclick='ordenacolunaf(this)' src=../../imagens/ordena1.gif title='ordena' /> "+retorno.data[0].itens[i]+"</td>"} |
| 131 | ins += "</tr>" | 131 | ins += "</tr>" |
| 132 | var cor = "linha" | 132 | var cor = "linha" |
| 133 | for (i=0;i<retorno.data[1].registros.length;i++) | 133 | for (i=0;i<retorno.data[1].registros.length;i++) |
| 134 | { | 134 | { |
| 135 | - ins += "<tr><td><img onclick='excluilinhaf(this)' src=../../imagens/x.gif title='excluir' /></td>" | ||
| 136 | - ins += "<td><img onclick='zoomlinhaf(this)' src=../../imagens/o.gif title='zoom' ids="+retorno.data[1].registros[i].indice+" /></td>" | 135 | + ins += "<tr><td><img style=cursor:pointer onclick='excluilinhaf(this)' src=../../imagens/x.gif title='excluir' /></td>" |
| 136 | + ins += "<td><img style=cursor:pointer onclick='zoomlinhaf(this)' src=../../imagens/o.gif title='zoom' ids="+retorno.data[1].registros[i].indice+" /></td>" | ||
| 137 | ins += "<td><input title='marca' style='cursor:pointer' type='checkbox' "+retorno.data[1].registros[i].status+" name="+retorno.data[1].registros[i].indice+" /></td>" | 137 | ins += "<td><input title='marca' style='cursor:pointer' type='checkbox' "+retorno.data[1].registros[i].status+" name="+retorno.data[1].registros[i].indice+" /></td>" |
| 138 | var vals = retorno.data[1].registros[i].valores | 138 | var vals = retorno.data[1].registros[i].valores |
| 139 | for (j=0;j<vals.length;j++) | 139 | for (j=0;j<vals.length;j++) |
| @@ -205,6 +205,7 @@ function excluicolunaf(coluna) | @@ -205,6 +205,7 @@ function excluicolunaf(coluna) | ||
| 205 | { | 205 | { |
| 206 | for (i = 0; i < trs[t].childNodes[cid].childNodes.length;i++) | 206 | for (i = 0; i < trs[t].childNodes[cid].childNodes.length;i++) |
| 207 | {trs[t].childNodes[cid].removeChild(trs[t].childNodes[cid].childNodes[i])} | 207 | {trs[t].childNodes[cid].removeChild(trs[t].childNodes[cid].childNodes[i])} |
| 208 | + trs[t].childNodes[cid].innerHTML = ""; | ||
| 208 | } | 209 | } |
| 209 | } | 210 | } |
| 210 | aguarde("none") | 211 | aguarde("none") |
| @@ -1051,7 +1052,7 @@ function fusaoG() | @@ -1051,7 +1052,7 @@ function fusaoG() | ||
| 1051 | //mostra o resultado da fusao do mapa com o grafico | 1052 | //mostra o resultado da fusao do mapa com o grafico |
| 1052 | function mostraFG(retorno) | 1053 | function mostraFG(retorno) |
| 1053 | { | 1054 | { |
| 1054 | - var img = window.parent.$i("img").src | 1055 | + var img = retorno.data; //window.parent.$i("img").src |
| 1055 | window.parent.$i("img").src = "" | 1056 | window.parent.$i("img").src = "" |
| 1056 | window.parent.$i("img").src = img | 1057 | window.parent.$i("img").src = img |
| 1057 | window.open(img) | 1058 | window.open(img) |