Commit 311b337ad422eaddf0ef222c14a57fdf75ca2f11
1 parent
b4f0ddf7
Exists in
master
and in
7 other branches
Separação do código da opção Regiões, existente na lista de operações de análise…
… do sistema metaestat, em uma pasta nova dentor de ferramentas
Showing
6 changed files
with
270 additions
and
224 deletions
Show diff stats
ferramentas/metaestat/index.js
@@ -477,16 +477,13 @@ i3GEOF.metaestat = { | @@ -477,16 +477,13 @@ i3GEOF.metaestat = { | ||
477 | * Executa i3GEOF.mostraregiao.iniciaJanelaFlutuante(); | 477 | * Executa i3GEOF.mostraregiao.iniciaJanelaFlutuante(); |
478 | */ | 478 | */ |
479 | mostraRegiao: function(){ | 479 | mostraRegiao: function(){ |
480 | - if(typeof(i3GEOF.mostraregiao) === 'undefined'){ | ||
481 | - i3GEO.util.scriptTag( | ||
482 | - i3GEO.configura.locaplic+"/ferramentas/metaestat/mostraregiao.js", | ||
483 | - "i3GEOF.mostraregiao.iniciaJanelaFlutuante()", | ||
484 | - "i3GEOF.mostraregiao_script" | ||
485 | - ); | ||
486 | - } | ||
487 | - else{ | ||
488 | - i3GEOF.mostraregiao.iniciaJanelaFlutuante(); | ||
489 | - } | 480 | + i3GEO.util.dialogoFerramenta( |
481 | + "i3GEOF.metaestat.analise.mostraRegiao()", | ||
482 | + "mostraregiao", | ||
483 | + "mostraregiao", | ||
484 | + "dependencias.php", | ||
485 | + "i3GEOF.mostraregiao.iniciaJanelaFlutuante()" | ||
486 | + ); | ||
490 | }, | 487 | }, |
491 | /** | 488 | /** |
492 | * Ativa a ferramenta que permite ativar/desativar o contorno dos limites utilizados em uma camada | 489 | * Ativa a ferramenta que permite ativar/desativar o contorno dos limites utilizados em uma camada |
ferramentas/metaestat/mostraregiao.js
@@ -1,214 +0,0 @@ | @@ -1,214 +0,0 @@ | ||
1 | -/* | ||
2 | -Title: Ferramenta que permite mostrar os limites de um tipo de região baseada no cadastro do módulo METAESTAT | ||
3 | - | ||
4 | -A regiao e mostrada como uma nova camada no mapa | ||
5 | - | ||
6 | -Arquivo: | ||
7 | - | ||
8 | -i3geo/ferramentas/metaestat/mostraregiao.js | ||
9 | - | ||
10 | -Licenca: | ||
11 | - | ||
12 | -GPL2 | ||
13 | - | ||
14 | -i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | ||
15 | - | ||
16 | -Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | ||
17 | -Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | ||
18 | - | ||
19 | -Esse programa utiliza parcialmente os codigos da aplicacao calculadora de carbono desenvolvido pelo | ||
20 | -IPAM - Instituto de Pesquisa Ambiental da Amazonia | ||
21 | - | ||
22 | -Este programa e software livre; voce pode redistribui-lo | ||
23 | -e/ou modifica-lo sob os termos da Licenca Publica Geral | ||
24 | -GNU conforme publicada pela Free Software Foundation; | ||
25 | - | ||
26 | -Este programa e distribuido na expectativa de que seja util, | ||
27 | -porem, SEM NENHUMA GARANTIA; nem mesmo a garantia implicita | ||
28 | -de COMERCIABILIDADE OU ADEQUACAO A UMA FINALIDADE ESPECIFICA. | ||
29 | -Consulte a Licenca Publica Geral do GNU para mais detalhes. | ||
30 | -Voce deve ter recebido uma copia da Licenca Publica Geral do | ||
31 | -GNU junto com este programa; se nao, escreva para a | ||
32 | -Free Software Foundation, Inc., no endereco | ||
33 | -59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | ||
34 | -*/ | ||
35 | -if(typeof(i3GEOF) === 'undefined'){ | ||
36 | - var i3GEOF = {}; | ||
37 | -} | ||
38 | -/* | ||
39 | -Classe: i3GEOF.mostraregiao | ||
40 | - | ||
41 | -Permite que o usuário escolha um tipo de região para incluir no mapa | ||
42 | - */ | ||
43 | -i3GEOF.mostraregiao = { | ||
44 | - /** | ||
45 | - * Ativa/desativa o indicador de aguarde | ||
46 | - */ | ||
47 | - aguarde: function(obj){ | ||
48 | - if(!obj){ | ||
49 | - return "<img style='display:block;z-index:2' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />"; | ||
50 | - } | ||
51 | - var i = $i(obj.id+"_imagem"); | ||
52 | - if(!i){ | ||
53 | - obj.innerHTML = "<img id='"+obj.id+"_imagem' style='display:block;z-index:2' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />"; | ||
54 | - } | ||
55 | - else{ | ||
56 | - if(i.style.display == "block"){ | ||
57 | - i.style.display = "none"; | ||
58 | - } | ||
59 | - else{ | ||
60 | - i.style.display = "block"; | ||
61 | - } | ||
62 | - } | ||
63 | - }, | ||
64 | - //para efeitos de compatibilidade | ||
65 | - criaJanelaFlutuante: function(){ | ||
66 | - i3GEOF.mostraregiao.iniciaDicionario(); | ||
67 | - }, | ||
68 | - /** | ||
69 | - * Inicia a ferramenta ativando as opcoes | ||
70 | - * Executa i3GEOF.mostraregiao.comboRegioes | ||
71 | - */ | ||
72 | - inicia: function(divid){ | ||
73 | - $i(divid).innerHTML = i3GEOF.mostraregiao.html(); | ||
74 | - i3GEOF.mostraregiao.comboRegioes($i("i3geomostraregiaoTipoRegiao")); | ||
75 | - YAHOO.i3GEO.janela.manager.find("i3GEOF.mostraregiao").setFooter('<input id=i3geomostraregiaoAplica type="button" value="'+$trad("p14")+'" />'); | ||
76 | - new YAHOO.widget.Button( | ||
77 | - "i3geomostraregiaoAplica", | ||
78 | - {onclick:{fn: function(){i3GEOF.mostraregiao.aplica();}}} | ||
79 | - ); | ||
80 | - $i("i3geomostraregiaoAplica-button").style.width = "180px"; | ||
81 | - }, | ||
82 | - /** | ||
83 | - * Carrega o dicionario com a traducao | ||
84 | - * Executa i3GEOF.mostraregiao.iniciaJanelaFlutuante(); | ||
85 | - */ | ||
86 | - iniciaDicionario: function(){ | ||
87 | - if(!i3GEOF.metaestat || typeof(i3GEOF.metaestat.dicionario) === 'undefined'){ | ||
88 | - i3GEO.util.scriptTag( | ||
89 | - i3GEO.configura.locaplic+"/ferramentas/metaestat/dicionario.js", | ||
90 | - "i3GEOF.mostraregiao.iniciaJanelaFlutuante()", | ||
91 | - "i3GEOF.metaestat.dicionario_script" | ||
92 | - ); | ||
93 | - } | ||
94 | - else{ | ||
95 | - i3GEOF.mostraregiao.iniciaJanelaFlutuante(); | ||
96 | - } | ||
97 | - }, | ||
98 | - /** | ||
99 | - * Abre a janela flutuante com o conteudo da ferramenta | ||
100 | - * Executa i3GEOF.mostraregiao.inicia | ||
101 | - */ | ||
102 | - iniciaJanelaFlutuante: function(){ | ||
103 | - if($i("i3GEOF.mostraregiao_corpo")){ | ||
104 | - return; | ||
105 | - } | ||
106 | - var minimiza,cabecalho,janela,divid,titulo; | ||
107 | - cabecalho = function(){ | ||
108 | - }; | ||
109 | - minimiza = function(){ | ||
110 | - i3GEO.janela.minimiza("i3GEOF.mostraregiao"); | ||
111 | - }; | ||
112 | - //cria a janela flutuante | ||
113 | - titulo = "Limites "; | ||
114 | - janela = i3GEO.janela.cria( | ||
115 | - "210px", | ||
116 | - "", | ||
117 | - "", | ||
118 | - "", | ||
119 | - "", | ||
120 | - titulo, | ||
121 | - "i3GEOF.mostraregiao", | ||
122 | - false, | ||
123 | - "hd", | ||
124 | - cabecalho, | ||
125 | - minimiza | ||
126 | - ); | ||
127 | - divid = janela[2].id; | ||
128 | - $i("i3GEOF.mostraregiao_corpo").style.backgroundColor = "white"; | ||
129 | - i3GEOF.mostraregiao.inicia(divid); | ||
130 | - i3GEO.janela.tempoMsg("Utilize a guia lateral para ligar/desligar camadas que já estejam no mapa"); | ||
131 | - }, | ||
132 | - /** | ||
133 | - * HTML com o conteudo da ferramenta | ||
134 | - * | ||
135 | - * @return HTML | ||
136 | - */ | ||
137 | - html: function(){ | ||
138 | - var ins = "" + | ||
139 | - '<div class="paragrafo" id="i3geomostraregiaoTipoRegiao" >' + | ||
140 | - '</div>' + | ||
141 | - '<p class=paragrafo ><input type=checkbox id="i3geomostraregiaoNomes" style="cursor:pointer;position:relative;top:2px;" /> Inclui nomes</p>' + | ||
142 | - '<p class=paragrafo >Contorno:</p>' + | ||
143 | - 'Cor: ' + $inputText("","","i3geomostraregiaoOutlinecolor","",12,"255,0,0") + | ||
144 | - ' <img alt="aquarela.gif" style=position:relative;top:2px;cursor:pointer src="'+i3GEO.configura.locaplic+'/imagens/aquarela.gif" onclick="i3GEOF.mostraregiao.corj(\'i3geomostraregiaoOutlinecolor\')" /> ' + | ||
145 | - '<br><br>Largura: ' + $inputText("","","i3geomostraregiaoWidth","",3,"1") + | ||
146 | - '<br><br>' ; | ||
147 | - return ins; | ||
148 | - }, | ||
149 | - /** | ||
150 | - * Monta o combo com as regioes cadastradas | ||
151 | - * Executa i3GEO.php.listaTipoRegiao | ||
152 | - */ | ||
153 | - comboRegioes: function(objonde){ | ||
154 | - if(objonde){ | ||
155 | - i3GEOF.mostraregiao.aguarde(objonde); | ||
156 | - } | ||
157 | - var temp = function(regioes){ | ||
158 | - var ins = '', | ||
159 | - i,n; | ||
160 | - n = regioes.length; | ||
161 | - ins += "<select id='i3geomostraregiaoComboTipoRegiao' style='width:90%' ><option value=''>---</option>"; | ||
162 | - for(i=0;i<n;i++){ | ||
163 | - ins += "<option value='"+regioes[i].codigo_tipo_regiao+"'>"+regioes[i].nome_tipo_regiao+"</option>"; | ||
164 | - } | ||
165 | - ins += "</select><br>"; | ||
166 | - if(objonde){ | ||
167 | - objonde.innerHTML = ins; | ||
168 | - } | ||
169 | - return ins; | ||
170 | - }; | ||
171 | - i3GEO.php.listaTipoRegiao(temp); | ||
172 | - }, | ||
173 | - /** | ||
174 | - * Obtem os parametros necessarios e adiciona ao mapa uma nova camada com a regiao | ||
175 | - * Executa ferramentas/metaestat/analise.php?funcao=adicionaLimiteRegiao | ||
176 | - */ | ||
177 | - aplica: function(){ | ||
178 | - var combo = $i("i3geomostraregiaoComboTipoRegiao"), | ||
179 | - nomes = $i("i3geomostraregiaoNomes"); | ||
180 | - if (combo.value === ""){ | ||
181 | - i3GEO.janela.tempoMsg("Escolha um limite geográfico"); | ||
182 | - return; | ||
183 | - } | ||
184 | - i3GEO.janela.abreAguarde("aguardeMostraRegiao","Aguarde..."); | ||
185 | - var temp = function(retorno){ | ||
186 | - i3GEO.janela.fechaAguarde("aguardeMostraRegiao"); | ||
187 | - i3GEO.atualiza(); | ||
188 | - | ||
189 | - }; | ||
190 | - if(nomes.checked == true){ | ||
191 | - nomes = "sim"; | ||
192 | - } | ||
193 | - else{ | ||
194 | - nomes = "nao"; | ||
195 | - } | ||
196 | - i3GEO.janela.AGUARDEMODAL = true; | ||
197 | - i3GEO.janela.abreAguarde("aguardeMostraRegiao","Aplicando..."); | ||
198 | - i3GEO.janela.AGUARDEMODAL = false; | ||
199 | - p = i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=adicionaLimiteRegiao"+ | ||
200 | - "&codigo_tipo_regiao="+combo.value+ | ||
201 | - "&g_sid="+i3GEO.configura.sid+ | ||
202 | - "&outlinecolor="+$i("i3geomostraregiaoOutlinecolor").value+ | ||
203 | - "&width="+$i("i3geomostraregiaoWidth").value+ | ||
204 | - "&nomes="+nomes; | ||
205 | - i3GEO.util.ajaxGet(p,temp); | ||
206 | - //i3GEO.php.mapfileTipoRegiao(temp,combo.value,$i("i3geomostraregiaoOutlinecolor").value,$i("i3geomostraregiaoWidth").value,nomes); | ||
207 | - }, | ||
208 | - /** | ||
209 | - * Abre a janela de dialogo para escolha da cor que sera usada para desenhar a regiao | ||
210 | - */ | ||
211 | - corj: function(obj){ | ||
212 | - i3GEO.util.abreCor("",obj); | ||
213 | - } | ||
214 | -}; | ||
215 | \ No newline at end of file | 0 | \ No newline at end of file |
@@ -0,0 +1,24 @@ | @@ -0,0 +1,24 @@ | ||
1 | +<?php | ||
2 | +include(dirname(__FILE__)."/../blacklist.php"); | ||
3 | +verificaBlFerramentas(basename(dirname(__FILE__))); | ||
4 | + | ||
5 | + | ||
6 | +/** | ||
7 | + * Carrega os programas javascript necessarios para a ferramenta | ||
8 | + * Esse programa e usado na tag <script> ou com a funcao scripttag do i3Geo | ||
9 | + * Alem de carregar os scripts, carrega tambem o template no formato MUSTACHE, definindo a variavel | ||
10 | + * javascript i3GEOF.mostraExten.MUSTACHE | ||
11 | + * O template e substituido pelos valores definidos em index.js no momento da inicializacao da ferramenta | ||
12 | + */ | ||
13 | +if(extension_loaded('zlib')){ | ||
14 | + ob_start('ob_gzhandler'); | ||
15 | +} | ||
16 | +header("Content-type: text/javascript"); | ||
17 | +include("index.js"); | ||
18 | +include("dicionario.js"); | ||
19 | +echo "\n"; | ||
20 | + | ||
21 | +if(extension_loaded('zlib')){ | ||
22 | + ob_end_flush(); | ||
23 | +} | ||
24 | +?> | ||
0 | \ No newline at end of file | 25 | \ No newline at end of file |
@@ -0,0 +1,37 @@ | @@ -0,0 +1,37 @@ | ||
1 | +i3GEOF.mostraregiao.dicionario = { | ||
2 | + 'regiao' : [ { | ||
3 | + pt : "Região", | ||
4 | + en : "", | ||
5 | + es : "" | ||
6 | + } ], | ||
7 | + 'nomes' : [ { | ||
8 | + pt : "Inclui nomes", | ||
9 | + en : "", | ||
10 | + es : "" | ||
11 | + } ], | ||
12 | + 'contorno' : [ { | ||
13 | + pt : "Contorno", | ||
14 | + en : "", | ||
15 | + es : "" | ||
16 | + } ], | ||
17 | + 'cor' : [ { | ||
18 | + pt : "Cor do contorno", | ||
19 | + en : "", | ||
20 | + es : "" | ||
21 | + } ], | ||
22 | + 'largura' : [ { | ||
23 | + pt : "Espessura", | ||
24 | + en : "", | ||
25 | + es : "" | ||
26 | + } ], | ||
27 | + 'aplicar' : [ { | ||
28 | + pt : "Aplicar", | ||
29 | + en : "", | ||
30 | + es : "" | ||
31 | + } ], | ||
32 | + 'limites' : [ { | ||
33 | + pt : "Limites de regiões", | ||
34 | + en : "", | ||
35 | + es : "" | ||
36 | + } ] | ||
37 | +}; | ||
0 | \ No newline at end of file | 38 | \ No newline at end of file |
@@ -0,0 +1,176 @@ | @@ -0,0 +1,176 @@ | ||
1 | +/* | ||
2 | +Title: Ferramenta que permite mostrar os limites de um tipo de região baseada no cadastro do módulo METAESTAT | ||
3 | + | ||
4 | +A regiao e mostrada como uma nova camada no mapa | ||
5 | + | ||
6 | +Arquivo: | ||
7 | + | ||
8 | +i3geo/ferramentas/metaestat/mostraregiao.js | ||
9 | + | ||
10 | +Licenca: | ||
11 | + | ||
12 | +GPL2 | ||
13 | + | ||
14 | +i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | ||
15 | + | ||
16 | +Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | ||
17 | +Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | ||
18 | + | ||
19 | +Esse programa utiliza parcialmente os codigos da aplicacao calculadora de carbono desenvolvido pelo | ||
20 | +IPAM - Instituto de Pesquisa Ambiental da Amazonia | ||
21 | + | ||
22 | +Este programa e software livre; voce pode redistribui-lo | ||
23 | +e/ou modifica-lo sob os termos da Licenca Publica Geral | ||
24 | +GNU conforme publicada pela Free Software Foundation; | ||
25 | + | ||
26 | +Este programa e distribuido na expectativa de que seja util, | ||
27 | +porem, SEM NENHUMA GARANTIA; nem mesmo a garantia implicita | ||
28 | +de COMERCIABILIDADE OU ADEQUACAO A UMA FINALIDADE ESPECIFICA. | ||
29 | +Consulte a Licenca Publica Geral do GNU para mais detalhes. | ||
30 | +Voce deve ter recebido uma copia da Licenca Publica Geral do | ||
31 | +GNU junto com este programa; se nao, escreva para a | ||
32 | +Free Software Foundation, Inc., no endereco | ||
33 | +59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | ||
34 | +*/ | ||
35 | +if(typeof(i3GEOF) === 'undefined'){ | ||
36 | + var i3GEOF = {}; | ||
37 | +} | ||
38 | +/* | ||
39 | +Classe: i3GEOF.mostraregiao | ||
40 | + | ||
41 | +Permite que o usuário escolha um tipo de região para incluir no mapa | ||
42 | + */ | ||
43 | +i3GEOF.mostraregiao = { | ||
44 | + aguarde: "", | ||
45 | + /** | ||
46 | + * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php | ||
47 | + */ | ||
48 | + MUSTACHE : "", | ||
49 | + /** | ||
50 | + * Susbtitutos para o template | ||
51 | + */ | ||
52 | + mustacheHash : function() { | ||
53 | + var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.mostraregiao.dicionario); | ||
54 | + return dicionario; | ||
55 | + }, | ||
56 | + /** | ||
57 | + * Inicia a ferramenta ativando as opcoes | ||
58 | + * Executa i3GEOF.mostraregiao.comboRegioes | ||
59 | + */ | ||
60 | + inicia: function(divid){ | ||
61 | + if(i3GEOF.mostraregiao.MUSTACHE == ""){ | ||
62 | + $.get(i3GEO.configura.locaplic + "/ferramentas/mostraregiao/template_mst.html", function(template) { | ||
63 | + i3GEOF.mostraregiao.MUSTACHE = template; | ||
64 | + i3GEOF.mostraregiao.inicia(divid); | ||
65 | + }); | ||
66 | + return; | ||
67 | + } | ||
68 | + $i(divid).innerHTML = i3GEOF.mostraregiao.html(); | ||
69 | + i3GEO.util.aplicaAquarela("i3GEOF.mostraregiao_corpo"); | ||
70 | + i3GEOF.mostraregiao.comboRegioes($i("i3geomostraregiaoTipoRegiao")); | ||
71 | + }, | ||
72 | + /** | ||
73 | + * Abre a janela flutuante com o conteudo da ferramenta | ||
74 | + * Executa i3GEOF.mostraregiao.inicia | ||
75 | + */ | ||
76 | + iniciaJanelaFlutuante: function(){ | ||
77 | + if($i("i3GEOF.mostraregiao_corpo")){ | ||
78 | + return; | ||
79 | + } | ||
80 | + var minimiza,cabecalho,janela,divid,titulo; | ||
81 | + cabecalho = function(){ | ||
82 | + }; | ||
83 | + minimiza = function(){ | ||
84 | + i3GEO.janela.minimiza("i3GEOF.mostraregiao",200); | ||
85 | + }; | ||
86 | + //cria a janela flutuante | ||
87 | + titulo = "<span class='i3GeoTituloJanelaBsNolink' >"+$trad("limites",i3GEOF.mostraregiao.dicionario)+"</span></div>"; | ||
88 | + janela = i3GEO.janela.cria( | ||
89 | + "300px", | ||
90 | + "", | ||
91 | + "", | ||
92 | + "", | ||
93 | + "", | ||
94 | + titulo, | ||
95 | + "i3GEOF.mostraregiao", | ||
96 | + false, | ||
97 | + "hd", | ||
98 | + cabecalho, | ||
99 | + minimiza, | ||
100 | + "", | ||
101 | + true, | ||
102 | + "", | ||
103 | + "", | ||
104 | + "", | ||
105 | + "" | ||
106 | + ); | ||
107 | + divid = janela[2].id; | ||
108 | + i3GEOF.mostraregiao.aguarde = $i("i3GEOF.mostraregiao_imagemCabecalho").style; | ||
109 | + i3GEOF.mostraregiao.inicia(divid); | ||
110 | + }, | ||
111 | + /** | ||
112 | + * HTML com o conteudo da ferramenta | ||
113 | + * | ||
114 | + * @return HTML | ||
115 | + */ | ||
116 | + html: function(){ | ||
117 | + var ins = Mustache.render(i3GEOF.mostraregiao.MUSTACHE, i3GEOF.mostraregiao.mustacheHash()); | ||
118 | + return ins; | ||
119 | + }, | ||
120 | + /** | ||
121 | + * Monta o combo com as regioes cadastradas | ||
122 | + * Executa i3GEO.php.listaTipoRegiao | ||
123 | + */ | ||
124 | + comboRegioes: function(objonde){ | ||
125 | + var temp = function(regioes){ | ||
126 | + var ins = '', | ||
127 | + i,n; | ||
128 | + n = regioes.length; | ||
129 | + ins += "<select class='form-control' id='i3geomostraregiaoComboTipoRegiao' ><option value=''>---</option>"; | ||
130 | + for(i=0;i<n;i++){ | ||
131 | + ins += "<option value='"+regioes[i].codigo_tipo_regiao+"'>"+regioes[i].nome_tipo_regiao+"</option>"; | ||
132 | + } | ||
133 | + ins += "</select>"; | ||
134 | + if(objonde){ | ||
135 | + objonde.innerHTML = ins; | ||
136 | + } | ||
137 | + return ins; | ||
138 | + }; | ||
139 | + i3GEO.php.listaTipoRegiao(temp); | ||
140 | + }, | ||
141 | + /** | ||
142 | + * Obtem os parametros necessarios e adiciona ao mapa uma nova camada com a regiao | ||
143 | + * Executa ferramentas/metaestat/analise.php?funcao=adicionaLimiteRegiao | ||
144 | + */ | ||
145 | + aplica: function(){ | ||
146 | + if(i3GEOF.mostraregiao.aguarde.visibility === "visible") | ||
147 | + {return;} | ||
148 | + | ||
149 | + | ||
150 | + var combo = $i("i3geomostraregiaoComboTipoRegiao"), | ||
151 | + nomes = $i("i3geomostraregiaoNomes"); | ||
152 | + if (combo.value === ""){ | ||
153 | + return; | ||
154 | + } | ||
155 | + i3GEOF.mostraregiao.aguarde.visibility = "visible"; | ||
156 | + var temp = function(retorno){ | ||
157 | + i3GEOF.mostraregiao.aguarde.visibility = "hidden"; | ||
158 | + i3GEO.atualiza(); | ||
159 | + | ||
160 | + }; | ||
161 | + if(nomes.checked == true){ | ||
162 | + nomes = "sim"; | ||
163 | + } | ||
164 | + else{ | ||
165 | + nomes = "nao"; | ||
166 | + } | ||
167 | + p = i3GEO.configura.locaplic+"/ferramentas/metaestat/analise.php?funcao=adicionaLimiteRegiao"+ | ||
168 | + "&codigo_tipo_regiao="+combo.value+ | ||
169 | + "&g_sid="+i3GEO.configura.sid+ | ||
170 | + "&outlinecolor="+$i("i3geomostraregiaoOutlinecolor").value+ | ||
171 | + "&width="+$i("i3geomostraregiaoWidth").value+ | ||
172 | + "&nomes="+nomes; | ||
173 | + i3GEO.util.ajaxGet(p,temp); | ||
174 | + //i3GEO.php.mapfileTipoRegiao(temp,combo.value,$i("i3geomostraregiaoOutlinecolor").value,$i("i3geomostraregiaoWidth").value,nomes); | ||
175 | + } | ||
176 | +}; | ||
0 | \ No newline at end of file | 177 | \ No newline at end of file |
@@ -0,0 +1,26 @@ | @@ -0,0 +1,26 @@ | ||
1 | +<div class='container-fluid'> | ||
2 | + <div style="width: 100%;" class='form-group label-fixed condensed'> | ||
3 | + <label class="control-label" for="">{{{regiao}}}</label> | ||
4 | + <div style="width: 100%;" class="input-group"> | ||
5 | + <div id="i3geomostraregiaoTipoRegiao"></div> | ||
6 | + </div> | ||
7 | + </div> | ||
8 | + <div class="checkbox text-left"> | ||
9 | + <label> | ||
10 | + <input checked id='i3geomostraregiaoNomes' type="checkbox"> | ||
11 | + <span class="checkbox-material noprint"> | ||
12 | + <span class="check"></span> | ||
13 | + </span> | ||
14 | + {{{nomes}}} | ||
15 | + </label> | ||
16 | + </div> | ||
17 | + <div class='form-group label-fixed condensed'> | ||
18 | + <label class="control-label" for="i3geomostraregiaoOutlinecolor">{{{cor}}}</label> | ||
19 | + <input class="form-control input-lg i3geoFormIconeAquarela" type='text' id='i3geomostraregiaoOutlinecolor' value='255,0,0' /> | ||
20 | + </div> | ||
21 | + <div class='form-group label-fixed condensed'> | ||
22 | + <label class="control-label" for="i3geomostraregiaoWidth">{{{largura}}}</label> | ||
23 | + <input class="form-control input-lg" type='text' id='i3geomostraregiaoWidth' value='1' /> | ||
24 | + </div> | ||
25 | + <button onclick="i3GEOF.mostraregiao.aplica()" class='btn btn-primary btn-sm btn-raised'>{{{aplicar}}}</button> | ||
26 | +</div> | ||
0 | \ No newline at end of file | 27 | \ No newline at end of file |