Commit 5a6c2b1d2bad456a5ff17197cc0b88824cb68ee8
1 parent
82990812
Exists in
master
and in
7 other branches
Correção nos estilos das guias das janelas flutuantes
Showing
6 changed files
with
411 additions
and
239 deletions
Show diff stats
css/corrigeyui_geral.css
... | ... | @@ -143,9 +143,13 @@ width:16px; |
143 | 143 | .yui-skin-sam .yui-button{ |
144 | 144 | border-width:1px 0;border-style:solid;border-color:#808080;background:url(../pacotes/yui270/build/assets/skins/sam/sprite.png) repeat-x 0 0;margin:auto .25em; |
145 | 145 | } |
146 | + | |
147 | +.yui-skin-sam .yui-button .yui-push-button .yui-button-hover .yui-push-button-hover | |
148 | +{color:#bfdaff;} | |
149 | + | |
146 | 150 | .yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a |
147 | 151 | { |
148 | - padding:0 10px; | |
152 | + padding:5px 15px; | |
149 | 153 | font-size:11px; |
150 | 154 | line-height:2; |
151 | 155 | *line-height:1.7; | ... | ... |
css/i3geo.css
... | ... | @@ -1103,9 +1103,13 @@ width:16px; |
1103 | 1103 | .yui-skin-sam .yui-button{ |
1104 | 1104 | border-width:1px 0;border-style:solid;border-color:#808080;background:url(../pacotes/yui270/build/assets/skins/sam/sprite.png) repeat-x 0 0;margin:auto .25em; |
1105 | 1105 | } |
1106 | + | |
1107 | +.yui-skin-sam .yui-button .yui-push-button .yui-button-hover .yui-push-button-hover | |
1108 | +{color:#bfdaff;} | |
1109 | + | |
1106 | 1110 | .yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a |
1107 | 1111 | { |
1108 | - padding:0 10px; | |
1112 | + padding:5px 15px; | |
1109 | 1113 | font-size:11px; |
1110 | 1114 | line-height:2; |
1111 | 1115 | *line-height:1.7; | ... | ... |
css/i3geo.css.php
... | ... | @@ -1103,9 +1103,13 @@ width:16px; |
1103 | 1103 | .yui-skin-sam .yui-button{ |
1104 | 1104 | border-width:1px 0;border-style:solid;border-color:#808080;background:url(../pacotes/yui270/build/assets/skins/sam/sprite.png) repeat-x 0 0;margin:auto .25em; |
1105 | 1105 | } |
1106 | + | |
1107 | +.yui-skin-sam .yui-button .yui-push-button .yui-button-hover .yui-push-button-hover | |
1108 | +{color:#bfdaff;} | |
1109 | + | |
1106 | 1110 | .yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a |
1107 | 1111 | { |
1108 | - padding:0 10px; | |
1112 | + padding:5px 15px; | |
1109 | 1113 | font-size:11px; |
1110 | 1114 | line-height:2; |
1111 | 1115 | *line-height:1.7; | ... | ... |
ferramentas/analisageometrias/index.js
... | ... | @@ -1,231 +0,0 @@ |
1 | -/* | |
2 | -About: Licença | |
3 | - | |
4 | -I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
5 | - | |
6 | -Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | |
7 | -Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br | |
8 | - | |
9 | -Este programa é software livre; você pode redistribuí-lo | |
10 | -e/ou modificá-lo sob os termos da Licença Pública Geral | |
11 | -GNU conforme publicada pela Free Software Foundation; | |
12 | -tanto a versão 2 da Licença. | |
13 | -Este programa é distribuído na expectativa de que seja útil, | |
14 | -porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
15 | -de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
16 | -Consulte a Licença Pública Geral do GNU para mais detalhes. | |
17 | -Você deve ter recebido uma cópia da Licença Pública Geral do | |
18 | -GNU junto com este programa; se não, escreva para a | |
19 | -Free Software Foundation, Inc., no endereço | |
20 | -59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
21 | -*/ | |
22 | -//inicializa | |
23 | -parametrosURL() | |
24 | -comboi = "" | |
25 | -tema = "" | |
26 | -aguarde("block") | |
27 | -ativaGuias("") | |
28 | -mostraGuia("guia1") | |
29 | -//eventos das guias | |
30 | -$i("guia1").onclick = function() | |
31 | -{mostraGuia("guia1")} | |
32 | -$i("guia2").onclick = function() | |
33 | -{mostraGuia("guia2");listageometrias();} | |
34 | -$i("guia3").onclick = function() | |
35 | -{mostraGuia("guia3");} | |
36 | - | |
37 | -mensagemAjuda("men1",$i("men1").innerHTML) | |
38 | -mensagemAjuda("men2","") | |
39 | -mensagemAjuda("men3","") | |
40 | - | |
41 | -//combo com o tipo de operacao | |
42 | -var combot = "<select id=tipoOperacao onchange='operacao(this)' >" | |
43 | -combot += "<option value='adiciona' >Adiciona</option>" | |
44 | -combot += "<option value='retira' >Retira</option>" | |
45 | -combot += "<option value='inverte' >Inverte</option>" | |
46 | -combot += "<option value='limpa' >Limpa</option>" | |
47 | -combot += "</select>" | |
48 | -$i("operacao").innerHTML = combot | |
49 | -//cria combo com os temas | |
50 | -comboTemasLigados("comboTemas",function(retorno) | |
51 | -{ | |
52 | - window.parent.g_tipoacao = "selecao"; | |
53 | - window.parent.i3GEO.eventos.MOUSECLIQUE.push("i3GEO.selecao.clique()"); | |
54 | - $i("temas").innerHTML = retorno.dados | |
55 | - aguarde("none") | |
56 | - $i("comboTemas").onchange = function() | |
57 | - {window.parent.i3GEO.temaAtivo = $i("comboTemas").value} | |
58 | -},"temas") | |
59 | - | |
60 | -YAHOO.example.init = function () | |
61 | -{ | |
62 | - function onPushButtonsMarkupReady() | |
63 | - { | |
64 | - new YAHOO.widget.Button("botao1"); | |
65 | - new YAHOO.widget.Button("botao2"); | |
66 | - new YAHOO.widget.Button("botao3"); | |
67 | - new YAHOO.widget.Button("botaof1"); | |
68 | - } | |
69 | - YAHOO.util.Event.onContentReady("botao1", onPushButtonsMarkupReady); | |
70 | -}() | |
71 | - | |
72 | -//executa o tipo de operacao selecionada se for o caso | |
73 | -function operacao(tipo) | |
74 | -{ | |
75 | - if((tipo.value == "limpa") || (tipo.value == "inverte")) | |
76 | - { | |
77 | - aguarde("block") | |
78 | - var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=selecaopt&tema="+$i("comboTemas").value+"&tipo="+tipo.value | |
79 | - var cp = new cpaint(); | |
80 | - //cp.set_debug(2) | |
81 | - cp.set_response_type("JSON"); | |
82 | - window.parent.g_operacao = "selecao" | |
83 | - cp.call(p,"selecaoPT",window.parent.i3GEO.atualiza); | |
84 | - } | |
85 | -} | |
86 | -//captura as geometrias selecionadas e grava em arquivos | |
87 | -function capturageo() | |
88 | -{ | |
89 | - var nome=window.prompt("Nome que sera dado a geometria:") | |
90 | - aguarde("block") | |
91 | - var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=capturageometrias&tema="+$i("comboTemas").value+"&nome="+nome | |
92 | - var cp = new cpaint(); | |
93 | - //cp.set_debug(2) | |
94 | - cp.set_response_type("JSON"); | |
95 | - cp.call(p,"capturageo",listageometrias); | |
96 | -} | |
97 | -//lista as geometrias capturadas | |
98 | -function listageometrias() | |
99 | -{ | |
100 | - var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=listageometrias" | |
101 | - var cp = new cpaint(); | |
102 | - //cp.set_debug(2) | |
103 | - cp.set_response_type("JSON"); | |
104 | - cp.call(p,"listageometrias",montalistageometrias); | |
105 | -} | |
106 | -//monta a lista de geometrias | |
107 | -function montalistageometrias(retorno) | |
108 | -{ | |
109 | - if(retorno.data != "") | |
110 | - { | |
111 | - var ins = "<div onclick='excluirgeo()' style=top:0px; ><br><input id=botao4 type=button size=20 value='Excluir marcados' \></div>" | |
112 | - ins += "<div onclick='incmapa()' style=position:absolute;top:14px;left:140px ><input id=botao5 type=button size=20 value='Ver no mapa' \></div><br>" | |
113 | - var cor = "rgb(245,245,245)" | |
114 | - for (i=0;i<retorno.data.length; i++) | |
115 | - { | |
116 | - ins += "<table width=700 ><tr style=background-color:"+cor+" >" | |
117 | - ins += "<td width=5 ><input type=checkbox id="+retorno.data[i].arquivo+" style=cursor:pointer \></td>" | |
118 | - ins += "<td width=55 >"+retorno.data[i].layer+" "+retorno.data[i].arquivo+"</td>" | |
119 | - ins += "<td><table>" | |
120 | - var temp = retorno.data[i].dados | |
121 | - for (j=0;j<temp.length; j++) | |
122 | - { | |
123 | - ins += "<tr><td>"+temp[j].id+"</td><td style=text-align:left >" | |
124 | - if (temp[j].imagem != "") | |
125 | - {ins += "<img src='"+temp[j].imagem+"' />"} | |
126 | - for (k=0;k<temp[j].valores.length; k++) | |
127 | - { | |
128 | - ins += temp[j].valores[k].item+" = "+temp[j].valores[k].valor+"<br>" | |
129 | - | |
130 | - } | |
131 | - ins += "</td></tr>" | |
132 | - } | |
133 | - ins += "</table></td>" | |
134 | - ins += "</tr></table>" | |
135 | - if (cor == "rgb(245,245,245)"){cor = "rgb(255,255,255)"} | |
136 | - else {cor = "rgb(245,245,245)"} | |
137 | - } | |
138 | - $i("listadegeometrias").innerHTML = ins | |
139 | - YAHOO.example.init = function () | |
140 | - { | |
141 | - function onPushButtonsMarkupReady() | |
142 | - { | |
143 | - new YAHOO.widget.Button("botao4"); | |
144 | - new YAHOO.widget.Button("botao5"); | |
145 | - } | |
146 | - YAHOO.util.Event.onContentReady("botao5", onPushButtonsMarkupReady); | |
147 | - }() | |
148 | - } | |
149 | - aguarde("none") | |
150 | -} | |
151 | -function pegaMarcados() | |
152 | -{ | |
153 | - var inputs = $i("listadegeometrias").getElementsByTagName("input") | |
154 | - var listai = new Array; | |
155 | - for (i=0;i<inputs.length; i++) | |
156 | - { | |
157 | - if (inputs[i].checked == true) | |
158 | - {listai.push(inputs[i].id);} | |
159 | - } | |
160 | - return (listai.join(",")) | |
161 | -} | |
162 | -function incmapa() | |
163 | -{ | |
164 | - var lista = pegaMarcados() | |
165 | - var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=incmapageometrias&lista="+lista | |
166 | - var cp = new cpaint(); | |
167 | - //cp.set_debug(2) | |
168 | - cp.set_response_type("JSON"); | |
169 | - cp.call(p,"incmapageometrias",window.parent.remapaf()); | |
170 | -} | |
171 | -function excluirgeo() | |
172 | -{ | |
173 | - aguarde("block") | |
174 | - var lista = pegaMarcados() | |
175 | - $i("listadegeometrias").innerHTML = "" | |
176 | - var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=removergeometrias&lista="+lista | |
177 | - var cp = new cpaint(); | |
178 | - //cp.set_debug(2) | |
179 | - cp.set_response_type("JSON"); | |
180 | - cp.call(p,"removergeometrias",listageometrias); | |
181 | -} | |
182 | -function calculo() | |
183 | -{ | |
184 | - operacao = $i("calculos").value | |
185 | - if (operacao != "") | |
186 | - { | |
187 | - aguarde("block") | |
188 | - var lista = pegaMarcados() | |
189 | - var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=calculaGeometrias&operacao="+operacao+"&lista="+lista | |
190 | - var cp = new cpaint(); | |
191 | - //cp.set_debug(2) | |
192 | - cp.set_response_type("JSON"); | |
193 | - cp.call(p,"analisaGeometrias",concluidof); | |
194 | - } | |
195 | -} | |
196 | -function funcoes() | |
197 | -{ | |
198 | - operacao = $i("funcoes").value | |
199 | - if (operacao != "") | |
200 | - { | |
201 | - aguarde("block") | |
202 | - var lista = pegaMarcados() | |
203 | - var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=funcoesGeometrias&operacao="+operacao+"&lista="+lista | |
204 | - var cp = new cpaint(); | |
205 | - //cp.set_debug(2) | |
206 | - cp.set_response_type("JSON"); | |
207 | - cp.call(p,"funcoesGeometrias",concluidof); | |
208 | - } | |
209 | -} | |
210 | -function funcoes1() | |
211 | -{ | |
212 | - var lista = pegaMarcados(); | |
213 | - if(window.confirm("Essa operação funciona apenas se houver uma geometria. Continua?")) | |
214 | - { | |
215 | - operacao = $i("funcoes1").value | |
216 | - if (operacao != "") | |
217 | - { | |
218 | - aguarde("block") | |
219 | - var lista = pegaMarcados() | |
220 | - var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=funcoesGeometrias&operacao="+operacao+"&lista="+lista | |
221 | - var cp = new cpaint(); | |
222 | - //cp.set_debug(2) | |
223 | - cp.set_response_type("JSON"); | |
224 | - cp.call(p,"funcoesGeometrias",concluidof); | |
225 | - } | |
226 | - } | |
227 | -} | |
228 | -function concluidof() | |
229 | -{ | |
230 | - aguarde("none") | |
231 | -} | |
232 | 0 | \ No newline at end of file |
... | ... | @@ -0,0 +1,394 @@ |
1 | +/* | |
2 | +Title: Ferramenta análise de geometrias | |
3 | + | |
4 | +File: i3geo/ferramentas/analisageometrias/index.js.php | |
5 | + | |
6 | +About: Licença | |
7 | + | |
8 | +I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
9 | + | |
10 | +Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | |
11 | +Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br | |
12 | + | |
13 | +Este programa é software livre; você pode redistribuí-lo | |
14 | +e/ou modificá-lo sob os termos da Licença Pública Geral | |
15 | +GNU conforme publicada pela Free Software Foundation; | |
16 | +tanto a versão 2 da Licença. | |
17 | +Este programa é distribuído na expectativa de que seja útil, | |
18 | +porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
19 | +de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
20 | +Consulte a Licença Pública Geral do GNU para mais detalhes. | |
21 | +Você deve ter recebido uma cópia da Licença Pública Geral do | |
22 | +GNU junto com este programa; se não, escreva para a | |
23 | +Free Software Foundation, Inc., no endereço | |
24 | +59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
25 | +*/ | |
26 | +if(typeof(i3GEOF) === 'undefined'){ | |
27 | + i3GEOF = []; | |
28 | +} | |
29 | +/* | |
30 | +Class: i3GEOF.analisaGeometrias | |
31 | + | |
32 | +Inclui gráficos em cada elemento de um tema tendo como fonte a tabela de atributos. | |
33 | + | |
34 | +Abre uma janela com várias opções e lista de itens para os gráficos. | |
35 | + | |
36 | +O tema que será utilizado é o que estiver armazenado na variável global i3GEO.temaAtivo | |
37 | +*/ | |
38 | +i3GEOF.analisaGeometrias = { | |
39 | + /* | |
40 | + Function: inicia | |
41 | + | |
42 | + Inicia a ferramenta. É chamado por criaJanelaFlutuante | |
43 | + | |
44 | + Parametro: | |
45 | + | |
46 | + iddiv {String} - id do div que receberá o conteudo HTML da ferramenta | |
47 | + */ | |
48 | + inicia: function(iddiv){ | |
49 | + try{ | |
50 | + $i(iddiv).innerHTML += i3GEOF.analisaGeometrias.html(); | |
51 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOanalisageometrias1","i3GEOanalisageometrias"); | |
52 | + //eventos das guias | |
53 | + $i("i3GEOanalisageometrias1").onclick = function() | |
54 | + {i3GEO.guias.mostraGuiaFerramenta("i3GEOanalisageometriasa1","i3GEOanalisageometrias");}; | |
55 | + $i("i3GEOanalisageometrias2").onclick = function() | |
56 | + {i3GEO.guias.mostraGuiaFerramenta("i3GEOanalisageometrias2","i3GEOanalisageometrias");}; | |
57 | + | |
58 | + new YAHOO.widget.Button( | |
59 | + "i3GEOanalisageometriasbotao1", | |
60 | + {onclick:{fn: i3GEOF.analisaGeometrias.capturageo}} | |
61 | + ); | |
62 | + i3GEO.util.mensagemAjuda("i3GEOanalisageometriasmen1",$i("i3GEOanalisageometriasmen1").innerHTML); | |
63 | + g_tipoacao=""; | |
64 | + g_operacao=""; | |
65 | + i3GEOF.analisaGeometrias.ativaFoco(); | |
66 | + var combot = "<select style='font-size:11px' id='i3GEOanalisageometriastipoOperacao' onchange='i3GEOF.analisaGeometrias.operacao(this)' >" | |
67 | + combot += "<option value='adiciona' >Adiciona</option>" | |
68 | + combot += "<option value='retira' >Retira</option>" | |
69 | + combot += "<option value='inverte' >Inverte</option>" | |
70 | + combot += "<option value='limpa' >Limpa</option>" | |
71 | + combot += "</select>" | |
72 | + $i("i3GEOanalisageometriasoperacao").innerHTML = combot | |
73 | + | |
74 | + } | |
75 | + catch(erro){alert(erro);} | |
76 | + }, | |
77 | + /* | |
78 | + Function: html | |
79 | + | |
80 | + Gera o código html para apresentação das opções da ferramenta | |
81 | + | |
82 | + Retorno: | |
83 | + | |
84 | + String com o código html | |
85 | + */ | |
86 | + html:function(){ | |
87 | + var ins = ''; | |
88 | + ins += '<div id=i3GEOinseregraficoguiasYUI class="yui-navset" style="top:0px;cursor:pointer;left:0px;">'; | |
89 | + ins += ' <ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;">'; | |
90 | + ins += ' <li><a href="#ancora"><em><div id="i3GEOanalisageometrias1" style="text-align:center;left:0px;" >Capturar</div></em></a></li>'; | |
91 | + ins += ' <li><a href="#ancora"><em><div id="i3GEOanalisageometrias2" style="text-align:center;left:0px;" >Listar</div></em></a></li>'; | |
92 | + ins += ' <li><a href="#ancora"><em><div id="i3GEOanalisageometrias3" style="text-align:center;left:0px;" >Analisar</div></em></a></li>'; | |
93 | + ins += ' </ul>'; | |
94 | + ins += '</div>'; | |
95 | + ins += '<div class="geralFerramentas" style="left:0px;top:0px;width:98%;height:86%;">'; | |
96 | + ins += ' <div class=guiaobj id="i3GEOanalisageometrias1obj" style="left:1px;90%;display:none;">'; | |
97 | + ins += ' <p class=paragrafo >Escolha o tema que receberá a seleção:'; | |
98 | + ins += ' <div id="i3GEOanalisageometriastemas" style="width:90%;text-align:left;left:0px">'; | |
99 | + ins += ' </div><br>'; | |
100 | + ins += ' <p class=paragrafo >Tipo de seleção:'; | |
101 | + ins += ' <div id="i3GEOanalisageometriasoperacao" style="width:90%;text-align:left;left:0px">'; | |
102 | + ins += ' </div><br>'; | |
103 | + ins += ' <input id=i3GEOanalisageometriasbotao1 size=45 type=button value="Capturar as geometrias selecionadas"/><br><br>'; | |
104 | + ins += ' <div id=i3GEOanalisageometriasmen1 style="top:5px;left:0px"><p class=paragrafo >Após escolher o tema, clique no mapa para selecionar os elementos desejados, caso vc já não tenha feito isso ou caso deseje alterar a seleção. Concluída a seleção, clique no botão de captura para obter as geometrias. <br>As geometrias capturadas podem ser vistas na segunda guia.'; | |
105 | + ins += ' </div>'; | |
106 | + ins += ' </div>'; | |
107 | + ins += ' <div class=guiaobj id="i3GEOanalisageometrias2obj" style="left:1px;display:none;">'; | |
108 | + | |
109 | + ins += ' </div>'; | |
110 | + ins += ' <div class=guiaobj id="i3GEOanalisageometrias3obj" style="left:1px;display:none;">'; | |
111 | + | |
112 | + ins += ' </div>'; | |
113 | + ins += '</div> '; | |
114 | + return ins; | |
115 | + }, | |
116 | + /* | |
117 | + Function: criaJanelaFlutuante | |
118 | + | |
119 | + Cria a janela flutuante para controle da ferramenta. | |
120 | + */ | |
121 | + criaJanelaFlutuante: function(){ | |
122 | + var minimiza,cabecalho,janela,divid,temp,titulo; | |
123 | + //funcao que sera executada ao ser clicado no cabeçalho da janela | |
124 | + cabecalho = function(){ | |
125 | + i3GEOF.analisaGeometrias.ativaFoco(); | |
126 | + }; | |
127 | + minimiza = function(){ | |
128 | + var temp = $i("i3GEOF.analisaGeometrias_corpo"); | |
129 | + if(temp){ | |
130 | + if(temp.style.display === "block") | |
131 | + {temp.style.display = "none";} | |
132 | + else | |
133 | + {temp.style.display = "block";} | |
134 | + } | |
135 | + }; | |
136 | + //cria a janela flutuante | |
137 | + titulo = "Análise de geometrias <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=3&idajuda=23' > </a>"; | |
138 | + janela = i3GEO.janela.cria( | |
139 | + "500px", | |
140 | + "400px", | |
141 | + "", | |
142 | + "", | |
143 | + "", | |
144 | + titulo, | |
145 | + "i3GEOF.analisaGeometrias", | |
146 | + false, | |
147 | + "hd", | |
148 | + cabecalho, | |
149 | + minimiza | |
150 | + ); | |
151 | + divid = janela[2].id; | |
152 | + | |
153 | + /* | |
154 | + if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEOF.insereGrafico.insere()") < 0) | |
155 | + {i3GEO.eventos.MOUSECLIQUE.push("i3GEOF.insereGrafico.insere()");} | |
156 | + temp = function(){ | |
157 | + i3GEO.eventos.MOUSECLIQUE.remove("i3GEOF.insereGrafico.insere()"); | |
158 | + }; | |
159 | + YAHOO.util.Event.addListener(janela[0].close, "click", temp); | |
160 | + */ | |
161 | + i3GEOF.analisaGeometrias.inicia(divid); | |
162 | + }, | |
163 | + /* | |
164 | + Function: ativaFoco | |
165 | + | |
166 | + Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado | |
167 | + */ | |
168 | + ativaFoco: function(){ | |
169 | + if(g_tipoacao !== 'analisageometrias'){ | |
170 | + g_tipoacao='analisageometrias'; | |
171 | + g_operacao='analisageometrias'; | |
172 | + i3GEOF.analisaGeometrias.comboTemas(); | |
173 | + } | |
174 | + }, | |
175 | + /* | |
176 | + Function: comboTemas | |
177 | + | |
178 | + Cria o combo com os temas disponíveis (temas ligados) para adição dos gráficos. | |
179 | + */ | |
180 | + comboTemas: function(){ | |
181 | + i3GEO.util.comboTemasLigados( | |
182 | + "i3GEOanalisageometriastemasLigados", | |
183 | + function(retorno){ | |
184 | + $i("i3GEOanalisageometriastemas").innerHTML = retorno.dados; | |
185 | + if ($i("i3GEOanalisageometriastemasLigados")){ | |
186 | + $i("i3GEOanalisageometriastemasLigados").onchange = function(){ | |
187 | + i3GEO.temaAtivo = $i("i3GEOanalisageometriastemasLigados").value; | |
188 | + }; | |
189 | + } | |
190 | + if(i3GEO.temaAtivo !== ""){ | |
191 | + $i("i3GEOanalisageometriastemasLigados").value = i3GEO.temaAtivo; | |
192 | + $i("i3GEOanalisageometriastemasLigados").onchange.call(); | |
193 | + } | |
194 | + }, | |
195 | + "i3GEOanalisageometriastemas" | |
196 | + ); | |
197 | + } | |
198 | +}; | |
199 | +/* | |
200 | +$i("guia1").onclick = function() | |
201 | +{mostraGuia("guia1")} | |
202 | +$i("guia2").onclick = function() | |
203 | +{mostraGuia("guia2");listageometrias();} | |
204 | +$i("guia3").onclick = function() | |
205 | +{mostraGuia("guia3");} | |
206 | + | |
207 | +mensagemAjuda("men2","") | |
208 | +mensagemAjuda("men3","") | |
209 | + | |
210 | +//combo com o tipo de operacao | |
211 | +//cria combo com os temas | |
212 | +comboTemasLigados("comboTemas",function(retorno) | |
213 | +{ | |
214 | + window.parent.g_tipoacao = "selecao"; | |
215 | + window.parent.i3GEO.eventos.MOUSECLIQUE.push("i3GEO.selecao.clique()"); | |
216 | + $i("temas").innerHTML = retorno.dados | |
217 | + aguarde("none") | |
218 | + $i("comboTemas").onchange = function() | |
219 | + {window.parent.i3GEO.temaAtivo = $i("comboTemas").value} | |
220 | +},"temas") | |
221 | + | |
222 | +YAHOO.example.init = function () | |
223 | +{ | |
224 | + function onPushButtonsMarkupReady() | |
225 | + { | |
226 | + new YAHOO.widget.Button("botao1"); | |
227 | + new YAHOO.widget.Button("botao2"); | |
228 | + new YAHOO.widget.Button("botao3"); | |
229 | + new YAHOO.widget.Button("botaof1"); | |
230 | + } | |
231 | + YAHOO.util.Event.onContentReady("botao1", onPushButtonsMarkupReady); | |
232 | +}() | |
233 | + | |
234 | +//executa o tipo de operacao selecionada se for o caso | |
235 | +function operacao(tipo) | |
236 | +{ | |
237 | + if((tipo.value == "limpa") || (tipo.value == "inverte")) | |
238 | + { | |
239 | + aguarde("block") | |
240 | + var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=selecaopt&tema="+$i("comboTemas").value+"&tipo="+tipo.value | |
241 | + var cp = new cpaint(); | |
242 | + //cp.set_debug(2) | |
243 | + cp.set_response_type("JSON"); | |
244 | + window.parent.g_operacao = "selecao" | |
245 | + cp.call(p,"selecaoPT",window.parent.i3GEO.atualiza); | |
246 | + } | |
247 | +} | |
248 | +//captura as geometrias selecionadas e grava em arquivos | |
249 | +function capturageo() | |
250 | +{ | |
251 | + var nome=window.prompt("Nome que sera dado a geometria:") | |
252 | + aguarde("block") | |
253 | + var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=capturageometrias&tema="+$i("comboTemas").value+"&nome="+nome | |
254 | + var cp = new cpaint(); | |
255 | + //cp.set_debug(2) | |
256 | + cp.set_response_type("JSON"); | |
257 | + cp.call(p,"capturageo",listageometrias); | |
258 | +} | |
259 | +//lista as geometrias capturadas | |
260 | +function listageometrias() | |
261 | +{ | |
262 | + var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=listageometrias" | |
263 | + var cp = new cpaint(); | |
264 | + //cp.set_debug(2) | |
265 | + cp.set_response_type("JSON"); | |
266 | + cp.call(p,"listageometrias",montalistageometrias); | |
267 | +} | |
268 | +//monta a lista de geometrias | |
269 | +function montalistageometrias(retorno) | |
270 | +{ | |
271 | + if(retorno.data != "") | |
272 | + { | |
273 | + var ins = "<div onclick='excluirgeo()' style=top:0px; ><br><input id=botao4 type=button size=20 value='Excluir marcados' \></div>" | |
274 | + ins += "<div onclick='incmapa()' style=position:absolute;top:14px;left:140px ><input id=botao5 type=button size=20 value='Ver no mapa' \></div><br>" | |
275 | + var cor = "rgb(245,245,245)" | |
276 | + for (i=0;i<retorno.data.length; i++) | |
277 | + { | |
278 | + ins += "<table width=700 ><tr style=background-color:"+cor+" >" | |
279 | + ins += "<td width=5 ><input type=checkbox id="+retorno.data[i].arquivo+" style=cursor:pointer \></td>" | |
280 | + ins += "<td width=55 >"+retorno.data[i].layer+" "+retorno.data[i].arquivo+"</td>" | |
281 | + ins += "<td><table>" | |
282 | + var temp = retorno.data[i].dados | |
283 | + for (j=0;j<temp.length; j++) | |
284 | + { | |
285 | + ins += "<tr><td>"+temp[j].id+"</td><td style=text-align:left >" | |
286 | + if (temp[j].imagem != "") | |
287 | + {ins += "<img src='"+temp[j].imagem+"' />"} | |
288 | + for (k=0;k<temp[j].valores.length; k++) | |
289 | + { | |
290 | + ins += temp[j].valores[k].item+" = "+temp[j].valores[k].valor+"<br>" | |
291 | + | |
292 | + } | |
293 | + ins += "</td></tr>" | |
294 | + } | |
295 | + ins += "</table></td>" | |
296 | + ins += "</tr></table>" | |
297 | + if (cor == "rgb(245,245,245)"){cor = "rgb(255,255,255)"} | |
298 | + else {cor = "rgb(245,245,245)"} | |
299 | + } | |
300 | + $i("listadegeometrias").innerHTML = ins | |
301 | + YAHOO.example.init = function () | |
302 | + { | |
303 | + function onPushButtonsMarkupReady() | |
304 | + { | |
305 | + new YAHOO.widget.Button("botao4"); | |
306 | + new YAHOO.widget.Button("botao5"); | |
307 | + } | |
308 | + YAHOO.util.Event.onContentReady("botao5", onPushButtonsMarkupReady); | |
309 | + }() | |
310 | + } | |
311 | + aguarde("none") | |
312 | +} | |
313 | +function pegaMarcados() | |
314 | +{ | |
315 | + var inputs = $i("listadegeometrias").getElementsByTagName("input") | |
316 | + var listai = new Array; | |
317 | + for (i=0;i<inputs.length; i++) | |
318 | + { | |
319 | + if (inputs[i].checked == true) | |
320 | + {listai.push(inputs[i].id);} | |
321 | + } | |
322 | + return (listai.join(",")) | |
323 | +} | |
324 | +function incmapa() | |
325 | +{ | |
326 | + var lista = pegaMarcados() | |
327 | + var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=incmapageometrias&lista="+lista | |
328 | + var cp = new cpaint(); | |
329 | + //cp.set_debug(2) | |
330 | + cp.set_response_type("JSON"); | |
331 | + cp.call(p,"incmapageometrias",window.parent.remapaf()); | |
332 | +} | |
333 | +function excluirgeo() | |
334 | +{ | |
335 | + aguarde("block") | |
336 | + var lista = pegaMarcados() | |
337 | + $i("listadegeometrias").innerHTML = "" | |
338 | + var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=removergeometrias&lista="+lista | |
339 | + var cp = new cpaint(); | |
340 | + //cp.set_debug(2) | |
341 | + cp.set_response_type("JSON"); | |
342 | + cp.call(p,"removergeometrias",listageometrias); | |
343 | +} | |
344 | +function calculo() | |
345 | +{ | |
346 | + operacao = $i("calculos").value | |
347 | + if (operacao != "") | |
348 | + { | |
349 | + aguarde("block") | |
350 | + var lista = pegaMarcados() | |
351 | + var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=calculaGeometrias&operacao="+operacao+"&lista="+lista | |
352 | + var cp = new cpaint(); | |
353 | + //cp.set_debug(2) | |
354 | + cp.set_response_type("JSON"); | |
355 | + cp.call(p,"analisaGeometrias",concluidof); | |
356 | + } | |
357 | +} | |
358 | +function funcoes() | |
359 | +{ | |
360 | + operacao = $i("funcoes").value | |
361 | + if (operacao != "") | |
362 | + { | |
363 | + aguarde("block") | |
364 | + var lista = pegaMarcados() | |
365 | + var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=funcoesGeometrias&operacao="+operacao+"&lista="+lista | |
366 | + var cp = new cpaint(); | |
367 | + //cp.set_debug(2) | |
368 | + cp.set_response_type("JSON"); | |
369 | + cp.call(p,"funcoesGeometrias",concluidof); | |
370 | + } | |
371 | +} | |
372 | +function funcoes1() | |
373 | +{ | |
374 | + var lista = pegaMarcados(); | |
375 | + if(window.confirm("Essa operação funciona apenas se houver uma geometria. Continua?")) | |
376 | + { | |
377 | + operacao = $i("funcoes1").value | |
378 | + if (operacao != "") | |
379 | + { | |
380 | + aguarde("block") | |
381 | + var lista = pegaMarcados() | |
382 | + var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=funcoesGeometrias&operacao="+operacao+"&lista="+lista | |
383 | + var cp = new cpaint(); | |
384 | + //cp.set_debug(2) | |
385 | + cp.set_response_type("JSON"); | |
386 | + cp.call(p,"funcoesGeometrias",concluidof); | |
387 | + } | |
388 | + } | |
389 | +} | |
390 | +function concluidof() | |
391 | +{ | |
392 | + aguarde("none") | |
393 | +} | |
394 | +*/ | |
0 | 395 | \ No newline at end of file | ... | ... |
ferramentas/inseregrafico/index.js.php
... | ... | @@ -79,8 +79,8 @@ i3GEOF.insereGrafico = { |
79 | 79 | var ins = ''; |
80 | 80 | ins += '<div id=i3GEOinseregraficoguiasYUI class="yui-navset" style="top:0px;cursor:pointer;left:0px;">'; |
81 | 81 | ins += ' <ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;">'; |
82 | - ins += ' <li><a href="#ancora"><em><div id="i3GEOinseregraficoguia1" style="text-align:center;font-size:10px;left:0px;" >Fonte dos dados</div></em></a></li>'; | |
83 | - ins += ' <li><a href="#ancora"><em><div id="i3GEOinseregraficoguia2" style="text-align:center;font-size:10px;left:0px;" >Propriedades</div></em></a></li>'; | |
82 | + ins += ' <li><a href="#ancora"><em><div id="i3GEOinseregraficoguia1" style="text-align:center;left:0px;" >Fonte dos dados</div></em></a></li>'; | |
83 | + ins += ' <li><a href="#ancora"><em><div id="i3GEOinseregraficoguia2" style="text-align:center;left:0px;" >Propriedades</div></em></a></li>'; | |
84 | 84 | ins += ' </ul>'; |
85 | 85 | ins += '</div>'; |
86 | 86 | ins += '<div class="geralFerramentas" style="left:0px;top:0px;width:98%;height:86%;">'; |
... | ... | @@ -109,9 +109,6 @@ i3GEOF.insereGrafico = { |
109 | 109 | ins += ' </tr><tr><td></td><td> </td></tr>'; |
110 | 110 | ins += ' </table>'; |
111 | 111 | ins += ' </div>'; |
112 | - ins += ' <div class=guiaobj id="i3GEOinseregraficoguia3obj" style="left:1px;display:none;">'; | |
113 | - | |
114 | - ins += ' </div>'; | |
115 | 112 | ins += '</div> '; |
116 | 113 | return ins; |
117 | 114 | }, | ... | ... |