Commit 42b0c25cd78cbec07cad5360ed50f1263dac0d77
1 parent
1897bbbf
Exists in
master
and in
7 other branches
Adaptação da ferramenta de edição da legenda para bootstrap
Showing
19 changed files
with
5430 additions
and
2985 deletions
Show diff stats
admin/admin.db
No preview for this file type
css/default.css
... | ... | @@ -594,6 +594,12 @@ Configuracoes especificas dos elementos que ficam no rodape |
594 | 594 | color: white; |
595 | 595 | } |
596 | 596 | |
597 | +.bd hr { | |
598 | + border-top: 2px dashed gray; | |
599 | + margin-top: 15px; | |
600 | + margin-bottom: 15px; | |
601 | +} | |
602 | + | |
597 | 603 | .bd select { |
598 | 604 | background: white; |
599 | 605 | } | ... | ... |
ferramentas/filtro/index.js
... | ... | @@ -304,6 +304,7 @@ i3GEOF.filtro = { |
304 | 304 | if(modoCalculadora === true){ |
305 | 305 | i3GEOF.filtro.aguarde.visibility = "hidden"; |
306 | 306 | $i(idRetorno).value = i3GEOF.filtro.formataMapserver(); |
307 | + i3GEO.janela.destroi("i3GEOF.filtro"); | |
307 | 308 | } |
308 | 309 | else{ |
309 | 310 | p = i3GEO.configura.locaplic+"/ferramentas/filtro/exec.php?base64=sim&g_sid="+i3GEO.configura.sid+"&funcao=inserefiltro"; | ... | ... |
ferramentas/identificax/dicionario.js
... | ... | @@ -1,143 +0,0 @@ |
1 | -//+$trad(1,i3GEOF.identifica.dicionario)+ | |
2 | -i3GEOF.identifica.dicionario = { | |
3 | - 'selecionaTema' : [ { | |
4 | - pt : "Escolha um tema da lista", | |
5 | - en : "", | |
6 | - es : "" | |
7 | - } ], | |
8 | - 'msgEtiquetas' : [ { | |
9 | - pt : "Esse tema não permite etiquetas", | |
10 | - en : "", | |
11 | - es : "" | |
12 | - } ], | |
13 | - 'temasVisiveis' : [ { | |
14 | - pt : "Resultado", | |
15 | - en : "", | |
16 | - es : "" | |
17 | - } ], | |
18 | - 'todos' : [ { | |
19 | - pt : "Todos", | |
20 | - en : "", | |
21 | - es : "" | |
22 | - } ], | |
23 | - 'etiquetas' : [ { | |
24 | - pt : "Etiquetas", | |
25 | - en : "", | |
26 | - es : "" | |
27 | - } ], | |
28 | - 'propriedades' : [ { | |
29 | - pt : "Propriedades", | |
30 | - en : "", | |
31 | - es : "" | |
32 | - } ], | |
33 | - 'msgAguarde' : [ { | |
34 | - pt : "Aguarde", | |
35 | - en : "", | |
36 | - es : "" | |
37 | - } ], | |
38 | - 'resolucaoBusca' : [ { | |
39 | - pt : "Resolução de busca - número de pixels, no entorno do ponto clicado no mapa, que serão utilizados na busca de dados", | |
40 | - en : "", | |
41 | - es : "" | |
42 | - } ], | |
43 | - 'mostraEtiquetas' : [ { | |
44 | - pt : "As etiquetas são mostradas quando o mouse é estacionado sobre um elemento.", | |
45 | - en : "", | |
46 | - es : "" | |
47 | - } ], | |
48 | - 'configuraEtiqueta' : [ { | |
49 | - pt : "Configurar etiquetas", | |
50 | - en : "", | |
51 | - es : "" | |
52 | - } ], | |
53 | - 'valorPonto' : [ { | |
54 | - pt : "Valores para o ponto indicado no mapa", | |
55 | - en : "", | |
56 | - es : "" | |
57 | - } ], | |
58 | - 'criaBuffer' : [ { | |
59 | - pt : "Criar entorno (buffer)", | |
60 | - en : "", | |
61 | - es : "" | |
62 | - } ], | |
63 | - 'verDados' : [ { | |
64 | - pt : "Clique no tema para ver os dados", | |
65 | - en : "", | |
66 | - es : "" | |
67 | - } ], | |
68 | - 'msgNadaEncontrado' : [ { | |
69 | - pt : "Nada encontrado", | |
70 | - en : "", | |
71 | - es : "" | |
72 | - } ], | |
73 | - 'todas' : [ { | |
74 | - pt : "todas", | |
75 | - en : "", | |
76 | - es : "" | |
77 | - } ], | |
78 | - 'mostraOcorrencia' : [ { | |
79 | - pt : "Mostra a ocorrência", | |
80 | - en : "", | |
81 | - es : "" | |
82 | - } ], | |
83 | - 'msgNadaEncontrado2' : [ { | |
84 | - pt : "Nada encontrado", | |
85 | - en : "", | |
86 | - es : "" | |
87 | - } ], | |
88 | - 'adicionaPonto' : [ { | |
89 | - pt : "Clique aqui para adicionar um ponto", | |
90 | - en : "", | |
91 | - es : "" | |
92 | - } ], | |
93 | - 'apagaRegistro' : [ { | |
94 | - pt : "Apagar registro", | |
95 | - en : "", | |
96 | - es : "" | |
97 | - } ], | |
98 | - 'removeRegistroBD' : [ { | |
99 | - pt : "Remove o registro do banco de dados?", | |
100 | - en : "", | |
101 | - es : "" | |
102 | - } ], | |
103 | - 'sim' : [ { | |
104 | - pt : "Sim", | |
105 | - en : "", | |
106 | - es : "" | |
107 | - } ], | |
108 | - 'cancela' : [ { | |
109 | - pt : "Cancela", | |
110 | - en : "", | |
111 | - es : "" | |
112 | - } ], | |
113 | - 'move' : [ { | |
114 | - pt : "Mover", | |
115 | - en : "", | |
116 | - es : "" | |
117 | - } ], | |
118 | - 'cliqueNovaPosicao' : [ { | |
119 | - pt : "Clique no mapa para indicar a nova posição", | |
120 | - en : "", | |
121 | - es : "" | |
122 | - } ], | |
123 | - 'etiquetaAtiva' : [ { | |
124 | - pt : "Etiqueta está ativa", | |
125 | - en : "", | |
126 | - es : "" | |
127 | - } ], | |
128 | - 'filtraValor' : [ { | |
129 | - pt : "Filtrar por valor", | |
130 | - en : "", | |
131 | - es : "" | |
132 | - } ], | |
133 | - 'removeFiltro' : [ { | |
134 | - pt : "Remove filtro", | |
135 | - en : "", | |
136 | - es : "" | |
137 | - } ], | |
138 | - 'atualizaJanela' : [ { | |
139 | - pt : "Atualiza essa janela", | |
140 | - en : "", | |
141 | - es : "" | |
142 | - } ] | |
143 | -}; |
ferramentas/identificax/index.js
... | ... | @@ -1,1289 +0,0 @@ |
1 | -/* | |
2 | -Title: Identifica | |
3 | - | |
4 | -Obtem os atributos de um ou mais temas para uma coordenada. | |
5 | -Abre uma janela com várias opções e lista de temas disponíveis no mapa atual. | |
6 | - | |
7 | -O evento de clique no mapa e ativado em i3geo/classesjs/classe_configura.js | |
8 | - | |
9 | -Varias janelas podem coexistir. | |
10 | - | |
11 | -A lista de ids das janelas abertas e mantido na variavel i3GEOF.identifica.janelas | |
12 | - | |
13 | -As propriedades de cada janela sao mantidas em um objeto indexado pelo id de cada janela e | |
14 | - | |
15 | -mantido em i3GEOF.identifica.propJanelas | |
16 | - | |
17 | -Veja: | |
18 | - | |
19 | -<i3GEO.mapa.dialogo.cliqueIdentificaDefault> | |
20 | - | |
21 | -File: i3geo/ferramentas/identifica/index.js.php | |
22 | - | |
23 | -About: Licença | |
24 | - | |
25 | -i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
26 | - | |
27 | -Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | |
28 | -Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | |
29 | - | |
30 | -Este programa é software livre; você pode redistribuí-lo | |
31 | -e/ou modificá-lo sob os termos da Licença Pública Geral | |
32 | -GNU conforme publicada pela Free Software Foundation; | |
33 | - | |
34 | -Este programa é distribuído na expectativa de que seja útil, | |
35 | -porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
36 | -de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
37 | -Consulte a Licença Pública Geral do GNU para mais detalhes. | |
38 | -Você deve ter recebido uma cópia da Licença Pública Geral do | |
39 | -GNU junto com este programa; se não, escreva para a | |
40 | -Free Software Foundation, Inc., no endereço | |
41 | -59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
42 | - */ | |
43 | -if (typeof (i3GEOF) === 'undefined') { | |
44 | - var i3GEOF = {}; | |
45 | -} | |
46 | -/* | |
47 | - * Classe: i3GEOF.identifica | |
48 | - * | |
49 | - */ | |
50 | - | |
51 | -// TODO na listagem de atributos, incluir opcao para abrir os valores das variaveis associadas a uma regiao, quando codigo_tipo_regiao for | |
52 | -// diferente de null | |
53 | -i3GEOF.identifica = | |
54 | - { | |
55 | - /** | |
56 | - * Array com os ids das janelas ja criadas | |
57 | - */ | |
58 | - janelas : [], | |
59 | - propJanelas : {}, | |
60 | - /** | |
61 | - * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php | |
62 | - */ | |
63 | - MUSTACHE : "", | |
64 | - /** | |
65 | - * Susbtitutos para o template | |
66 | - */ | |
67 | - mustacheHash : function(idjanela) { | |
68 | - var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.identifica.dicionario); | |
69 | - dicionario["idjanela"] = idjanela; | |
70 | - dicionario["locaplic"] = i3GEO.configura.locaplic; | |
71 | - return dicionario; | |
72 | - }, | |
73 | - /* | |
74 | - * Propriedade: mostraLinkGeohack | |
75 | - * | |
76 | - * Mostra ou não o link para abrir o site GeoHack. | |
77 | - * | |
78 | - * Este site permite o uso de vários buscadores disponíveis na internet. | |
79 | - * | |
80 | - * Type: {boolean} | |
81 | - */ | |
82 | - mostraLinkGeohack : true, | |
83 | - /* | |
84 | - * Propriedade: mostraSistemasAdicionais | |
85 | - * | |
86 | - * Mostra ou não a lista de sistemas adicionais de busca de dados. | |
87 | - * | |
88 | - * Type: {boolean} | |
89 | - */ | |
90 | - mostraSistemasAdicionais : true, | |
91 | - /* | |
92 | - * Variavel: tema | |
93 | - * | |
94 | - * Código do tema que será pesquisado | |
95 | - * | |
96 | - * Type: {String} | |
97 | - */ | |
98 | - tema : "", | |
99 | - /* | |
100 | - * Variavel: x | |
101 | - * | |
102 | - * Coordenada x | |
103 | - * | |
104 | - * Type: {Numeric} | |
105 | - */ | |
106 | - x : 0, | |
107 | - /* | |
108 | - * Variavel: y | |
109 | - * | |
110 | - * Coordenada y | |
111 | - * | |
112 | - * Type: {Numeric} | |
113 | - */ | |
114 | - y : 0, | |
115 | - /* | |
116 | - * Variavel: sistemasAdicionais | |
117 | - * | |
118 | - * Guarda a lista de sistemas adicionais que são incluídos na seleção de temas | |
119 | - * | |
120 | - * Type: {Array} | |
121 | - */ | |
122 | - sistemasAdicionais : [], | |
123 | - /* | |
124 | - * Variavel: dadosIdentifica | |
125 | - * | |
126 | - * Guarda os dados obtidos com a chamada em AJAX de identificação | |
127 | - * | |
128 | - * Type: {Array} | |
129 | - */ | |
130 | - dadosIdentifica : [], | |
131 | - | |
132 | - /* | |
133 | - * Para efeitos de compatibilidade antes da versão 4.7 que não tinha dicionário | |
134 | - */ | |
135 | - criaJanelaFlutuante : function(x, y) { | |
136 | - if (typeof (console) !== 'undefined') | |
137 | - console.info("i3GEOF.identifica.criaJanelaFlutuante()"); | |
138 | - | |
139 | - if(i3GEOF.identifica.MUSTACHE == ""){ | |
140 | - $.get(i3GEO.configura.locaplic + "/ferramentas/identifica/template_mst.html", function(template) { | |
141 | - i3GEOF.identifica.MUSTACHE = template; | |
142 | - i3GEOF.identifica.criaJanelaFlutuante(x, y); | |
143 | - return; | |
144 | - }); | |
145 | - return; | |
146 | - } | |
147 | - if (x) { | |
148 | - i3GEOF.identifica.iniciaJanelaFlutuante(x, y); | |
149 | - } else { | |
150 | - i3GEOF.identifica.iniciaJanelaFlutuante(); | |
151 | - } | |
152 | - }, | |
153 | - /* | |
154 | - * Function: inicia | |
155 | - * | |
156 | - * Inicia a janela de informações | |
157 | - * | |
158 | - * Parameters: | |
159 | - * | |
160 | - * tema {String} - código do tema, existente no mapfile armazenado na seção, que será consultado | |
161 | - * já na inicialização | |
162 | - * | |
163 | - * x {Numeric} - coordenada x do ponto que será utilizado para busca dos atributos | |
164 | - * | |
165 | - * y {Numeric} - coordenada y do ponto | |
166 | - * | |
167 | - * iddiv {String} - id do elemento html onde o conteúdo da ferramenta será incluido | |
168 | - * | |
169 | - * mostraLinkGeohack {boolean} - mostra ou não o link para o site geohacks | |
170 | - * | |
171 | - * mostraSistemasAdicionais {boolean} - mostra ou não os sistemas adicionais de busca de dados | |
172 | - * | |
173 | - * idjanela {string} | |
174 | - */ | |
175 | - inicia : function(tema, x, y, iddiv, mostraLinkGeohack, mostraSistemasAdicionais, idjanela) { | |
176 | - if (typeof (console) !== 'undefined') | |
177 | - console.info("i3GEOF.identifica.inicia()"); | |
178 | - | |
179 | - $i(iddiv).innerHTML += i3GEOF.identifica.html(idjanela); | |
180 | - i3GEOF.identifica.propJanelas[idjanela].tema = tema; | |
181 | - i3GEOF.identifica.propJanelas[idjanela].temaAtivo = tema; | |
182 | - i3GEOF.identifica.propJanelas[idjanela].x = x; | |
183 | - i3GEOF.identifica.propJanelas[idjanela].y = y; | |
184 | - i3GEOF.identifica.propJanelas[idjanela].marca = false; | |
185 | - i3GEOF.identifica.mostraLinkGeohack = mostraLinkGeohack; | |
186 | - i3GEOF.identifica.mostraSistemasAdicionais = mostraSistemasAdicionais; | |
187 | - // se o usuário for editor, força mostrar a lista | |
188 | - // de sistemas | |
189 | - if (i3GEO.parametros.editor.toLowerCase() == "sim") { | |
190 | - i3GEOF.identifica.mostraSistemasAdicionais == true; | |
191 | - } | |
192 | - i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOidentificaguia1", idjanela + "i3GEOidentificaguia"); | |
193 | - // eventos das guias | |
194 | - $i(idjanela + "i3GEOidentificaguia1").onclick = function() { | |
195 | - i3GEOF.identifica.listaTemas("ligados", "", "", idjanela); | |
196 | - i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOidentificaguia1", idjanela + "i3GEOidentificaguia"); | |
197 | - if (i3GEOF.identifica.propJanelas[idjanela].temaAtivo === "") { | |
198 | - $i(idjanela + "i3GEOidentificaoguia1").innerHTML = $trad('selecionaTema', i3GEOF.identifica.dicionario); | |
199 | - } | |
200 | - }; | |
201 | - $i(idjanela + "i3GEOidentificaguia2").onclick = function() { | |
202 | - i3GEOF.identifica.listaTemas("todos", "", "", idjanela); | |
203 | - i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOidentificaguia1", idjanela + "i3GEOidentificaguia"); | |
204 | - }; | |
205 | - $i(idjanela + "i3GEOidentificaguia3").onclick = function() { | |
206 | - i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOidentificaguia3", idjanela + "i3GEOidentificaguia"); | |
207 | - }; | |
208 | - | |
209 | - $i(idjanela + "i3GEOidentificaguia4").onclick = | |
210 | - function() { | |
211 | - i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOidentificaguia4", idjanela + "i3GEOidentificaguia"); | |
212 | - var b = | |
213 | - new YAHOO.widget.Button( | |
214 | - idjanela + "i3GEOidentificabotao1", | |
215 | - { | |
216 | - onclick : { | |
217 | - fn : function() { | |
218 | - if (i3GEOF.identifica.propJanelas[idjanela].temaAtivo && i3GEOF.identifica.propJanelas[idjanela].temaAtivo !== "") { | |
219 | - var ltema = | |
220 | - i3GEO.arvoreDeCamadas.pegaTema(i3GEOF.identifica.propJanelas[idjanela].temaAtivo); | |
221 | - if (ltema.identifica == "nao" || ltema.identifica == "NAO") { | |
222 | - i3GEO.janela.tempoMsg($trad('msgEtiquetas', i3GEOF.identifica.dicionario)); | |
223 | - } else { | |
224 | - i3GEO.tema.dialogo.etiquetas(i3GEOF.identifica.propJanelas[idjanela].temaAtivo); | |
225 | - } | |
226 | - $i(idjanela + "i3GEOidentificaoguia1").innerHTML = ""; | |
227 | - } else { | |
228 | - $i(idjanela + "i3GEOidentificaoguia1").innerHTML = | |
229 | - $trad('selecionaTema', i3GEOF.identifica.dicionario); | |
230 | - } | |
231 | - } | |
232 | - } | |
233 | - }); | |
234 | - b.addClass("abrir"); | |
235 | - }; | |
236 | - $i(idjanela + "i3GEOidentificaguia5").onclick = | |
237 | - function() { | |
238 | - i3GEO.guias.mostraGuiaFerramenta(idjanela + "i3GEOidentificaguia5", idjanela + "i3GEOidentificaguia"); | |
239 | - var temp, b = | |
240 | - new YAHOO.widget.Button(idjanela + "i3GEOidentificabotao2", { | |
241 | - onclick : { | |
242 | - fn : function() { | |
243 | - var js = i3GEO.configura.locaplic + "/ferramentas/bufferpt/dependencias.php"; | |
244 | - i3GEO.util.scriptTag( | |
245 | - js, | |
246 | - "i3GEOF.bufferpt.iniciaJanelaFlutuante(" + i3GEOF.identifica.propJanelas[idjanela].x | |
247 | - + "," | |
248 | - + i3GEOF.identifica.propJanelas[idjanela].y | |
249 | - + ")", | |
250 | - "i3GEOF.bufferpt_script"); | |
251 | - } | |
252 | - } | |
253 | - }); | |
254 | - b.addClass("rodar"); | |
255 | - //TODO corrigir em funcao das mudancas em i3geo.coordenadas | |
256 | - /* | |
257 | - temp = i3GEO.coordenadas.formato, gh = | |
258 | - i3GEO.coordenadas.geohash.encodeGeoHash( | |
259 | - i3GEOF.identifica.propJanelas[idjanela].y, | |
260 | - i3GEOF.identifica.propJanelas[idjanela].x); | |
261 | - i3GEO.coordenadas.formato = "lista"; | |
262 | - i3GEO.coordenadas.mostraCoordenadas( | |
263 | - false, | |
264 | - idjanela + "i3GEOidentificacoordtexto", | |
265 | - i3GEOF.identifica.propJanelas[idjanela].x, | |
266 | - i3GEOF.identifica.propJanelas[idjanela].y); | |
267 | - i3GEO.coordenadas.MODOTEXTO += "Geohash: <a href='http://geohash.org/" + gh + "' target=_blank >" + gh + "</a>"; | |
268 | - $i(idjanela + "i3GEOidentificacoordtexto").innerHTML = i3GEO.coordenadas.MODOTEXTO + "</span>"; | |
269 | - i3GEO.coordenadas.formato = temp; | |
270 | - */ | |
271 | - }; | |
272 | - i3GEOF.identifica.listaTemas("ligados", "", "", idjanela); | |
273 | - // | |
274 | - // verifica se existem sistemas para identificar | |
275 | - // | |
276 | - i3GEOF.identifica.atualizaSistemas(); | |
277 | - if (i3GEOF.identifica.propJanelas[idjanela].temaAtivo !== "") { | |
278 | - // verifica se o tema ativo pode ser identificado | |
279 | - var temp = i3GEO.arvoreDeCamadas.pegaTema(i3GEOF.identifica.propJanelas[idjanela].temaAtivo); | |
280 | - if (temp.identifica.toLowerCase() !== "nao") { | |
281 | - i3GEOF.identifica.buscaDadosTema(i3GEOF.identifica.propJanelas[idjanela].temaAtivo, "", "", idjanela); | |
282 | - } | |
283 | - } | |
284 | - | |
285 | - // botao de redimensionar as partes da janela | |
286 | - var Dom = YAHOO.util.Dom, col1 = null, col2 = null; | |
287 | - | |
288 | - col1 = Dom.get(idjanela + 'i3GEOidentificatemaativo'); | |
289 | - col2 = Dom.get(idjanela + 'i3GEOidentificaoguia1'); | |
290 | - var resize = new YAHOO.util.Resize(idjanela + 'i3GEOidentificatemaativo', { | |
291 | - handles : [ | |
292 | - 'r' | |
293 | - ], | |
294 | - maxWidth : 180 | |
295 | - }); | |
296 | - resize.on('resize', function(ev) { | |
297 | - // Dom.setStyle(col1, 'height', ''); | |
298 | - // 150 é o tamanho inicial da parte esquerda, | |
299 | - // corresponde a 40% | |
300 | - var w1 = parseInt(col1.style.width); | |
301 | - var dif = parseInt((w1 * 40) / 150, 10); | |
302 | - Dom.setStyle(col2, 'width', 40 - dif + 60 + '%'); | |
303 | - Dom.setStyle(col2, 'left', w1 + 15 + 'px'); | |
304 | - }); | |
305 | - resize.resize(null, null, null, 0, 0, true); | |
306 | - }, | |
307 | - atualizaSistemas : function() { | |
308 | - if (i3GEOF.identifica.mostraSistemasAdicionais === true) { | |
309 | - if (i3GEOF.identifica.sistemasAdicionais.length == 0) { | |
310 | - var p = | |
311 | - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?funcao=pegaSistemasIdentificacao&g_sid=" | |
312 | - + i3GEO.configura.sid; | |
313 | - cpJSON.call(p, "foo", i3GEOF.identifica.montaListaSistemas); | |
314 | - } else { | |
315 | - i3GEOF.identifica.montaListaSistemas(""); | |
316 | - } | |
317 | - } | |
318 | - }, | |
319 | - /* | |
320 | - * Function: iniciaJanelaFlutuante | |
321 | - * | |
322 | - * Cria a janela flutuante para controle da ferramenta. | |
323 | - */ | |
324 | - iniciaJanelaFlutuante : function(x, y) { | |
325 | - if (typeof (console) !== 'undefined') | |
326 | - console.info("i3GEOF.identifica.iniciaJanelaFlutuante()"); | |
327 | - | |
328 | - var minimiza, cabecalho, duplica, janela, divid, temp, titulo, id = "ident" + parseInt(Math.random() * 1000000, 10); | |
329 | - i3GEOF.identifica.janelas.push(id); | |
330 | - i3GEOF.identifica.propJanelas[id] = {}; | |
331 | - if (x) { | |
332 | - objposicaocursor.ddx = x; | |
333 | - objposicaocursor.ddy = y; | |
334 | - i3GEOF.identifica.propJanelas[id].x = x; | |
335 | - i3GEOF.identifica.propJanelas[id].y = y; | |
336 | - i3GEOF.identifica.propJanelas[id].marca = false; | |
337 | - i3GEOF.identifica.x = x; | |
338 | - i3GEOF.identifica.y = y; | |
339 | - } | |
340 | - // funcao que sera executada ao ser clicado no cabeçalho da | |
341 | - // janela | |
342 | - cabecalho = function() { | |
343 | - i3GEOF.identifica.ativaFoco(id); | |
344 | - }; | |
345 | - minimiza = function() { | |
346 | - i3GEO.janela.minimiza(id); | |
347 | - }; | |
348 | - duplica = function() { | |
349 | - i3GEOF.identifica.iniciaJanelaFlutuante(i3GEOF.identifica.propJanelas[id].x, i3GEOF.identifica.propJanelas[id].y); | |
350 | - }; | |
351 | - // cria a janela flutuante | |
352 | - titulo = | |
353 | - "</div><a class='i3GeoTituloJanelaBs' style='right:90px;' target=_blank href='" | |
354 | - + i3GEO.configura.locaplic | |
355 | - + "/ajuda_usuario.php?idcategoria=8&idajuda=70' >" + $trad("d7t") | |
356 | - + "</a>"; | |
357 | - janela = | |
358 | - i3GEO.janela.cria( | |
359 | - "470px", | |
360 | - "270px", | |
361 | - "", | |
362 | - "", | |
363 | - "", | |
364 | - titulo, | |
365 | - id, | |
366 | - false, | |
367 | - "hd", | |
368 | - cabecalho, | |
369 | - minimiza, | |
370 | - "", | |
371 | - true, | |
372 | - "", | |
373 | - duplica, | |
374 | - "", | |
375 | - "" | |
376 | - ); | |
377 | - divid = janela[2].id; | |
378 | - if (i3GEOF.identifica.janelas.length > 1) { | |
379 | - temp = janela[0].cfg.config; | |
380 | - janela[0].moveTo( | |
381 | - temp.x.value + (i3GEOF.identifica.janelas.length * 50), | |
382 | - temp.y.value + (i3GEOF.identifica.janelas.length * 15)); | |
383 | - } | |
384 | - i3GEOF.identifica.inicia(i3GEO.temaAtivo, objposicaocursor.ddx, objposicaocursor.ddy, divid, true, true, id); | |
385 | - janela[2].style.backgroundColor = "white"; | |
386 | - | |
387 | - i3GEOF.identifica.propJanelas[id].aguarde = $i(id + "_imagemCabecalho").style; | |
388 | - i3GEOF.identifica.propJanelas[id].atualiza = true; | |
389 | - temp = 'i3GEOF.identifica.propJanelas["' + id + '"].atualiza = this.checked'; | |
390 | - janela[0] | |
391 | - .setFooter("<div class='i3GeoRodapeJanela' ><input class='inputsb' style='cursor:pointer;position:relative;top:2px;' checked onclick='" + temp | |
392 | - + "' type=checkbox /> " | |
393 | - + $trad('atualizaJanela', i3GEOF.identifica.dicionario) | |
394 | - + "</div>"); | |
395 | - | |
396 | - }, | |
397 | - limpaMarca : function(id) { | |
398 | - i3GEO.desenho.removePins(id); | |
399 | - i3GEOF.identifica.propJanelas[id].marca = false; | |
400 | - }, | |
401 | - /* | |
402 | - * Function: ativaFoco | |
403 | - * | |
404 | - * Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado | |
405 | - */ | |
406 | - ativaFoco : function(id) { | |
407 | - i3GEOF.identifica.listaTemas("ligados"); | |
408 | - }, | |
409 | - mostraImagemPonto : function(id) { | |
410 | - if (i3GEO.Interface.ATUAL === "googleearth") { | |
411 | - return; | |
412 | - } | |
413 | - if (i3GEOF.identifica.propJanelas[id].marca === false) { | |
414 | - i3GEOF.identifica.propJanelas[id].marca = | |
415 | - i3GEO.desenho.addPin(i3GEOF.identifica.propJanelas[id].x, i3GEOF.identifica.propJanelas[id].y, "", "", "", id); | |
416 | - } else { | |
417 | - i3GEO.desenho.movePin( | |
418 | - i3GEOF.identifica.propJanelas[id].marca, | |
419 | - i3GEOF.identifica.propJanelas[id].x, | |
420 | - i3GEOF.identifica.propJanelas[id].y); | |
421 | - } | |
422 | - }, | |
423 | - /* | |
424 | - * Function: html | |
425 | - * | |
426 | - * Gera o código html para apresentação das opções da ferramenta | |
427 | - * | |
428 | - * Retorno: | |
429 | - * | |
430 | - * String com o código html | |
431 | - */ | |
432 | - html : function(idjanela) { | |
433 | - var ins = Mustache.render(i3GEOF.identifica.MUSTACHE, i3GEOF.identifica.mustacheHash(idjanela)); | |
434 | - return ins; | |
435 | - }, | |
436 | - /* | |
437 | - * Abre a janela flutuante para controlar o processo de reposicionar um ponto. Ativada apenas quando o usuario puder editar um tema | |
438 | - */ | |
439 | - janelaMoverPonto : function(tema, idreg) { | |
440 | - if ($i("i3GEOF.movePonto_corpo")) { | |
441 | - return; | |
442 | - } | |
443 | - var temp, titulo; | |
444 | - // cria a janela flutuante | |
445 | - titulo = "<div class='i3GeoTituloJanela'>" + $trad('move', i3GEOF.identifica.dicionario) + "</div>"; | |
446 | - i3GEO.janela.cria("250px", "100px", "", "", "", titulo, "i3GEOF.movePonto", false, "hd", "", ""); | |
447 | - $i("i3GEOF.movePonto_corpo").style.backgroundColor = "white"; | |
448 | - i3GEO.eventos.removeEventos("MOUSECLIQUEPERM", ["i3GEO.mapa.dialogo.cliqueIdentificaDefault()"]); | |
449 | - i3GEO.eventos.adicionaEventos("MOUSECLIQUE", [ | |
450 | - "i3GEOF.identifica.atualizaJanelaMoverPonto()" | |
451 | - ]); | |
452 | - temp = function() { | |
453 | - i3GEO.eventos.adicionaEventos("MOUSECLIQUE", ["i3GEO.mapa.dialogo.cliqueIdentificaDefault()"]); | |
454 | - }; | |
455 | - YAHOO.util.Event.addListener(janela[0].close, "click", temp); | |
456 | - $i("i3GEOF.movePonto_corpo").innerHTML = | |
457 | - "" + $trad('cliqueNovaPosicao', i3GEOF.identifica.dicionario) | |
458 | - + "<br><br><p class=paragrafo >X: </p>" | |
459 | - + "<div class='i3geoForm100 i3geoFormIconeEdita' ><input type=text id=i3GEOF.movePontoX /></div>" | |
460 | - + "<br><p class=paragrafo >Y: </p>" | |
461 | - + "<div class='i3geoForm100 i3geoFormIconeEdita' ><input type=text id=i3GEOF.movePontoY /></div>" | |
462 | - + "<input type=buttom value='" | |
463 | - + $trad('move', i3GEOF.identifica.dicionario) | |
464 | - + "' id=i3GEOF.moveAplica />" | |
465 | - + "<input type=hidden value='" | |
466 | - + tema | |
467 | - + "' id=i3GEOF.moveAplicaTema />"; | |
468 | - | |
469 | - new YAHOO.widget.Button( | |
470 | - "i3GEOF.moveAplica", | |
471 | - { | |
472 | - onclick : { | |
473 | - fn : function() { | |
474 | - var x = $i("i3GEOF.movePontoX").value, y = $i("i3GEOF.movePontoY").value, tema = | |
475 | - $i("i3GEOF.moveAplicaTema").value, p = | |
476 | - i3GEO.configura.locaplic + "/ferramentas/editortema/exec.php?funcao=atualizageometria&g_sid=" | |
477 | - + i3GEO.configura.sid, temp = function(retorno) { | |
478 | - i3GEO.janela.fechaAguarde("aguardeSalvaPonto"); | |
479 | - i3GEO.Interface.atualizaTema("", tema); | |
480 | - i3GEOF.identifica.buscaDadosTema(tema, x, y); | |
481 | - }; | |
482 | - i3GEO.janela.AGUARDEMODAL = true; | |
483 | - i3GEO.janela.abreAguarde("aguardeSalvaPonto", "Adicionando..."); | |
484 | - i3GEO.janela.AGUARDEMODAL = false; | |
485 | - cpJSON.call(p, "foo", temp, "&idunico=" + idreg + "&tema=" + tema + "&wkt=POINT(" + x + " " + y + ")"); | |
486 | - } | |
487 | - } | |
488 | - }); | |
489 | - }, | |
490 | - atualizaJanelaMoverPonto : function() { | |
491 | - if ($i("i3GEOF.movePontoX")) { | |
492 | - $i("i3GEOF.movePontoX").value = objposicaocursor.ddx; | |
493 | - $i("i3GEOF.movePontoY").value = objposicaocursor.ddy; | |
494 | - } else { | |
495 | - i3GEO.eventos.removeEventos("MOUSECLIQUE", [ | |
496 | - "i3GEOF.identifica.atualizaJanelaMoverPonto()" | |
497 | - ]); | |
498 | - } | |
499 | - }, | |
500 | - /* | |
501 | - * Function: listaTemas | |
502 | - * | |
503 | - * Incluí a lista de temas para o usuário escolher | |
504 | - * | |
505 | - * Veja: | |
506 | - * | |
507 | - * <i3GEO.php.listaTemas> | |
508 | - * | |
509 | - * Parametros: | |
510 | - * | |
511 | - * tipo {String} - ligados|todos lista apenas os temas que estão visíveis no mapa ou todos os temas | |
512 | - * | |
513 | - * id {string} id da janela em foco | |
514 | - */ | |
515 | - listaTemas : function(tipo) { | |
516 | - if (i3GEO.arvoreDeCamadas.CAMADAS !== "") { | |
517 | - var lista = i3GEO.arvoreDeCamadas.CAMADAS; | |
518 | - if (tipo === "ligados") { | |
519 | - lista = i3GEO.arvoreDeCamadas.filtraCamadas("status", 2, "igual", lista); | |
520 | - } | |
521 | - lista = i3GEO.arvoreDeCamadas.filtraCamadas("identifica", "NAO", "diferente", lista); | |
522 | - lista = i3GEO.arvoreDeCamadas.filtraCamadas("identifica", "nao", "diferente", lista); | |
523 | - i3GEOF.identifica.montaListaTemas(lista); | |
524 | - } else { | |
525 | - i3GEO.php.listaTemas(i3GEOF.identifica.montaListaTemas, tipo, i3GEO.configura.locaplic, i3GEO.configura.sid); | |
526 | - } | |
527 | - }, | |
528 | - /* | |
529 | - * Function: montaListaTemas | |
530 | - * | |
531 | - * Monta a lista de temas na forma de botões 'radio' | |
532 | - * | |
533 | - * O resultado é inserido no div com id "listaTemas" | |
534 | - * | |
535 | - * Parametros: | |
536 | - * | |
537 | - * retorno {JSON} - objeto retornado por i3GEO.php.listaTemas ou por i3GEO.arvoreDeCamadas.filtraCamadas | |
538 | - */ | |
539 | - montaListaTemas : function(retorno) { | |
540 | - var lista, linhas, linhas1, l, nome, tema, divResultado, marcado = "", n = i3GEOF.identifica.janelas.length, id = "", i; | |
541 | - if (retorno.data) { | |
542 | - lista = retorno.data; | |
543 | - } else { | |
544 | - lista = retorno; | |
545 | - } | |
546 | - for (i = 0; i < n; i++) { | |
547 | - id = i3GEOF.identifica.janelas[i]; | |
548 | - // | |
549 | - // ativa o link para o site geohack | |
550 | - // | |
551 | - if (i3GEOF.identifica.mostraLinkGeohack === true) { | |
552 | - linhas = i3GEOF.identifica.montaLinkGeohack(); | |
553 | - } else { | |
554 | - linhas = ""; | |
555 | - } | |
556 | - // | |
557 | - // monta a lista de temas | |
558 | - // | |
559 | - linhas += "<span>" + $trad('verDados', i3GEOF.identifica.dicionario) + "</span>"; | |
560 | - linhas1 = ""; | |
561 | - for (l = 0; l < lista.length; l++) { | |
562 | - marcado = ""; | |
563 | - if (lista[l].nome) { | |
564 | - nome = lista[l].nome; | |
565 | - tema = lista[l].tema; | |
566 | - } else { | |
567 | - nome = lista[l].tema; | |
568 | - tema = lista[l].name; | |
569 | - } | |
570 | - if (tema == i3GEOF.identifica.propJanelas[id].temaAtivo) { | |
571 | - marcado = "CHECKED"; | |
572 | - } | |
573 | - if (lista[l].identifica !== "nao") { | |
574 | - linhas1 += | |
575 | - "<tr><td style='border-top:1px solid beige;'><input name='buscaDadosTema" + id | |
576 | - + "' onclick='i3GEOF.identifica.buscaDadosTema(\"" | |
577 | - + tema | |
578 | - + "\",\"\",\"\",\"" | |
579 | - + id | |
580 | - + "\")' style='border:0px solid white;cursor:pointer;' type=radio " | |
581 | - + marcado | |
582 | - + " /></td><td style='border-top:1px solid beige;' >" | |
583 | - + nome | |
584 | - + "</td></tr>"; | |
585 | - } | |
586 | - } | |
587 | - divResultado = $i(id + "i3GEOidentificalistaTemas"); | |
588 | - if (divResultado) { | |
589 | - divResultado.innerHTML = | |
590 | - linhas + "<table class=lista2 ><tr><td style=text-align:left ><input name='buscaDadosTema" | |
591 | - + id | |
592 | - + "' onclick='i3GEOF.identifica.buscaDadosTema(\"ligados\",\"\",\"\",\"" | |
593 | - + id | |
594 | - + "\")' style='border:0px solid white;;cursor:pointer' type=radio /></td><td>Todos</td></tr>" | |
595 | - + linhas1 | |
596 | - + "</table>"; | |
597 | - if (i3GEOF.identifica.propJanelas[id].temaAtivo != "") { | |
598 | - i3GEOF.identifica.buscaDadosTema( | |
599 | - i3GEOF.identifica.propJanelas[id].temaAtivo, | |
600 | - i3GEOF.identifica.propJanelas[id].x, | |
601 | - i3GEOF.identifica.propJanelas[id].y, | |
602 | - id); | |
603 | - } | |
604 | - } | |
605 | - } | |
606 | - }, | |
607 | - /* | |
608 | - * Function: montaLinkGeohack | |
609 | - * | |
610 | - * Monta o link para o site geohack | |
611 | - * | |
612 | - * Return: | |
613 | - * | |
614 | - * {String} | |
615 | - */ | |
616 | - montaLinkGeohack : function() { | |
617 | - return "<a href='#' onclick='i3GEOF.identifica.abreLinkGeohack()' >Buscadores web</a><br>"; | |
618 | - }, | |
619 | - abreLinkGeohack : function() { | |
620 | - var b, x, y, w, s, param; | |
621 | - b = i3GEO.calculo.dd2dms(i3GEOF.identifica.x, i3GEOF.identifica.y); | |
622 | - x = b[0].split(" "); | |
623 | - y = b[1].split(" "); | |
624 | - w = "W"; | |
625 | - s = "S"; | |
626 | - if (x[0] * 1 > 0) { | |
627 | - w = "L"; | |
628 | - } | |
629 | - if (y[0] * 1 > 0) { | |
630 | - s = "N"; | |
631 | - } | |
632 | - if (x[0] * 1 < 0) { | |
633 | - x[0] = x[0] * -1; | |
634 | - } | |
635 | - if (y[0] * 1 < 0) { | |
636 | - y[0] = y[0] * -1; | |
637 | - } | |
638 | - param = y[0] + "_" + y[1] + "_" + y[2] + "_" + s + "_" + x[0] + "_" + x[1] + "_" + x[2] + "_" + w; | |
639 | - window.open("http://tools.wikimedia.de/~magnus/geo/geohack.php?params=" + param); | |
640 | - }, | |
641 | - /* | |
642 | - * Function: montaListaSistemas | |
643 | - * | |
644 | - * Obtém a lista de sistemas especiais de consulta. | |
645 | - * | |
646 | - * O resultado é inserido no div com id "listaSistemas". | |
647 | - * | |
648 | - * Cada sistema consiste em uma URL para a qual serão passados os parametros x e y. | |
649 | - * | |
650 | - */ | |
651 | - montaListaSistemas : function(retorno) { | |
652 | - var l, divins, ig, sistema, pub, exec, temp, t, linhas, ltema, i, idjanela, n = i3GEOF.identifica.janelas.length; | |
653 | - if (retorno !== undefined) { | |
654 | - if (i3GEOF.identifica.sistemasAdicionais.length == 0) { | |
655 | - sis = retorno.data; | |
656 | - for (ig = 0; ig < sis.length; ig++) { | |
657 | - sistema = sis[ig].NOME; | |
658 | - if (sis[ig].PUBLICADO) { | |
659 | - if (sis[ig].PUBLICADO) { | |
660 | - pub = sis[ig].PUBLICADO; | |
661 | - if (pub === "NAO" || pub === "nao") { | |
662 | - sistema = "<s>" + sistema + "</s>"; | |
663 | - } | |
664 | - } | |
665 | - } | |
666 | - exec = sis[ig].ABRIR; | |
667 | - temp = exec.split('"'); | |
668 | - if (temp.length === 1) { | |
669 | - exec = '"' + exec + '"'; | |
670 | - } | |
671 | - temp = exec.split("?"); | |
672 | - if (temp.length !== 2) { | |
673 | - exec += '+"?"'; | |
674 | - } | |
675 | - t = "blank"; | |
676 | - if (sis[ig].TARGET) { | |
677 | - t = sis[ig].TARGET; | |
678 | - } | |
679 | - i3GEOF.identifica.sistemasAdicionais.push(sistema + "," + exec + "," + t); | |
680 | - } | |
681 | - } | |
682 | - if (i3GEOF.identifica.sistemasAdicionais.length > 0) { | |
683 | - for (i = 0; i < n; i++) { | |
684 | - idjanela = i3GEOF.identifica.janelas[i]; | |
685 | - divins = $i(idjanela + "i3GEOidentificalistaSistemas"); | |
686 | - linhas = ""; | |
687 | - for (l = 0; l < i3GEOF.identifica.sistemasAdicionais.length; l++) { | |
688 | - ltema = i3GEOF.identifica.sistemasAdicionais[l].split(","); | |
689 | - if (ltema.length > 1) { | |
690 | - linhas += | |
691 | - "<tr><td style='border-top:1px solid beige;'><input onclick='i3GEOF.identifica.mostraDadosSistema(" + ltema[1] | |
692 | - + ",\"" | |
693 | - + ltema[2] | |
694 | - + "\",\"" | |
695 | - + idjanela | |
696 | - + "\")' style='border:0px solid white;cursor:pointer' type=radio /></td><td style='border-top:1px solid beige;' >" | |
697 | - + ltema[0] | |
698 | - + "</td></tr>"; | |
699 | - } | |
700 | - | |
701 | - } | |
702 | - if (divins) { | |
703 | - if (i3GEO.parametros.editor.toLowerCase() == "sim") { | |
704 | - temp = | |
705 | - "<p class=paragrafo ><a href='#' title='Opção visível apenas para quem é editor' style=color:red onclick=\"i3GEOF.identifica.abrejanelaIframe('1050','500','" + i3GEO.configura.locaplic | |
706 | - + "/admin/html/webservices.html');\" >Editar a lista de sistemas adicionais</a></p>"; | |
707 | - } else { | |
708 | - temp = ""; | |
709 | - } | |
710 | - divins.innerHTML = temp + "<table class='lista2' >" + linhas + "</table>"; | |
711 | - } | |
712 | - } | |
713 | - } | |
714 | - } | |
715 | - // divins.innerHTML = ""; | |
716 | - }, | |
717 | - /* | |
718 | - * Function: buscaDadosTema | |
719 | - * | |
720 | - * Obtém os dados de um tema para o ponto de coordenadas clicado no mapa | |
721 | - * | |
722 | - * Veja: | |
723 | - * | |
724 | - * <i3GEO.php.identifica3> | |
725 | - */ | |
726 | - buscaDadosTema : function(tema, x, y, idjanela) { | |
727 | - var res, opcao, resolucao, janelas, n, i, id; | |
728 | - if (tema != "" && i3GEO.temaAtivo === "") { | |
729 | - i3GEO.temaAtivo = tema; | |
730 | - } | |
731 | - if (idjanela) { | |
732 | - janelas = [ | |
733 | - idjanela | |
734 | - ]; | |
735 | - } else { | |
736 | - janelas = i3GEOF.identifica.janelas; | |
737 | - } | |
738 | - // guarda o valor de x y nas variaveis de uso global da ferramenta | |
739 | - if (x && x != "") { | |
740 | - i3GEOF.identifica.x = x; | |
741 | - i3GEOF.identifica.y = y; | |
742 | - } | |
743 | - n = janelas.length; | |
744 | - if (n == 0 || (idjanela && !$i(idjanela + "i3GEOidentificaoguia1"))) { | |
745 | - if (x && x != "") { | |
746 | - i3GEOF.identifica.criaJanelaFlutuante(x, y); | |
747 | - } else { | |
748 | - i3GEOF.identifica.criaJanelaFlutuante(); | |
749 | - } | |
750 | - return; | |
751 | - } | |
752 | - try { | |
753 | - if (tema === "ligados") { | |
754 | - opcao = "ligados"; | |
755 | - tema = ""; | |
756 | - } else { | |
757 | - opcao = "tema"; | |
758 | - } | |
759 | - for (i = 0; i < n; i++) { | |
760 | - id = janelas[i]; | |
761 | - if (i3GEOF.identifica.propJanelas[id].atualiza == undefined || i3GEOF.identifica.propJanelas[id].atualiza === true) { | |
762 | - if (x && x != "") { | |
763 | - i3GEOF.identifica.propJanelas[id].x = x; | |
764 | - i3GEOF.identifica.propJanelas[id].y = y; | |
765 | - } | |
766 | - if (tema != "" && idjanela) { | |
767 | - i3GEOF.identifica.propJanelas[id].temaAtivo = tema; | |
768 | - } | |
769 | - if ($i(id + "i3GEOidentificaoguia1")) { | |
770 | - $i(id + "i3GEOidentificaoguia1").innerHTML = | |
771 | - "<img src='" + i3GEO.configura.locaplic + "/imagens/aguarde.gif' />"; | |
772 | - res = $i(id + "i3GEOidentificaresolucao"); | |
773 | - if (res) { | |
774 | - resolucao = res.value; | |
775 | - } else { | |
776 | - resolucao = 5; | |
777 | - } | |
778 | - i3GEOF.identifica.buscaDadosTemaJanela(id, resolucao, opcao); | |
779 | - } | |
780 | - } | |
781 | - } | |
782 | - } catch (e) { | |
783 | - if (!x) { | |
784 | - i3GEOF.identifica.criaJanelaFlutuante(); | |
785 | - } else { | |
786 | - i3GEOF.identifica.criaJanelaFlutuante(x, y); | |
787 | - } | |
788 | - } | |
789 | - }, | |
790 | - buscaDadosTemaJanela : function(idjanela, resolucao, opcao) { | |
791 | - i3GEOF.identifica.mostraImagemPonto(idjanela); | |
792 | - var temp = function(retorno) { | |
793 | - // i3GEOF.identifica.dadosIdentifica = retorno.data; | |
794 | - if (retorno !== undefined) { | |
795 | - i3GEOF.identifica.mostraDadosTema(retorno.data, idjanela); | |
796 | - } else { | |
797 | - i3GEOF.identifica.mostraDadosTema(undefined, idjanela); | |
798 | - } | |
799 | - }; | |
800 | - // importante: os temas editaveis nao utilizam alias em seus nomes | |
801 | - // se o usuario estiver logado | |
802 | - i3GEO.php.identifica3( | |
803 | - temp, | |
804 | - i3GEOF.identifica.propJanelas[idjanela].x, | |
805 | - i3GEOF.identifica.propJanelas[idjanela].y, | |
806 | - resolucao, | |
807 | - opcao, | |
808 | - i3GEO.configura.locaplic, | |
809 | - i3GEO.configura.sid, | |
810 | - i3GEOF.identifica.propJanelas[idjanela].temaAtivo, | |
811 | - i3GEO.parametros.mapexten, | |
812 | - "nao"); | |
813 | - }, | |
814 | - /* | |
815 | - * Function: mostraDadosSistema | |
816 | - * | |
817 | - * Obtém os dados de um sistema para o ponto de coordenadas clicado no mapa | |
818 | - * | |
819 | - * Parametros: | |
820 | - * | |
821 | - * exec {String} - url que será aberta | |
822 | - * | |
823 | - * target {String} (depreciado) - _self|self| onde a url será aberta. Se for "self", será aberta na mesma janela, caso | |
824 | - * contrário, em uma nova página do navegador | |
825 | - */ | |
826 | - mostraDadosSistema : function(exec, target, idjanela) { | |
827 | - i3GEOF.identifica.mostraImagemPonto(idjanela); | |
828 | - exec += "&x=" + i3GEOF.identifica.propJanelas[idjanela].x + "&y=" + i3GEOF.identifica.propJanelas[idjanela].y; | |
829 | - if (target === "target") { | |
830 | - window.open(exec); | |
831 | - } else { | |
832 | - i3GEOF.identifica.abrejanelaIframe("500", "500", exec); | |
833 | - } | |
834 | - var i = $i("i3GEOmarcaIdentifica"); | |
835 | - if (i) { | |
836 | - i.style.display = "block"; | |
837 | - } | |
838 | - }, | |
839 | - /* | |
840 | - * Function abrejanelaIframe | |
841 | - * | |
842 | - * Abre uma janela flutuante contendo um iframe | |
843 | - * | |
844 | - * Parametros: | |
845 | - * | |
846 | - * w {string} - largura | |
847 | - * | |
848 | - * h {string} - altura | |
849 | - * | |
850 | - * s {string} - src do iframe | |
851 | - */ | |
852 | - abrejanelaIframe : function(w, h, s) { | |
853 | - var janelaeditor = | |
854 | - i3GEO.janela.cria(w, h, s, parseInt(Math.random() * 100, 10), 10, "", "janela" + i3GEO.util.randomRGB(), false); | |
855 | - var temp = function() { | |
856 | - i3GEOF.identifica.sistemasAdicionais = []; | |
857 | - i3GEOF.identifica.atualizaSistemas(); | |
858 | - }; | |
859 | - YAHOO.util.Event.addListener(janelaeditor[0].close, "click", temp, janelaeditor[0].panel, { | |
860 | - id : janelaeditor[0].id | |
861 | - }, true); | |
862 | - }, | |
863 | - /** | |
864 | - * Aplica um estilo a um elemento de todas as janelas | |
865 | - */ | |
866 | - aplicaEstilo : function(posFixo, estilo, valor) { | |
867 | - var n = i3GEOF.identifica.janelas, i = 0, temp; | |
868 | - for (i = 0; i < n; i++) { | |
869 | - temp = $i(i3GEOF.identifica.janelas[i]); | |
870 | - if (temp) { | |
871 | - temp = $i(i3GEOF.identifica.janelas[i] + posFixo); | |
872 | - if (temp) { | |
873 | - temp.style[estilo] = valor; | |
874 | - } | |
875 | - } | |
876 | - } | |
877 | - }, | |
878 | - /* | |
879 | - * Function: mostraDadosTema | |
880 | - * | |
881 | - * Mostra os dados obtidos de um ou mais temas. | |
882 | - * | |
883 | - * Recebe o resultado em JSON da operação de consulta realizada pelo servidor e formata os dados para | |
884 | - * apresentação na tela. | |
885 | - * | |
886 | - * Parametros: | |
887 | - * | |
888 | - * retorno {JSON} - objeto JSON com os dados <i3GEO.php.identifica3> | |
889 | - */ | |
890 | - mostraDadosTema : function(retorno, idjanela) { | |
891 | - var alvo, filtro, camada, idreg, idsalva, paramsalva, i, res = "", ntemas, resultados, nres, cor, j, nitens, k, atualN = "todas", inicio = | |
892 | - 0, numResultados = 0, tip, link, textovalor; | |
893 | - | |
894 | - if ($i(idjanela + "i3GEOFidentificaNocorrencias")) { | |
895 | - atualN = $i(idjanela + "i3GEOFidentificaNocorrencias").value; | |
896 | - } | |
897 | - i3GEOF.identifica.aplicaEstilo("_corpo", "scrollTop", 0); | |
898 | - if (retorno == undefined || retorno == "") { | |
899 | - $i(idjanela + "i3GEOidentificaoguia1").innerHTML = $trad('msgNadaEncontrado', i3GEOF.identifica.dicionario); | |
900 | - return; | |
901 | - } | |
902 | - i = $i("i3GEOmarcaIdentifica"); | |
903 | - if (i) { | |
904 | - i.style.display = "block"; | |
905 | - } | |
906 | - if (retorno !== undefined) { | |
907 | - $i(idjanela + "i3GEOidentificaoguia1").innerHTML = ""; | |
908 | - ntemas = retorno.length; | |
909 | - for (i = 0; i < ntemas; i++) { | |
910 | - resultados = retorno[i].resultado; | |
911 | - // nome do tema e icone de remover filtro | |
912 | - res += | |
913 | - "<div style='padding-top:6px;left:2px;text-align:left;width:100%;' ><b>" + retorno[i].nome | |
914 | - + "<img onclick='i3GEO.util.animaClique(this);i3GEOF.identifica.removeFiltro(\"" | |
915 | - + retorno[i].tema | |
916 | - + "\",\"" | |
917 | - + idjanela | |
918 | - + "\")' style='margin-left:3px;position:relative;top:3px;width:12px;' src='" | |
919 | - + i3GEO.configura.locaplic | |
920 | - + "/imagens/oxygen/16x16/remove-filter.png' title='" | |
921 | - + $trad('removeFiltro', i3GEOF.identifica.dicionario) | |
922 | - + "' />" | |
923 | - + "</b>"; | |
924 | - // icone que mostra as medidas das variaveis vinculadas a uma regiao, se for o caso | |
925 | - if (retorno[i].codigo_tipo_regiao && retorno[i].codigo_tipo_regiao != "") { | |
926 | - res += | |
927 | - "<img onclick='i3GEO.util.animaClique(this);i3GEOF.identifica.listaVariaveis(\"" + retorno[i].codigo_tipo_regiao | |
928 | - + "\",\"" | |
929 | - + idjanela | |
930 | - + "\")' style='margin-left:3px;position:relative;top:3px;width:12px;' src='" | |
931 | - + i3GEO.configura.locaplic | |
932 | - + "/imagens/oxygen/16x16/list-add.png' />"; | |
933 | - | |
934 | - } | |
935 | - res += "</div>"; | |
936 | - // encontrou algo | |
937 | - if (resultados[0] !== " ") { | |
938 | - nres = resultados.length; | |
939 | - numResultados = nres; | |
940 | - cor = "RGB(250,250,250)"; | |
941 | - if (atualN != "todas") { | |
942 | - nres = atualN * 1; | |
943 | - inicio = atualN * 1 - 1; | |
944 | - } | |
945 | - for (j = inicio; j < nres; j++) { | |
946 | - nitens = resultados[j].length; | |
947 | - // pega o valor do item que e o id unico no sistema | |
948 | - // METAESTAT | |
949 | - idreg = ""; | |
950 | - for (k = 0; k < nitens; k++) { | |
951 | - if (resultados[j][k].item === retorno[i].colunaidunico) { | |
952 | - idreg = resultados[j][k].valor; | |
953 | - } | |
954 | - } | |
955 | - // opcao para apagar e mover o registro | |
956 | - if (idreg != "" && retorno[i].editavel == "todos") { | |
957 | - res += | |
958 | - "<a href='#' onclick='i3GEO.util.animaClique(this);i3GEOF.identifica.apagaRegiao(\"" + retorno[i].tema | |
959 | - + "\",\"" | |
960 | - + idreg | |
961 | - + "\")' >" | |
962 | - + $trad('apagaRegistro', i3GEOF.identifica.dicionario) | |
963 | - + "</a>" | |
964 | - + " <a href='#' onclick='i3GEO.util.animaClique(this);i3GEOF.identifica.janelaMoverPonto(\"" | |
965 | - + retorno[i].tema | |
966 | - + "\",\"" | |
967 | - + idreg | |
968 | - + "\")' >" | |
969 | - + $trad('move', i3GEOF.identifica.dicionario) | |
970 | - + "</a><br>"; | |
971 | - } | |
972 | - for (k = 0; k < nitens; k++) { | |
973 | - tip = " "; | |
974 | - textovalor = resultados[j][k].valor; | |
975 | - // insere o input para edicao | |
976 | - // se for uma regiao cadastrada, todos os campos | |
977 | - // sao editaveis | |
978 | - if (idreg != "" && (resultados[j][k].item === retorno[i].editavel || retorno[i].editavel == "todos")) { | |
979 | - if (retorno[i].tiposalva == "regiao") { | |
980 | - retorno[i].id_medida_variavel = 0; | |
981 | - } | |
982 | - idsalva = | |
983 | - "idsalva" + retorno[i].tema | |
984 | - + "_" | |
985 | - + idreg | |
986 | - + "_" | |
987 | - + resultados[j][k].item | |
988 | - + "_" | |
989 | - + retorno[i].tiposalva; | |
990 | - paramsalva = | |
991 | - "\"" + retorno[i].tema | |
992 | - + "\"," | |
993 | - + idreg | |
994 | - + ",\"" | |
995 | - + resultados[j][k].item | |
996 | - + "\",\"" | |
997 | - + retorno[i].tiposalva | |
998 | - + "\""; | |
999 | - textovalor = | |
1000 | - "<br><img title='' src='" + i3GEO.configura.locaplic | |
1001 | - + "/imagens/branco.gif' style='margin-right:2px;position:relative;top:3px;width:12px;'>" | |
1002 | - + "<img onclick='i3GEO.util.animaClique(this);i3GEOF.identifica.salvaDados(" | |
1003 | - + paramsalva | |
1004 | - + ")' title='Salvar' src='" | |
1005 | - + i3GEO.configura.locaplic | |
1006 | - + "/imagens/oxygen/16x16/media-floppy.png' style='cursor:pointer;margin-right:2px;position:relative;top:3px;width:12px;'>" | |
1007 | - + "<input id='" | |
1008 | - + idsalva | |
1009 | - + "' type=text value='" | |
1010 | - + textovalor | |
1011 | - + "' class=digitar style='widh:210px' />"; | |
1012 | - } | |
1013 | - if (resultados[j][k].tip && resultados[j][k].tip.toLowerCase() == "sim") { | |
1014 | - tip = | |
1015 | - "<img style='margin-right:2px;position:relative;top:3px;width:12px;' src='" + i3GEO.configura.locaplic | |
1016 | - + "/imagens/tips.png' title='" | |
1017 | - + $trad('etiquetaAtiva', i3GEOF.identifica.dicionario) | |
1018 | - + "' />"; | |
1019 | - } else { | |
1020 | - tip = | |
1021 | - "<img style='margin-right:4px;position:relative;top:3px;width:12px;' src='" + i3GEO.configura.locaplic | |
1022 | - + "/imagens/branco.gif' title='' />"; | |
1023 | - } | |
1024 | - filtro = | |
1025 | - "onclick=\"i3GEO.util.animaClique(this);i3GEOF.identifica.filtrar('" + retorno[i].tema | |
1026 | - + "','" | |
1027 | - + resultados[j][k].item | |
1028 | - + "','" | |
1029 | - + resultados[j][k].valor | |
1030 | - + "','" | |
1031 | - + idjanela | |
1032 | - + "')\""; | |
1033 | - filtro = | |
1034 | - "<img " + filtro | |
1035 | - + " style='margin-right:2px;position:relative;top:3px;width:12px;' src='" | |
1036 | - + i3GEO.configura.locaplic | |
1037 | - + "/imagens/oxygen/16x16/view-filter.png' title='" | |
1038 | - + $trad('filtraValor', i3GEOF.identifica.dicionario) | |
1039 | - + "' />"; | |
1040 | - // verifica se o texto possui tags de abertura e | |
1041 | - // fechamento html | |
1042 | - try { | |
1043 | - if (textovalor && (textovalor.search(">") >= 0 || textovalor.search("<") >= 0)) { | |
1044 | - filtro = ""; | |
1045 | - } | |
1046 | - // o mesmo problema pode ocorrer em raster, | |
1047 | - // que possuem o nome da classe como valor | |
1048 | - if (resultados[j][k].alias.search(">") >= 0 || resultados[j][k].alias.search("<") >= 0) { | |
1049 | - filtro = ""; | |
1050 | - } | |
1051 | - } catch (e) { | |
1052 | - } | |
1053 | - | |
1054 | - if (resultados[j][k].link === "") { | |
1055 | - res += | |
1056 | - "<div style='width:100%;text-align:left;background-color:" + cor | |
1057 | - + "' >" | |
1058 | - + tip | |
1059 | - + filtro | |
1060 | - + resultados[j][k].alias | |
1061 | - + ": " | |
1062 | - + textovalor | |
1063 | - + "</div>"; | |
1064 | - } else { | |
1065 | - try { | |
1066 | - link = eval(resultados[j][k].link); | |
1067 | - } catch (e) { | |
1068 | - link = resultados[j][k].link; | |
1069 | - } | |
1070 | - if(resultados[j][k].idIframe){ | |
1071 | - alvo = resultados[j][k].idIframe; | |
1072 | - } | |
1073 | - else{ | |
1074 | - alvo = "_blank"; | |
1075 | - } | |
1076 | - res += | |
1077 | - "<div style='width:100%;text-align:left;background-color:" + cor | |
1078 | - + "' >" | |
1079 | - + tip | |
1080 | - + resultados[j][k].alias | |
1081 | - + ": <a href='" | |
1082 | - + link | |
1083 | - + "' target='" | |
1084 | - + alvo | |
1085 | - + "'>" | |
1086 | - + textovalor | |
1087 | - + "</a></div>"; | |
1088 | - } | |
1089 | - if (resultados[j][k].img !== "") { | |
1090 | - res += | |
1091 | - "<div style='width:100%;text-align:left;background-color:" + cor | |
1092 | - + "' >" | |
1093 | - + resultados[j][k].img | |
1094 | - + "</div>"; | |
1095 | - } | |
1096 | - if (cor === "RGB(250,250,250)") { | |
1097 | - cor = "beige"; | |
1098 | - } else { | |
1099 | - cor = "RGB(250,250,250)"; | |
1100 | - } | |
1101 | - } | |
1102 | - res += "<br><hr>"; | |
1103 | - } | |
1104 | - } else { | |
1105 | - // verifica o tipo de tema | |
1106 | - camada = i3GEO.arvoreDeCamadas.pegaTema(i3GEO.temaAtivo, "", "name"); | |
1107 | - if (retorno[i].tiposalva == "regiao" && parseInt(camada.type, 10) == 0) { | |
1108 | - // opcao para adicionar um ponto | |
1109 | - res += | |
1110 | - $trad('msgNadaEncontrado2', i3GEOF.identifica.dicionario) + "<br><a href='#' onclick='i3GEOF.identifica.adicionaPontoRegiao(\"" | |
1111 | - + idjanela | |
1112 | - + "\")' >" | |
1113 | - + $trad('adicionaPonto', i3GEOF.identifica.dicionario) | |
1114 | - + "</a>"; | |
1115 | - } else { | |
1116 | - res += $trad('msgNadaEncontrado2', i3GEOF.identifica.dicionario); | |
1117 | - } | |
1118 | - } | |
1119 | - } | |
1120 | - if (ntemas == 1) { | |
1121 | - res = i3GEOF.identifica.montaOpcoesIdentificaOcorrencia(atualN, numResultados) + res; | |
1122 | - } | |
1123 | - $i(idjanela + "i3GEOidentificaoguia1").innerHTML = res; | |
1124 | - } | |
1125 | - }, | |
1126 | - filtrar : function(tema, item, valor, idjanela) { | |
1127 | - if (i3GEOF.identifica.propJanelas[idjanela].aguarde.visibility === "visible") { | |
1128 | - return; | |
1129 | - } | |
1130 | - i3GEOF.identifica.propJanelas[idjanela].aguarde.visibility = "visible"; | |
1131 | - var filtro = "(|[" + item + "]| = |" + valor + "|)", temp = function(retorno) { | |
1132 | - i3GEOF.identifica.propJanelas[idjanela].aguarde.visibility = "hidden"; | |
1133 | - i3GEO.Interface.atualizaTema(retorno, tema); | |
1134 | - }, p = | |
1135 | - i3GEO.configura.locaplic + "/ferramentas/filtro/exec.php?base64=nao&g_sid=" + i3GEO.configura.sid + "&funcao=inserefiltro", cp = | |
1136 | - new cpaint(); | |
1137 | - cp.set_response_type("JSON"); | |
1138 | - cp.set_transfer_mode('POST'); | |
1139 | - cp.call(p, "insereFiltro", temp, "tema=" + tema + "&filtro=" + filtro); | |
1140 | - }, | |
1141 | - removeFiltro : function(tema, idjanela) { | |
1142 | - if (i3GEOF.identifica.propJanelas[idjanela].visibility === "visible") { | |
1143 | - return; | |
1144 | - } | |
1145 | - i3GEOF.identifica.propJanelas[idjanela].aguarde.visibility = "visible"; | |
1146 | - var temp = function(retorno) { | |
1147 | - i3GEOF.identifica.propJanelas[idjanela].aguarde.visibility = "hidden"; | |
1148 | - i3GEO.Interface.atualizaTema(retorno, tema); | |
1149 | - }, p = | |
1150 | - i3GEO.configura.locaplic + "/ferramentas/filtro/exec.php?base64=nao&g_sid=" + i3GEO.configura.sid + "&funcao=inserefiltro", cp = | |
1151 | - new cpaint(); | |
1152 | - cp.set_response_type("JSON"); | |
1153 | - cp.set_transfer_mode('POST'); | |
1154 | - cp.call(p, "insereFiltro", temp, "tema=" + tema + "&filtro="); | |
1155 | - }, | |
1156 | - adicionaPontoRegiao : function(idjanela) { | |
1157 | - var p = i3GEO.configura.locaplic + "/ferramentas/editortema/exec.php?funcao=adicionaGeometria&g_sid=" + i3GEO.configura.sid, tema = | |
1158 | - i3GEOF.identifica.propJanelas[idjanela].temaAtivo, temp = function(retorno) { | |
1159 | - i3GEO.janela.fechaAguarde("aguardeSalvaPonto"); | |
1160 | - i3GEO.Interface.atualizaTema("", tema); | |
1161 | - i3GEOF.identifica.buscaDadosTema(tema); | |
1162 | - }; | |
1163 | - i3GEO.janela.AGUARDEMODAL = true; | |
1164 | - i3GEO.janela.abreAguarde("aguardeSalvaPonto", "Adicionando..."); | |
1165 | - i3GEO.janela.AGUARDEMODAL = false; | |
1166 | - cpJSON.call(p, "foo", temp, "&tema=" + tema | |
1167 | - + "&wkt=POINT(" | |
1168 | - + i3GEOF.identifica.propJanelas[idjanela].x | |
1169 | - + " " | |
1170 | - + i3GEOF.identifica.propJanelas[idjanela].y | |
1171 | - + ")"); | |
1172 | - }, | |
1173 | - apagaRegiao : function(tema, idreg) { | |
1174 | - var excluir = | |
1175 | - function() { | |
1176 | - var p = | |
1177 | - i3GEO.configura.locaplic + "/ferramentas/editortema/exec.php?funcao=excluiRegistro&g_sid=" + i3GEO.configura.sid, temp = | |
1178 | - function() { | |
1179 | - i3GEO.janela.fechaAguarde("aguardeRemovendo"); | |
1180 | - i3GEO.Interface.atualizaTema("", tema); | |
1181 | - i3GEOF.identifica.buscaDadosTema(tema); | |
1182 | - }; | |
1183 | - i3GEO.janela.AGUARDEMODAL = true; | |
1184 | - i3GEO.janela.abreAguarde("aguardeRemovendo", "Excluindo..."); | |
1185 | - i3GEO.janela.AGUARDEMODAL = false; | |
1186 | - cpJSON.call(p, "foo", temp, "&tema=" + tema + "&identificador=" + idreg); | |
1187 | - }; | |
1188 | - i3GEO.janela.confirma( | |
1189 | - $trad('removeRegistroBD', i3GEOF.identifica.dicionario), | |
1190 | - "", | |
1191 | - $trad('sim', i3GEOF.identifica.dicionario), | |
1192 | - $trad('cancela', i3GEOF.identifica.dicionario), | |
1193 | - excluir); | |
1194 | - }, | |
1195 | - salvaDados : function(tema, idreg, coluna, tiposalva) { | |
1196 | - var p = i3GEO.configura.locaplic + "/ferramentas/editortema/exec.php?funcao=salvaRegistro&g_sid=" + i3GEO.configura.sid, idvalor = | |
1197 | - $i("idsalva" + tema + "_" + idreg + "_" + coluna + "_" + tiposalva), temp = function(retorno) { | |
1198 | - i3GEO.janela.fechaAguarde("aguardeSalvaAtributos"); | |
1199 | - i3GEO.Interface.atualizaTema("", i3GEOF.identifica.tema); | |
1200 | - }; | |
1201 | - | |
1202 | - if (idvalor) { | |
1203 | - i3GEO.janela.AGUARDEMODAL = true; | |
1204 | - i3GEO.janela.abreAguarde("aguardeSalvaAtributos", "Salvando..."); | |
1205 | - i3GEO.janela.AGUARDEMODAL = false; | |
1206 | - cpJSON.call(p, "foo", temp, "&tema=" + tema + "&coluna=" + coluna + "&valor=" + idvalor.value + "&identificador=" + idreg); | |
1207 | - } else { | |
1208 | - alert("ocorreu um erro"); | |
1209 | - } | |
1210 | - }, | |
1211 | - montaOpcoesIdentificaOcorrencia : function(atual, nres) { | |
1212 | - var ins, select, i, nocor; | |
1213 | - if (!atual) { | |
1214 | - atual = "todas"; | |
1215 | - } | |
1216 | - sel = ""; | |
1217 | - select = | |
1218 | - "<select id=i3GEOFidentificaNocorrencias onchange='i3GEOF.identifica.mostraDadosTema(i3GEOF.identifica.dadosIdentifica)'>"; | |
1219 | - if (atual == "todas") { | |
1220 | - sel = "SELECTED"; | |
1221 | - } | |
1222 | - select += "<option value='todas' " + sel + " >" + $trad('todas', i3GEOF.identifica.dicionario) + "</option>"; | |
1223 | - nocor = nres + 1; | |
1224 | - for (i = 1; i < nocor; i++) { | |
1225 | - sel = ""; | |
1226 | - if (atual == i) { | |
1227 | - sel = "SELECTED"; | |
1228 | - } | |
1229 | - select += "<option value=" + i + " " + sel + " >" + i + "</option>"; | |
1230 | - } | |
1231 | - select += "</select>"; | |
1232 | - ins = "<table><tr>"; | |
1233 | - ins += "<td>" + $trad('mostraOcorrencia', i3GEOF.identifica.dicionario) + ": </td>"; | |
1234 | - ins += "<td> " + select + "</td>"; | |
1235 | - ins += "</tr></table>"; | |
1236 | - if (nres == 1) { | |
1237 | - ins = ""; | |
1238 | - } | |
1239 | - return ins; | |
1240 | - }, | |
1241 | - listaVariaveis : function(codigo_tipo_regiao, idjanela) { | |
1242 | - var p, temp; | |
1243 | - temp = function(retorno) { | |
1244 | - var ins = "", n, i, m, j, d, dd, nc, ic, ndd, idd; | |
1245 | - n = retorno.length; | |
1246 | - | |
1247 | - if (n > 0) { | |
1248 | - // cada variavel | |
1249 | - for (i = 0; i < n; i++) { | |
1250 | - d = retorno[i]; | |
1251 | - ins += "<b>" + d.variavel + "</b>"; | |
1252 | - m = d.dados.length; | |
1253 | - // cada medida | |
1254 | - for (j = 0; j < m; j++) { | |
1255 | - dd = d.dados[j]; | |
1256 | - // ins += " -> " + dd.medida; | |
1257 | - nc = dd.dados.colunas.length; | |
1258 | - ins += "<table class='lista4' ><tr>"; | |
1259 | - // cabecalho | |
1260 | - for (ic = 0; ic < nc; ic++) { | |
1261 | - ins += "<td>" + dd.dados.aliascolunas[ic] + "</td>"; | |
1262 | - } | |
1263 | - ins += "</tr>"; | |
1264 | - ndd = dd.dados.dados.length; | |
1265 | - // cada valor | |
1266 | - for (idd = 0; idd < ndd; idd++) { | |
1267 | - ins += "<tr>"; | |
1268 | - for (ic = 0; ic < nc; ic++) { | |
1269 | - ins += "<td>" + dd.dados.dados[idd][dd.dados.colunas[ic]] + "</td>"; | |
1270 | - } | |
1271 | - ins += "</tr>"; | |
1272 | - } | |
1273 | - ins += "</table>"; | |
1274 | - } | |
1275 | - } | |
1276 | - } | |
1277 | - i3GEO.janela.mensagemSimples("<div style='overflow:auto;height:100%'>" + ins + "</div>", ""); | |
1278 | - }; | |
1279 | - p = i3GEO.configura.locaplic + "/admin/php/metaestat.php?funcao=LISTATODOSATRIBUTOSMEDIDAVARIAVELXY", cpJSON.call( | |
1280 | - p, | |
1281 | - "foo", | |
1282 | - temp, | |
1283 | - "&codigo_tipo_regiao=" + codigo_tipo_regiao | |
1284 | - + "&x=" | |
1285 | - + i3GEOF.identifica.propJanelas[idjanela].x | |
1286 | - + "&y=" | |
1287 | - + i3GEOF.identifica.propJanelas[idjanela].y); | |
1288 | - } | |
1289 | - }; |
ferramentas/identificax/template_mst.html
... | ... | @@ -1,83 +0,0 @@ |
1 | -<!-- Guias --> | |
2 | -<div id='{{{idjanela}}}' class='yui-navset' style='top: 0px; cursor: pointer; margin-left: 2px;'> | |
3 | - <ul class='yui-nav' style='border-width: 0pt 0pt 0px; border-color: rgb(240, 240, 240); border-bottom-color: white;'> | |
4 | - <li> | |
5 | - <div id='{{{idjanela}}}i3GEOidentificaguia3' style='text-align: center; left: 0px;'> | |
6 | - <a title='{{{propriedades}}}'> | |
7 | - <em><span class="material-icons">settings</span></em> | |
8 | - </a> | |
9 | - </div> | |
10 | - </li> | |
11 | - <li> | |
12 | - <div id='{{{idjanela}}}i3GEOidentificaguia1' style='text-align: center; left: 0px;'> | |
13 | - <a> | |
14 | - <em>{{{temasVisiveis}}}</em> | |
15 | - </a> | |
16 | - </div> | |
17 | - </li> | |
18 | - <li> | |
19 | - <div id='{{{idjanela}}}i3GEOidentificaguia2' style='text-align: center; left: 0px;'> | |
20 | - <a> | |
21 | - <em>{{{todos}}}</em> | |
22 | - </a> | |
23 | - </div> | |
24 | - </li> | |
25 | - <li> | |
26 | - <div id='{{{idjanela}}}i3GEOidentificaguia4' style='text-align: center; left: 0px;'> | |
27 | - <a> | |
28 | - <em>{{{etiquetas}}}</em> | |
29 | - </a> | |
30 | - </div> | |
31 | - </li> | |
32 | - <li> | |
33 | - <div id='{{{idjanela}}}i3GEOidentificaguia5' style='text-align: center; left: 0px;'> | |
34 | - <a> | |
35 | - <em>XY/buffer</em> | |
36 | - </a> | |
37 | - </div> | |
38 | - </li> | |
39 | - </ul> | |
40 | -</div> | |
41 | -<!-- Propriedades --> | |
42 | -<div id='{{{idjanela}}}i3GEOidentificaguia3obj' style='display: none;' class="container-fluid"> | |
43 | - {{{resolucaoBusca}}}: | |
44 | - <br> | |
45 | - <br> | |
46 | - <div class='i3geoForm i3geoFormIconeNumero'> | |
47 | - <input type='number' value='10' id='{{{idjanela}}}i3GEOidentificaresolucao' /> | |
48 | - </div> | |
49 | - <br> | |
50 | - <br> | |
51 | - <div class="checkbox text-left"> | |
52 | - <div id='{{{idjanela}}}i3GEOidentificatemaativo' class='geralFerramentas' style='overflow: hidden; display: block; position: relative; top: -5px; left: 0px; width: 150px'> | |
53 | - <div style='left: 0px; width: 150px; text-align: left;' id='{{{idjanela}}}i3GEOidentificalistaTemas'></div> | |
54 | - <div style='left: 0px; width: 150px; text-align: left;' id='{{{idjanela}}}i3GEOidentificalistaSistemas'></div> | |
55 | - </div> | |
56 | - <label> | |
57 | - <input id='{{{idjanela}}}i3GEOtabelatipolista' type="checkbox" onclick="i3GEOF.tabela.pegaRegistros('{{{idjanela}}}')"> | |
58 | - <span class="checkbox-material noprint"> | |
59 | - <span class="check"></span> | |
60 | - </span> | |
61 | - {{{atuatab}}} | |
62 | - </label> | |
63 | - </div> | |
64 | -</div> | |
65 | -<!-- Dados --> | |
66 | -<div class='container-fluid' id='{{{idjanela}}}i3GEOidentificaguia1obj'></div> | |
67 | -<div class='container-fluid' id='{{{idjanela}}}i3GEOidentificaguia2obj' style='display: none;'></div> | |
68 | - | |
69 | -<div class='container-fluid' id='{{{idjanela}}}i3GEOidentificaguia4obj' style='display: none;'> | |
70 | - {{{mostraEtiquetas}}} | |
71 | - <br> | |
72 | - <br> | |
73 | - <input id='{{{idjanela}}}i3GEOidentificabotao1' size='20' type='button' value='{{{configuraEtiqueta}}}' /> | |
74 | -</div> | |
75 | -<div class='container-fluid' id='{{{idjanela}}}i3GEOidentificaguia5obj' style='display: none;'> | |
76 | - <b>{{{valorPonto}}}<br></b> | |
77 | - <div id='{{{idjanela}}}i3GEOidentificacoord'></div> | |
78 | - <br> | |
79 | - <input id='{{{idjanela}}}i3GEOidentificabotao2' size='20' type='button' value='{{{criaBuffer}}}' /> | |
80 | - <br> | |
81 | - <br> | |
82 | - <div id='{{{idjanela}}}i3GEOidentificacoordtexto' style='text-align: left'></div> | |
83 | -</div> | |
84 | 0 | \ No newline at end of file |
ferramentas/legenda/dicionario.js
... | ... | @@ -164,21 +164,28 @@ i3GEOF.legenda.dicionario = |
164 | 164 | ], |
165 | 165 | 'consideraElementosVisisveis' : [ |
166 | 166 | { |
167 | - pt : "marque para considerar apenas os elementos visíveis na extensão geográfica atual, caso contrário, será considerada a extensão geográfica inicial do mapa", | |
167 | + pt : "marque para considerar nos cálculos apenas os elementos visíveis na extensão geográfica atual, caso contrário, será considerada a extensão geográfica inicial do mapa", | |
168 | 168 | en : "", |
169 | 169 | es : "" |
170 | 170 | } |
171 | 171 | ], |
172 | 172 | 'ignoraValores' : [ |
173 | 173 | { |
174 | - pt : "Ao gerar as classes, ignorar os valores (separe com vírgula)", | |
174 | + pt : "Ao obter os dados para gerar as classes, ignorar os valores listados abaixo (separe com vírgula)", | |
175 | 175 | en : "", |
176 | 176 | es : "" |
177 | 177 | } |
178 | 178 | ], |
179 | 179 | 'transformaGeom' : [ |
180 | 180 | { |
181 | - pt : "Transforma a representação geométrica dos elementos do tema. Após alterar esse parâmetro, pode ser necessário modificar as características do símbolo.", | |
181 | + pt : "Tipo de transformação", | |
182 | + en : "", | |
183 | + es : "" | |
184 | + } | |
185 | + ], | |
186 | + 'alteraGeom' : [ | |
187 | + { | |
188 | + pt : "Altera a geometria. Transforma a representação geométrica dos elementos do tema. Após alterar esse parâmetro, pode ser necessário modificar as características do símbolo.", | |
182 | 189 | en : "", |
183 | 190 | es : "" |
184 | 191 | } |
... | ... | @@ -218,13 +225,6 @@ i3GEOF.legenda.dicionario = |
218 | 225 | es : "" |
219 | 226 | } |
220 | 227 | ], |
221 | - 'alteraGeom' : [ | |
222 | - { | |
223 | - pt : "Altera geometria", | |
224 | - en : "", | |
225 | - es : "" | |
226 | - } | |
227 | - ], | |
228 | 228 | 'alteraTipoGeom' : [ |
229 | 229 | { |
230 | 230 | pt : "Altera o tipo de representação do tema. Se for poligonal, passa para linear e vice-versa.", |
... | ... | @@ -255,21 +255,28 @@ i3GEOF.legenda.dicionario = |
255 | 255 | ], |
256 | 256 | 'cadaOcorrenciaUnicoSimbolo' : [ |
257 | 257 | { |
258 | - pt : "Cada ocorrência de um valor para o item selecionado, será desenhado com o mesmo símbolo", | |
258 | + pt : "Item utilizado para obter as ocorrências únicas", | |
259 | 259 | en : "", |
260 | 260 | es : "" |
261 | 261 | } |
262 | 262 | ], |
263 | 263 | 'valorUnico' : [ |
264 | 264 | { |
265 | - pt : "Calcular valor único", | |
265 | + pt : "Calcular valor único. Cada ocorrência de um valor para o item selecionado, será desenhado com o mesmo símbolo.", | |
266 | 266 | en : "", |
267 | 267 | es : "" |
268 | 268 | } |
269 | 269 | ], |
270 | + 'classesFixas' : [ | |
271 | + { | |
272 | + pt : "Cria classes para um item numérico utilizando um número fixo de classes", | |
273 | + en : "", | |
274 | + es : "" | |
275 | + } | |
276 | + ], | |
270 | 277 | 'criaClassesItemNumerico' : [ |
271 | 278 | { |
272 | - pt : "Cria classes para um item numérico utilizando um número fixo de classes", | |
279 | + pt : "Item que será utilizado para obter os valores", | |
273 | 280 | en : "", |
274 | 281 | es : "" |
275 | 282 | } |
... | ... | @@ -281,16 +288,30 @@ i3GEOF.legenda.dicionario = |
281 | 288 | es : "" |
282 | 289 | } |
283 | 290 | ], |
291 | + 'tipoCalculo' : [ | |
292 | + { | |
293 | + pt : "Tipo de cálculo", | |
294 | + en : "", | |
295 | + es : "" | |
296 | + } | |
297 | + ], | |
284 | 298 | 'intervalosIguais' : [ |
285 | 299 | { |
286 | - pt : "Calcular intervalos iguais", | |
300 | + pt : "Intervalos iguais", | |
287 | 301 | en : "", |
288 | 302 | es : "" |
289 | 303 | } |
290 | 304 | ], |
305 | + 'calcularQuartil' : [ | |
306 | + { | |
307 | + pt : "Quartis. Cria classes para um item numérico utilizando quartis", | |
308 | + en : "", | |
309 | + es : "" | |
310 | + } | |
311 | + ], | |
291 | 312 | 'criaQuartis' : [ |
292 | 313 | { |
293 | - pt : "Cria classes para um item numérico utilizando os quartis", | |
314 | + pt : "Item que será utilizado para obter os valores", | |
294 | 315 | en : "", |
295 | 316 | es : "" |
296 | 317 | } |
... | ... | @@ -325,14 +346,21 @@ i3GEOF.legenda.dicionario = |
325 | 346 | ], |
326 | 347 | "etiquetasClasse" : [ |
327 | 348 | { |
328 | - pt : "Textos da classe (labels)", | |
349 | + pt : "Definição do texto que será mostrado em cada elemento do mapa pertencente à classe escolhida", | |
350 | + en : "", | |
351 | + es : "" | |
352 | + } | |
353 | + ], | |
354 | + 'removeLabels' : [ | |
355 | + { | |
356 | + pt : "Remove os textos", | |
329 | 357 | en : "", |
330 | 358 | es : "" |
331 | 359 | } |
332 | 360 | ], |
333 | 361 | 'itemComTexto' : [ |
334 | 362 | { |
335 | - pt : "Item com o texto", | |
363 | + pt : "Item que será utilizado como fonte para obtenção dos textos", | |
336 | 364 | en : "", |
337 | 365 | es : "" |
338 | 366 | } |
... | ... | @@ -360,14 +388,14 @@ i3GEOF.legenda.dicionario = |
360 | 388 | ], |
361 | 389 | 'estilos' : [ |
362 | 390 | { |
363 | - pt : "Estilos", | |
391 | + pt : "Estilos. Cada símbolo pode ser formado por um ou mais estilos. Utilize as opções abaixo para criar ou remover os estilos do símbolo utilizado na classe atual.", | |
364 | 392 | en : "", |
365 | 393 | es : "" |
366 | 394 | } |
367 | 395 | ], |
368 | 396 | 'ajudaEstilo' : [ |
369 | 397 | { |
370 | - pt : "Cada símbolo pode ser formado por um ou mais estilos. Utilize -1,-1,-1 para anular uma cor. A cor deve ser definida no formato vermelho,verde,azul. Para criar linhas tracejadas utilize o símbolo 0 ou vazio e digite um padrão de repetição como por exemplo 2 10 2 10 ", | |
398 | + pt : "Utilize -1,-1,-1 para anular uma cor. A cor deve ser definida no formato vermelho,verde,azul. Para criar linhas tracejadas utilize o símbolo 0 ou vazio e digite um padrão de repetição como por exemplo 2 10 2 10 ", | |
371 | 399 | en : "", |
372 | 400 | es : "" |
373 | 401 | } |
... | ... | @@ -507,7 +535,7 @@ i3GEOF.legenda.dicionario = |
507 | 535 | ], |
508 | 536 | 'selecionaProcesso' : [ |
509 | 537 | { |
510 | - pt : "selecione o processo", | |
538 | + pt : "Selecione um processo para adicionar", | |
511 | 539 | en : "", |
512 | 540 | es : "" |
513 | 541 | } |
... | ... | @@ -570,7 +598,7 @@ i3GEOF.legenda.dicionario = |
570 | 598 | ], |
571 | 599 | 'estiloEdicao' : [ |
572 | 600 | { |
573 | - pt : "Estilo em edição", | |
601 | + pt : "Estilo em edição (após adicionar ou excluir um estilo, acione o botão de aplicar alterações)", | |
574 | 602 | en : "", |
575 | 603 | es : "" |
576 | 604 | } |
... | ... | @@ -591,7 +619,7 @@ i3GEOF.legenda.dicionario = |
591 | 619 | ], |
592 | 620 | 'tamanhoEspacamento' : [ |
593 | 621 | { |
594 | - pt : "Tamanho / espaçamento", | |
622 | + pt : "Tamanho / espaçamento. Defina um valor para a cor ou um item da tabela de atributos que contm os valores para cada elemento.", | |
595 | 623 | en : "", |
596 | 624 | es : "" |
597 | 625 | } |
... | ... | @@ -626,9 +654,7 @@ i3GEOF.legenda.dicionario = |
626 | 654 | ], |
627 | 655 | 'simbolo' : [ |
628 | 656 | { |
629 | - pt : "Nome do símbolo<br>Você pode também usar o caminho absoluto de uma imagem PNG existente no servidor ou clicar em " + "um dos símbolos mostrados abaixo. <a href='" | |
630 | - + i3GEO.configura.locaplic | |
631 | - + "/admin/html/subirsimbolo.html' target=_blank >Clique aqui para upload dessa imagem</a>", | |
657 | + pt : "Nome do símbolo. Você pode também usar o caminho absoluto de uma imagem PNG existente no servidor ou clicar em um dos símbolos mostrados abaixo.", | |
632 | 658 | en : "", |
633 | 659 | es : "" |
634 | 660 | } |
... | ... | @@ -663,21 +689,14 @@ i3GEOF.legenda.dicionario = |
663 | 689 | ], |
664 | 690 | 'quebrasNaturais' : [ |
665 | 691 | { |
666 | - pt : "Calcular quebras naturais", | |
667 | - en : "", | |
668 | - es : "" | |
669 | - } | |
670 | - ], | |
671 | - 'calcularQuartil' : [ | |
672 | - { | |
673 | - pt : "Calcular quartis", | |
692 | + pt : "Quebras naturais", | |
674 | 693 | en : "", |
675 | 694 | es : "" |
676 | 695 | } |
677 | 696 | ], |
678 | 697 | 'calcularQuantil' : [ |
679 | 698 | { |
680 | - pt : "Calcular quantis", | |
699 | + pt : "Quantis", | |
681 | 700 | en : "", |
682 | 701 | es : "" |
683 | 702 | } |
... | ... | @@ -761,14 +780,14 @@ i3GEOF.legenda.dicionario = |
761 | 780 | ], |
762 | 781 | "metade" : [ |
763 | 782 | { |
764 | - pt : "Metade", | |
783 | + pt : "Metade. Classifica os dados em duas classes, a primeira concentra os registros que somados correspondem à primeira metade do total e a segunda classe corresponde à segunda metade", | |
765 | 784 | en : "", |
766 | 785 | es : "" |
767 | 786 | } |
768 | 787 | ], |
769 | 788 | "duasmetades" : [ |
770 | 789 | { |
771 | - pt : "Classifica os dados em duas classes, a primeira concentra os registros que somados correspondem à primeira metade do total e a segunda classe corresponde à segunda metade", | |
790 | + pt : "Coluna utilizada para obter os valores", | |
772 | 791 | en : "", |
773 | 792 | es : "" |
774 | 793 | } |
... | ... | @@ -801,6 +820,13 @@ i3GEOF.legenda.dicionario = |
801 | 820 | es : "" |
802 | 821 | } |
803 | 822 | ], |
823 | + "clusterAjuda" : [ | |
824 | + { | |
825 | + pt : "Faz a representação dos dados na forma de clusters. Cada cluster agrupa elementos próximos e mostra as quantidades existentes. A proximidade depende da escala do mapa.", | |
826 | + en : "", | |
827 | + es : "" | |
828 | + } | |
829 | + ], | |
804 | 830 | "ClusterMaxdistance" : [ |
805 | 831 | { |
806 | 832 | pt : "Distância (pixels) máxima entre os pontos que será considerada para permitir o agrupamento", |
... | ... | @@ -852,13 +878,13 @@ i3GEOF.legenda.dicionario = |
852 | 878 | ], |
853 | 879 | "offsite" : [ |
854 | 880 | { |
855 | - pt : "Cor, em imagens, que será considerada como NODATA e renderizada como transparente (RGB separado por vírgulas)", | |
881 | + pt : "Cor que será considerada como NODATA e renderizada como transparente no caso de camadas do tipo imagem (RGB separado por vírgulas)", | |
856 | 882 | en : "", |
857 | 883 | es : "" |
858 | 884 | } |
859 | 885 | ], |
860 | 886 | 'autoClasses' : [ { |
861 | - pt : "É possível a geração de classes automaticamente por meio da definição de colunas na tabela de atributos do tema que armazenam as informações sobre cor, tamanho, etc.", | |
887 | + pt : "A geração de classes pode ser feita automaticamente por meio da definição de colunas, existentes na tabela de atributos do tema, e que armazenem as informações sobre cor, tamanho, etc.", | |
862 | 888 | en : "", |
863 | 889 | es : "" |
864 | 890 | } ], |
... | ... | @@ -898,7 +924,32 @@ i3GEOF.legenda.dicionario = |
898 | 924 | es : "" |
899 | 925 | } ], |
900 | 926 | "colunasTxt" : [ { |
901 | - pt : "Itens disponíveis", | |
927 | + pt : "Colunas disponíveis", | |
928 | + en : "", | |
929 | + es : "" | |
930 | + } ], | |
931 | + "inverte" : [ { | |
932 | + pt : "Inverte as cores", | |
933 | + en : "", | |
934 | + es : "" | |
935 | + } ], | |
936 | + "calculaTamanho" : [ { | |
937 | + pt : "Varia a textura ou tamanho", | |
938 | + en : "", | |
939 | + es : "" | |
940 | + } ], | |
941 | + "existentes" : [ { | |
942 | + pt : "Processos existentes", | |
943 | + en : "", | |
944 | + es : "" | |
945 | + } ], | |
946 | + "edicaoEstilo" : [ { | |
947 | + pt : "Edição do estilo escolhido", | |
948 | + en : "", | |
949 | + es : "" | |
950 | + } ], | |
951 | + "corContorno" : [ { | |
952 | + pt : "Cor do contorno", | |
902 | 953 | en : "", |
903 | 954 | es : "" |
904 | 955 | } ] | ... | ... |
ferramentas/legenda/index.js
... | ... | @@ -40,9 +40,9 @@ if (typeof (i3GEOF) === 'undefined') { |
40 | 40 | /* |
41 | 41 | * Classe: i3GEOF.legenda |
42 | 42 | */ |
43 | -// incuir opcao para inserir o nome de uma imagem da legenda | |
43 | +//incuir opcao para inserir o nome de uma imagem da legenda | |
44 | 44 | i3GEOF.legenda = |
45 | - { | |
45 | +{ | |
46 | 46 | /* |
47 | 47 | * Variavel: parDefault |
48 | 48 | * |
... | ... | @@ -95,10 +95,14 @@ i3GEOF.legenda = |
95 | 95 | * Ultima classe selecionado |
96 | 96 | */ |
97 | 97 | classe : "", |
98 | + | |
98 | 99 | /** |
99 | 100 | * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php |
100 | 101 | */ |
101 | 102 | MUSTACHE : "", |
103 | + MUSTACHELISTA : "", | |
104 | + MUSTACHEESTILO : "", | |
105 | + DICIONARIO: "", | |
102 | 106 | /** |
103 | 107 | * Funcao do usuario que e executada apos iniciar a ferramenta |
104 | 108 | */ |
... | ... | @@ -113,6 +117,8 @@ i3GEOF.legenda = |
113 | 117 | dicionario["locaplic"] = i3GEO.configura.locaplic; |
114 | 118 | dicionario["asp"] = '"'; |
115 | 119 | dicionario["aplicar"] = $trad("p14"); |
120 | + //para reaproveitamento | |
121 | + i3GEOF.legenda.DICIONARIO = dicionario; | |
116 | 122 | return dicionario; |
117 | 123 | }, |
118 | 124 | /* |
... | ... | @@ -126,9 +132,18 @@ i3GEOF.legenda = |
126 | 132 | */ |
127 | 133 | inicia : function(iddiv) { |
128 | 134 | if(i3GEOF.legenda.MUSTACHE == ""){ |
129 | - $.get(i3GEO.configura.locaplic + "/ferramentas/legenda/template_mst.html", function(template) { | |
130 | - i3GEOF.legenda.MUSTACHE = template; | |
135 | + var t1 = i3GEO.configura.locaplic + "/ferramentas/legenda/template_mst.html", | |
136 | + t2 = i3GEO.configura.locaplic + "/ferramentas/legenda/templateLista_mst.html", | |
137 | + t3 = i3GEO.configura.locaplic + "/ferramentas/legenda/templateFormEstilo_mst.html"; | |
138 | + | |
139 | + $.when( $.get(t1),$.get(t2),$.get(t3) ).done(function(r1,r2,r3) { | |
140 | + i3GEOF.legenda.MUSTACHE = r1[0]; | |
141 | + i3GEOF.legenda.MUSTACHELISTA = r2[0]; | |
142 | + i3GEOF.legenda.MUSTACHEESTILO = r3[0]; | |
131 | 143 | i3GEOF.legenda.inicia(iddiv); |
144 | + }).fail(function() { | |
145 | + i3GEO.janela.closeMsg($trad("erroTpl")); | |
146 | + return; | |
132 | 147 | }); |
133 | 148 | return; |
134 | 149 | } |
... | ... | @@ -156,270 +171,33 @@ i3GEOF.legenda = |
156 | 171 | i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia1", "i3GEOlegendaguia"); |
157 | 172 | // eventos das guias |
158 | 173 | $i("i3GEOlegendaguia8").onclick = function() { |
159 | - i3GEOF.legenda.ativaAplicar("none"); | |
160 | 174 | i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia8", "i3GEOlegendaguia"); |
161 | 175 | i3GEOF.legenda.parametrosAuto(); |
162 | 176 | }; |
163 | 177 | $i("i3GEOlegendaguia7").onclick = function() { |
164 | - i3GEOF.legenda.ativaAplicar("none"); | |
165 | 178 | i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia7", "i3GEOlegendaguia"); |
166 | 179 | }; |
167 | 180 | $i("i3GEOlegendaguia6").onclick = function() { |
168 | - i3GEOF.legenda.ativaAplicar("none"); | |
169 | 181 | i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia6", "i3GEOlegendaguia"); |
170 | 182 | }; |
171 | 183 | $i("i3GEOlegendaguia1").onclick = function() { |
172 | - i3GEOF.legenda.ativaAplicar("none"); | |
173 | 184 | i3GEOF.legenda.mostralegenda(); |
174 | 185 | i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia1", "i3GEOlegendaguia"); |
175 | 186 | }; |
176 | 187 | $i("i3GEOlegendaguia2").onclick = function() { |
177 | - i3GEOF.legenda.ativaAplicar("none"); | |
178 | 188 | i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia2", "i3GEOlegendaguia"); |
179 | 189 | }; |
180 | 190 | $i("i3GEOlegendaguia3").onclick = function() { |
181 | 191 | i3GEO.janela.tempoMsg($trad('ajuda', i3GEOF.legenda.dicionario)); |
182 | 192 | }; |
183 | 193 | $i("i3GEOlegendaguia4").onclick = function() { |
184 | - i3GEOF.legenda.ativaAplicar("none"); | |
185 | 194 | i3GEOF.legenda.mostraGrafico(); |
186 | 195 | }; |
187 | 196 | $i("i3GEOlegendaguia5").onclick = function() { |
188 | - i3GEOF.legenda.ativaAplicar("none"); | |
189 | 197 | i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia5", "i3GEOlegendaguia"); |
190 | 198 | }; |
191 | 199 | |
192 | - var b = new YAHOO.widget.Button("i3GEOlegendabotaoImagemLegenda", { | |
193 | - onclick : { | |
194 | - fn : i3GEOF.legenda.aplicarLegendaImg | |
195 | - } | |
196 | - }); | |
197 | - b.addClass("rodar100"); | |
198 | - | |
199 | - var b = new YAHOO.widget.Button("i3GEOlegendabotaoOffsite", { | |
200 | - onclick : { | |
201 | - fn : i3GEOF.legenda.aplicarOffsite | |
202 | - } | |
203 | - }); | |
204 | - b.addClass("rodar100"); | |
205 | - | |
206 | - var b = new YAHOO.widget.Button("i3GEOlegendabotaoAplicarCluster", { | |
207 | - onclick : { | |
208 | - fn : i3GEOF.legenda.aplicarCluster | |
209 | - } | |
210 | - }); | |
211 | - b.addClass("rodar"); | |
212 | - | |
213 | - var b = new YAHOO.widget.Button("i3GEOlegendabotaoRemoverCluster", { | |
214 | - onclick : { | |
215 | - fn : i3GEOF.legenda.removerCluster | |
216 | - } | |
217 | - }); | |
218 | - b.addClass("rodar"); | |
219 | - | |
220 | - var b = new YAHOO.widget.Button("i3GEOlegendabotaoAplicarAuto", { | |
221 | - onclick : { | |
222 | - fn : i3GEOF.legenda.salvaParametrosAuto | |
223 | - } | |
224 | - }); | |
225 | - b.addClass("rodar"); | |
226 | - | |
227 | - var b = new YAHOO.widget.Button("i3GEOlegendabotao1", { | |
228 | - onclick : { | |
229 | - fn : i3GEOF.legenda.mudaLegenda | |
230 | - } | |
231 | - }); | |
232 | - b.addClass("rodar150"); | |
233 | - b = new YAHOO.widget.Button("i3GEOlegendabotao2", { | |
234 | - onclick : { | |
235 | - fn : i3GEOF.legenda.adicionaClasse | |
236 | - } | |
237 | - }); | |
238 | - b.addClass("rodar150"); | |
239 | - b = new YAHOO.widget.Button("i3GEOlegendabotao3", { | |
240 | - onclick : { | |
241 | - fn : i3GEOF.legenda.adicionaConta | |
242 | - } | |
243 | - }); | |
244 | - b.addClass("rodar"); | |
245 | - b = new YAHOO.widget.Button("i3GEOlegendabotao15", { | |
246 | - onclick : { | |
247 | - fn : i3GEOF.legenda.adicionaOpacidade | |
248 | - } | |
249 | - }); | |
250 | - b.addClass("rodar"); | |
251 | - | |
252 | - b = new YAHOO.widget.Button("i3GEOlegendabotaoRamp", { | |
253 | - onclick : { | |
254 | - fn : function() { | |
255 | - var tabela = $i("i3GEOlegendalegenda"); | |
256 | - var trs = tabela.getElementsByTagName("tr"); | |
257 | - var ncores = trs.length - 1; | |
258 | - // $i("i3geo_janelaCorRampComboCabecaSel").value = i3GEOF.legenda.tema; | |
259 | - i3GEO.util.abreColourRamp("", "listaColourRamp", ncores, i3GEOF.legenda.tema); | |
260 | - } | |
261 | - } | |
262 | - }); | |
263 | - b.addClass("rodar"); | |
264 | - b = new YAHOO.widget.Button("i3GEOlegendabotao4", { | |
265 | - onclick : { | |
266 | - fn : i3GEOF.legenda.paleta | |
267 | - } | |
268 | - }); | |
269 | - b.addClass("rodar100"); | |
270 | - b = new YAHOO.widget.Button("i3GEOlegendabotao5", { | |
271 | - onclick : { | |
272 | - fn : i3GEOF.legenda.simbU | |
273 | - } | |
274 | - }); | |
275 | - b.addClass("rodar"); | |
276 | - b = new YAHOO.widget.Button("i3GEOlegendabotao6", { | |
277 | - onclick : { | |
278 | - fn : i3GEOF.legenda.valorU | |
279 | - } | |
280 | - }); | |
281 | - b.addClass("rodar"); | |
282 | - b = new YAHOO.widget.Button("i3GEOlegendabotaoMetade", { | |
283 | - onclick : { | |
284 | - fn : i3GEOF.legenda.metade | |
285 | - } | |
286 | - }); | |
287 | - b.addClass("rodar"); | |
288 | - b = new YAHOO.widget.Button("i3GEOlegendabotaoMedia", { | |
289 | - onclick : { | |
290 | - fn : i3GEOF.legenda.media | |
291 | - } | |
292 | - }); | |
293 | - b.addClass("rodar"); | |
294 | - b = new YAHOO.widget.Button("i3GEOlegendabotao7", { | |
295 | - onclick : { | |
296 | - fn : i3GEOF.legenda.representacao | |
297 | - } | |
298 | - }); | |
299 | - b.addClass("rodar"); | |
300 | - b = new YAHOO.widget.Button("i3GEOlegendabotao8", { | |
301 | - onclick : { | |
302 | - fn : i3GEOF.legenda.valorC | |
303 | - } | |
304 | - }); | |
305 | - b.addClass("rodar"); | |
306 | - b = new YAHOO.widget.Button("i3GEOlegendabotao9", { | |
307 | - onclick : { | |
308 | - fn : i3GEOF.legenda.valorQ | |
309 | - } | |
310 | - }); | |
311 | - b.addClass("rodar"); | |
312 | - b = new YAHOO.widget.Button("i3GEOlegendabotaoQuantil", { | |
313 | - onclick : { | |
314 | - fn : i3GEOF.legenda.valorQu | |
315 | - } | |
316 | - }); | |
317 | - b.addClass("rodar"); | |
318 | - b = new YAHOO.widget.Button("i3GEOlegendabotaoQN", { | |
319 | - onclick : { | |
320 | - fn : i3GEOF.legenda.valorQN | |
321 | - } | |
322 | - }); | |
323 | - b.addClass("rodar"); | |
324 | - | |
325 | - b = new YAHOO.widget.Button("i3GEOlegendabotao17", { | |
326 | - onclick : { | |
327 | - fn : i3GEOF.legenda.alteraGeometriaTema | |
328 | - } | |
329 | - }); | |
330 | - b.addClass("rodar"); | |
331 | - b = | |
332 | - new YAHOO.widget.Button("i3GEOlegendabotaoSLDe", { | |
333 | - onclick : { | |
334 | - fn : function() { | |
335 | - window.open(i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?funcao=tema2sld&tema=" | |
336 | - + i3GEOF.legenda.tema | |
337 | - + "&g_sid=" | |
338 | - + i3GEO.configura.sid); | |
339 | - } | |
340 | - } | |
341 | - }); | |
342 | - b.addClass("rodar"); | |
343 | - b = new YAHOO.widget.Button("i3GEOlegendabotaoSLDi", { | |
344 | - onclick : { | |
345 | - fn : function() { | |
346 | - i3GEO.tema.dialogo.aplicarsld(i3GEOF.legenda.tema); | |
347 | - } | |
348 | - } | |
349 | - }); | |
350 | - b.addClass("rodar"); | |
351 | 200 | |
352 | - b = | |
353 | - new YAHOO.widget.Button("i3GEOlegendabotaoIncluirLabel", { | |
354 | - onclick : { | |
355 | - fn : function() { | |
356 | - var par, p, temp, cp; | |
357 | - try { | |
358 | - par = i3GEOF.proplabel.pegaPar(); | |
359 | - i3GEOF.legenda.parDefault = par; | |
360 | - } catch (e) { | |
361 | - par = i3GEOF.legenda.parDefault; | |
362 | - } | |
363 | - i3GEOF.legenda.aguarde.visibility = "visible"; | |
364 | - temp = function() { | |
365 | - i3GEOF.legenda.aguarde.visibility = "hidden"; | |
366 | - i3GEOF.legenda.aposAlterarLegenda(); | |
367 | - i3GEOF.legenda.aguarde.visibility = "hidden"; | |
368 | - }; | |
369 | - p = | |
370 | - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" | |
371 | - + i3GEO.configura.sid | |
372 | - + "&funcao=adicionaLabelClasse&tema=" | |
373 | - + i3GEOF.legenda.tema | |
374 | - + "&classe=" | |
375 | - + i3GEOF.legenda.classe | |
376 | - + par; | |
377 | - p += "&item=" + $i("i3GEOlegendaSelItemLabel").value; | |
378 | - cp = new cpaint(); | |
379 | - cp.set_response_type("JSON"); | |
380 | - cp.call(p, "foo", temp); | |
381 | - } | |
382 | - } | |
383 | - }); | |
384 | - b.addClass("rodar100"); | |
385 | - b = | |
386 | - new YAHOO.widget.Button("i3GEOlegendabotaoExcluirLabel", { | |
387 | - onclick : { | |
388 | - fn : function() { | |
389 | - var p, temp, cp; | |
390 | - i3GEOF.legenda.aguarde.visibility = "visible"; | |
391 | - temp = function() { | |
392 | - i3GEOF.legenda.aguarde.visibility = "hidden"; | |
393 | - i3GEOF.legenda.aposAlterarLegenda(); | |
394 | - i3GEOF.legenda.aguarde.visibility = "hidden"; | |
395 | - }; | |
396 | - p = | |
397 | - i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" | |
398 | - + i3GEO.configura.sid | |
399 | - + "&funcao=removeLabelClasse&tema=" | |
400 | - + i3GEOF.legenda.tema | |
401 | - + "&classe=" | |
402 | - + i3GEOF.legenda.classe; | |
403 | - cp = new cpaint(); | |
404 | - cp.set_response_type("JSON"); | |
405 | - cp.call(p, "foo", temp); | |
406 | - } | |
407 | - } | |
408 | - }); | |
409 | - b.addClass("rodar100"); | |
410 | - b = | |
411 | - new YAHOO.widget.Button("i3GEOlegendabotaoPropriedadeLabel", { | |
412 | - onclick : { | |
413 | - fn : function() { | |
414 | - i3GEO.util.scriptTag( | |
415 | - i3GEO.configura.locaplic + "/ferramentas/opcoes_label/index.js", | |
416 | - "i3GEOF.proplabel.criaJanelaFlutuante(false)", | |
417 | - "i3GEOFproplabel", | |
418 | - false); | |
419 | - } | |
420 | - } | |
421 | - }); | |
422 | - b.addClass("abrir100"); | |
423 | 201 | i3GEOF.legenda.ativaFoco(); |
424 | 202 | i3GEOF.legenda.mostralegenda(); |
425 | 203 | i3GEOF.legenda.montaCombosItens(); |
... | ... | @@ -433,9 +211,7 @@ i3GEOF.legenda = |
433 | 211 | if(objTema.offsite){ |
434 | 212 | $i("i3GEOoffsite").value = objTema.offsite; |
435 | 213 | } |
436 | - $i("i3GEOFlegendamostra").onclick = function() { | |
437 | - i3GEO.tema.invertestatuslegenda(i3GEOF.legenda.tema); | |
438 | - }; | |
214 | + | |
439 | 215 | i3GEO.util.aplicaAquarela("i3GEOF.legenda_corpo"); |
440 | 216 | i3GEOF.legenda.aposIniciar.call(); |
441 | 217 | } catch (erro) { |
... | ... | @@ -444,6 +220,74 @@ i3GEOF.legenda = |
444 | 220 | } |
445 | 221 | i3GEO.guias.ajustaGuiaFerramenta("i3GEOF.legenda", "i3GEOlegenda"); |
446 | 222 | }, |
223 | + sldi: function() { | |
224 | + i3GEO.tema.dialogo.aplicarsld(i3GEOF.legenda.tema); | |
225 | + }, | |
226 | + slde: function() { | |
227 | + window.open(i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?funcao=tema2sld&tema=" | |
228 | + + i3GEOF.legenda.tema | |
229 | + + "&g_sid=" | |
230 | + + i3GEO.configura.sid); | |
231 | + }, | |
232 | + propriedadesLabels: function() { | |
233 | + i3GEO.util.scriptTag( | |
234 | + i3GEO.configura.locaplic + "/ferramentas/opcoes_label/index.js", | |
235 | + "i3GEOF.proplabel.criaJanelaFlutuante(false)", | |
236 | + "i3GEOFproplabel", | |
237 | + false); | |
238 | + }, | |
239 | + incluirLabels: function() { | |
240 | + var par, p, temp, cp; | |
241 | + try { | |
242 | + par = i3GEOF.proplabel.pegaPar(); | |
243 | + i3GEOF.legenda.parDefault = par; | |
244 | + } catch (e) { | |
245 | + par = i3GEOF.legenda.parDefault; | |
246 | + } | |
247 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
248 | + temp = function() { | |
249 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
250 | + i3GEOF.legenda.aposAlterarLegenda(); | |
251 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
252 | + }; | |
253 | + p = | |
254 | + i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" | |
255 | + + i3GEO.configura.sid | |
256 | + + "&funcao=adicionaLabelClasse&tema=" | |
257 | + + i3GEOF.legenda.tema | |
258 | + + "&classe=" | |
259 | + + i3GEOF.legenda.classe | |
260 | + + par; | |
261 | + p += "&item=" + $i("i3GEOlegendaSelItemLabel").value; | |
262 | + cp = new cpaint(); | |
263 | + cp.set_response_type("JSON"); | |
264 | + cp.call(p, "foo", temp); | |
265 | + }, | |
266 | + excluiLabels: function() { | |
267 | + var p, temp, cp; | |
268 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
269 | + temp = function() { | |
270 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
271 | + i3GEOF.legenda.aposAlterarLegenda(); | |
272 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
273 | + }; | |
274 | + p = | |
275 | + i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" | |
276 | + + i3GEO.configura.sid | |
277 | + + "&funcao=removeLabelClasse&tema=" | |
278 | + + i3GEOF.legenda.tema | |
279 | + + "&classe=" | |
280 | + + i3GEOF.legenda.classe; | |
281 | + cp = new cpaint(); | |
282 | + cp.set_response_type("JSON"); | |
283 | + cp.call(p, "foo", temp); | |
284 | + }, | |
285 | + janelaCorRamp: function(){ | |
286 | + var tabela = $i("i3GEOlegendalegenda"); | |
287 | + var trs = tabela.getElementsByTagName("tr"); | |
288 | + var ncores = trs.length - 1; | |
289 | + i3GEO.util.abreColourRamp("", "listaColourRamp", ncores, i3GEOF.legenda.tema); | |
290 | + }, | |
447 | 291 | /* |
448 | 292 | * Function: html |
449 | 293 | * |
... | ... | @@ -474,31 +318,34 @@ i3GEOF.legenda = |
474 | 318 | }; |
475 | 319 | minimiza = function() { |
476 | 320 | i3GEO.janela.minimiza("i3GEOF.legenda"); |
477 | - i3GEOF.legenda.ativaAplicar("none"); | |
478 | 321 | }; |
479 | 322 | // cria a janela flutuante |
480 | 323 | titulo = |
481 | 324 | "<div id='i3GEOF.legendaI' style='left:5px;'>" |
482 | - + "<div id='i3GEOFlegendaComboCabeca' class='comboTemasCabecalhoBs form-group' style='width:200px'> ------</div></div>" | |
483 | - + "</div><a class='i3GeoTituloJanelaBs' target=_blank href='" | |
484 | - + i3GEO.configura.locaplic | |
485 | - + "/ajuda_usuario.php?idcategoria=5&idajuda=41' > " | |
486 | - + $trad("t33") | |
487 | - +"</a>"; | |
325 | + + "<div id='i3GEOFlegendaComboCabeca' class='comboTemasCabecalhoBs form-group' style='width:200px'> ------</div></div>" | |
326 | + + "</div><a class='i3GeoTituloJanelaBs' target=_blank href='" | |
327 | + + i3GEO.configura.locaplic | |
328 | + + "/ajuda_usuario.php?idcategoria=5&idajuda=41' > " | |
329 | + + $trad("t33") | |
330 | + +"</a>"; | |
488 | 331 | janela = i3GEO.janela.cria( |
489 | - "590px", | |
490 | - "350px", | |
491 | - "", | |
492 | - "", | |
493 | - "", | |
494 | - titulo, | |
495 | - "i3GEOF.legenda", | |
496 | - false, | |
497 | - "hd", | |
498 | - cabecalho, | |
499 | - minimiza, | |
500 | - function() {i3GEO.guias.ajustaGuiaFerramenta("i3GEOF.legenda", "i3GEOlegenda");}, | |
501 | - true | |
332 | + "590px", | |
333 | + "350px", | |
334 | + "", | |
335 | + "", | |
336 | + "", | |
337 | + titulo, | |
338 | + "i3GEOF.legenda", | |
339 | + false, | |
340 | + "hd", | |
341 | + cabecalho, | |
342 | + minimiza, | |
343 | + function() {i3GEO.guias.ajustaGuiaFerramenta("i3GEOF.legenda", "i3GEOlegenda");}, | |
344 | + true, | |
345 | + "", | |
346 | + "", | |
347 | + "", | |
348 | + "" | |
502 | 349 | ); |
503 | 350 | |
504 | 351 | divid = janela[2].id; |
... | ... | @@ -514,25 +361,6 @@ i3GEOF.legenda = |
514 | 361 | ativaFoco : function() { |
515 | 362 | |
516 | 363 | }, |
517 | - ativaAplicar : function(tipo) { | |
518 | - var b = $i("i3GEOlegendabotao10"); | |
519 | - if (b) { | |
520 | - b.style.display = tipo; | |
521 | - } else { | |
522 | - YAHOO.i3GEO.janela.manager.find("i3GEOF.legenda").setFooter( | |
523 | - '<input id="i3GEOlegendabotao10" type="button" value="' + $trad('aplicaAlteracoes', i3GEOF.legenda.dicionario) | |
524 | - + '" style="width: 450px;cursor:pointer;color:blue;display: block;"/>'); | |
525 | - b = new YAHOO.widget.Button("i3GEOlegendabotao10", { | |
526 | - onclick : { | |
527 | - fn : i3GEOF.legenda.aplicaEstilo | |
528 | - } | |
529 | - }); | |
530 | - b.addClass("rodar"); | |
531 | - $i("i3GEOlegendabotao10-button").style.width = "100%"; | |
532 | - $i("i3GEOlegendabotao10").style.width = "100%"; | |
533 | - $i("i3GEOlegendabotao10").style.display = tipo; | |
534 | - } | |
535 | - }, | |
536 | 364 | /* |
537 | 365 | * Function: aposAlterarLegenda |
538 | 366 | * |
... | ... | @@ -542,8 +370,6 @@ i3GEOF.legenda = |
542 | 370 | i3GEO.arvoreDeCamadas.CAMADAS = []; |
543 | 371 | i3GEO.atualiza(); |
544 | 372 | i3GEO.Interface.atualizaTema("", i3GEOF.legenda.tema); |
545 | - i3GEO.arvoreDeCamadas.atualizaLegenda(i3GEOF.legenda.tema); | |
546 | - i3GEO.mapa.legendaHTML.atualiza(); | |
547 | 373 | }, |
548 | 374 | /* |
549 | 375 | * Function: mostralegenda |
... | ... | @@ -562,9 +388,9 @@ i3GEOF.legenda = |
562 | 388 | var p, cp; |
563 | 389 | p = |
564 | 390 | i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" |
565 | - + i3GEO.configura.sid | |
566 | - + "&funcao=editalegenda&opcao=edita&tema=" | |
567 | - + i3GEOF.legenda.tema; | |
391 | + + i3GEO.configura.sid | |
392 | + + "&funcao=editalegenda&opcao=edita&tema=" | |
393 | + + i3GEOF.legenda.tema; | |
568 | 394 | cp = new cpaint(); |
569 | 395 | cp.set_response_type("JSON"); |
570 | 396 | cp.call(p, "tabelaLegenda", i3GEOF.legenda.montaLegenda); |
... | ... | @@ -582,173 +408,78 @@ i3GEOF.legenda = |
582 | 408 | i3GEOF.legenda.aviso = false; |
583 | 409 | try { |
584 | 410 | if (retorno.data != undefined) { |
585 | - var b, ins, i, ajuda, id, re, exp, n, filtro; | |
411 | + //hidden e utilizado para esconder ou mostrar determinados trechos do template | |
412 | + var mustache = [], b, ins, i, ajuda, id, re, exp, n, filtro,temp = {}; | |
586 | 413 | // se nao for do tipo raster |
587 | 414 | if (retorno.data[0].proc === "") { |
588 | - ins = | |
589 | - [ | |
590 | - "<table class=lista4 id=i3GEOlegendalegenda ><tr>" + "<td><img src='" | |
591 | - + i3GEO.configura.locaplic | |
592 | - + "/imagens/inverter.png' title='Inverter cores' onclick='i3GEOF.legenda.inverteCores()' style=cursor:pointer /></td>" | |
593 | - + "<td style=background-color:white ><img src='" | |
594 | - + i3GEO.configura.locaplic | |
595 | - + "/imagens/tamanho.png' title='Calcula tamanho' onclick='i3GEOF.legenda.calculaTamanho()' style=cursor:pointer /></td>" | |
596 | - + "<td></td>" | |
597 | - + "<td style=background-color:yellow >" | |
598 | - + "<img src='" | |
599 | - + i3GEO.configura.locaplic | |
600 | - + "/imagens/oxygen/16x16/draw-triangle.png' title='Ordenar' onclick='i3GEOF.legenda.ordenaClasses()' style=cursor:pointer />" | |
601 | - + "<span style='vertical-align:super;margin-left:3px;'>nome</span></td>" | |
602 | - + "<td style=background-color:yellow >expressão</td>" | |
603 | - + "<td style=background-color:yellow ></td>" | |
604 | - + "<td style=background-color:yellow >minScale</td>" | |
605 | - + "<td style=background-color:yellow >maxScale</td>" | |
606 | - + "</tr>" | |
607 | - ]; | |
608 | 415 | n = retorno.data.length; |
609 | 416 | for (i = 0; i < n; i++) { |
610 | - id = retorno.data[i].tema + "-" + retorno.data[i].idclasse; // layer+indice da classe | |
417 | + temp = {}; | |
418 | + id = retorno.data[i].tema + "-" + retorno.data[i].idclasse; | |
611 | 419 | re = new RegExp("'", "g"); |
612 | 420 | exp = (retorno.data[i].expressao).replace(re, '"'); |
613 | - | |
614 | - ins.push("<tr>"); | |
615 | - ins.push("<td><div style='cursor:pointer;height:14px;' title='" + $trad('cliqueExclui', i3GEOF.legenda.dicionario) | |
616 | - + "' onclick='i3GEOF.legenda.excluilinhaf(this)' src='" | |
617 | - + i3GEO.configura.locaplic | |
618 | - + "/imagens/x.gif' title='excluir' class='i3GEOiconeXis' > </div></td>"); | |
619 | - | |
620 | - ins.push("<td><img width='30px' height='15px' style='cursor:pointer' title='" + $trad( | |
621 | - 'cliqueAltera', | |
622 | - i3GEOF.legenda.dicionario) | |
623 | - + "' src='" | |
624 | - + retorno.data[i].imagem | |
625 | - + "' onclick=i3GEOF.legenda.editaSimbolo('i3GEOlegendaid_" | |
626 | - + id | |
627 | - + "') /></td>"); | |
628 | - | |
629 | - ins.push("<td><img onclick=i3GEOF.legenda.modificaCor('" + retorno.data[i].idclasse | |
630 | - + "') title='alterar a cor' style='cursor:pointer' src='" | |
631 | - + i3GEO.configura.locaplic | |
632 | - + "/imagens/aquarela.gif' /></td>"); | |
633 | - | |
634 | - ins.push("<td>" + $inputText( | |
635 | - "", | |
636 | - "", | |
637 | - "i3GEOlegendaid_" + id, | |
638 | - $trad('digitaNovoNome', i3GEOF.legenda.dicionario), | |
639 | - 20, | |
640 | - retorno.data[i].nomeclasse, | |
641 | - "nome", | |
642 | - "javascript:i3GEOF.legenda.aviso()") | |
643 | - + "</td>"); | |
644 | - | |
645 | - filtro = | |
646 | - "<img title='" + $trad("editorExp", i3GEOF.legenda.dicionario) | |
647 | - + "' src='" | |
648 | - + i3GEO.configura.locaplic | |
649 | - + "/imagens/oxygen/16x16/tools-wizard.png' " | |
650 | - + "onclick='i3GEOF.legenda.filtro(\"" | |
651 | - + "i3GEOlegendaid_exp" | |
652 | - + id | |
653 | - + "\")'>"; | |
654 | - | |
655 | - ins.push("<td>" + $inputText("", "", "i3GEOlegendaid_exp" + id, $trad( | |
656 | - 'digitaNovaExpressao', | |
657 | - i3GEOF.legenda.dicionario), 25, exp, "expressao", "javascript:i3GEOF.legenda.aviso()") | |
658 | - + "</td>"); | |
659 | - | |
660 | - ins.push("<td>" + filtro + "</td>"); | |
661 | - | |
662 | - ins.push("<td>" + $inputText( | |
663 | - "", | |
664 | - "", | |
665 | - "i3GEOlegendaid_" + id, | |
666 | - $trad('minScale', i3GEOF.legenda.dicionario), | |
667 | - 10, | |
668 | - retorno.data[i].minScale, | |
669 | - "minScale", | |
670 | - "javascript:i3GEOF.legenda.aviso()") | |
671 | - + "</td>"); | |
672 | - | |
673 | - ins.push("<td>" + $inputText( | |
674 | - "", | |
675 | - "", | |
676 | - "i3GEOlegendaid_" + id, | |
677 | - $trad('maxScale', i3GEOF.legenda.dicionario), | |
678 | - 10, | |
679 | - retorno.data[i].maxScale, | |
680 | - "maxScale", | |
681 | - "javascript:i3GEOF.legenda.aviso()") | |
682 | - + "</td>"); | |
683 | - | |
684 | - if (n > 1) { | |
685 | - ins.push("<td><img src='" + i3GEO.configura.locaplic | |
686 | - + "/imagens/sobe1.png' style=cursor:pointer title='" | |
687 | - + $trad('sobe', i3GEOF.legenda.dicionario) | |
688 | - + "' onclick=i3GEOF.legenda.sobelinhaf('" | |
689 | - + retorno.data[i].idclasse | |
690 | - + "') /></td>"); | |
691 | - | |
692 | - ins.push("<td><img src='" + i3GEO.configura.locaplic | |
693 | - + "/imagens/desce1.png' style=cursor:pointer title='" | |
694 | - + $trad('desce', i3GEOF.legenda.dicionario) | |
695 | - + "' onclick=i3GEOF.legenda.descelinhaf('" | |
696 | - + retorno.data[i].idclasse | |
697 | - + "') /></td>"); | |
698 | - } | |
699 | - ins.push("</tr>"); | |
421 | + temp.cliqueExclui = $trad('cliqueExclui', i3GEOF.legenda.dicionario); | |
422 | + temp.cliqueAltera = $trad('cliqueAltera', i3GEOF.legenda.dicionario); | |
423 | + temp.imagem = retorno.data[i].imagem; | |
424 | + temp.id = id; | |
425 | + temp.idclasse = retorno.data[i].idclasse; | |
426 | + temp.novoNome = $trad('digitaNovoNome', i3GEOF.legenda.dicionario); | |
427 | + temp.nome = retorno.data[i].nomeclasse; | |
428 | + temp.editorExp = $trad("editorExp", i3GEOF.legenda.dicionario); | |
429 | + temp.exp = exp; | |
430 | + temp.txtMinscale = $trad('minScale', i3GEOF.legenda.dicionario); | |
431 | + temp.minScale = retorno.data[i].minScale; | |
432 | + temp.txtMaxScale = $trad('maxScale', i3GEOF.legenda.dicionario); | |
433 | + temp.maxScale = retorno.data[i].maxScale; | |
434 | + temp.sobe = $trad('sobe', i3GEOF.legenda.dicionario); | |
435 | + temp.desce = $trad('desce', i3GEOF.legenda.dicionario); | |
436 | + mustache.push(temp); | |
700 | 437 | } |
701 | - ins.push("</table><br>"); | |
702 | - $i("i3GEOlegendaresultado").innerHTML = ins.join(""); | |
438 | + ins = Mustache.render( | |
439 | + i3GEOF.legenda.MUSTACHELISTA, | |
440 | + $.extend( | |
441 | + {}, | |
442 | + { | |
443 | + "linhas" : mustache, | |
444 | + "hidden2":"", | |
445 | + "hidden1": "hidden" | |
446 | + }, | |
447 | + i3GEOF.legenda.DICIONARIO | |
448 | + ) | |
449 | + ); | |
450 | + $i("i3GEOlegendaguia1obj").innerHTML = ins; | |
703 | 451 | } else { |
704 | - ajuda = | |
705 | - "<br><p class=paragrafo >" + $trad('ajudaEscalaCores', i3GEOF.legenda.dicionario) | |
706 | - + "<p class=paragrafo >" | |
707 | - + $trad('msgEscalaCoresAuto', i3GEOF.legenda.dicionario) | |
708 | - + "<p class=paragrafo >" | |
709 | - + $trad('msgEscalaCoresIndividual', i3GEOF.legenda.dicionario) | |
710 | - + "<p class=paragrafo >" | |
711 | - + $trad('msgBandas', i3GEOF.legenda.dicionario) | |
712 | - + "<p class=paragrafo >" | |
713 | - + $trad('msgReamostragem', i3GEOF.legenda.dicionario); | |
714 | - ins = | |
715 | - "<p class=paragrafo >" + $trad('adicionaProcesso', i3GEOF.legenda.dicionario) | |
716 | - + ":" | |
717 | - + "<select onchange=i3GEOF.legenda.adicionaProcesso(this) >" | |
718 | - + "<option value='' >" | |
719 | - + $trad('selecionaProcesso', i3GEOF.legenda.dicionario) | |
720 | - + "</option>" | |
721 | - + "<option value='SCALE=' >" | |
722 | - + $trad('escalaCores', i3GEOF.legenda.dicionario) | |
723 | - + "</option>" | |
724 | - + "<option value='RESAMPLE=' >" | |
725 | - + $trad('reamostragem', i3GEOF.legenda.dicionario) | |
726 | - + "</option>" | |
727 | - + "<option value='BANDS=' >" | |
728 | - + $trad('bandas', i3GEOF.legenda.dicionario) | |
729 | - + "</option>" | |
730 | - + "<option value='COLOR_MATCH_THRESHOLD=' >Threshold</option>" | |
731 | - + "<option value='NODATA=' >Nodata</option>" | |
732 | - + "</select><br>" | |
733 | - + '<p class=paragrafo ><input id=i3GEOlegendabotao16 class="executar" size="22" type="buttom" value="' | |
734 | - + $trad('aplicaProcesso', i3GEOF.legenda.dicionario) | |
735 | - + '">'; | |
736 | - if (retorno.data[0].proc == "") { | |
737 | - ins += "<div style=width:80% id=i3GEOlegendaprocessos ></div>"; | |
738 | - } else { | |
739 | - ins += "<div style='width:80%;text-align:left;' id=i3GEOlegendaprocessos >"; | |
740 | - for (i = 0; i < retorno.data[0].proc.length; i++) { | |
741 | - ins += "<br>" + $inputText("", "", "", "", 50, retorno.data[0].proc[i]); | |
742 | - } | |
743 | - ins += "</div>"; | |
452 | + ajuda = i3GEOF.legenda.DICIONARIO['ajudaEscalaCores'] | |
453 | + + "<p>" | |
454 | + + i3GEOF.legenda.DICIONARIO['msgEscalaCoresAuto'] | |
455 | + + "<p>" | |
456 | + + i3GEOF.legenda.DICIONARIO['msgEscalaCoresIndividual'] | |
457 | + + "<p>" | |
458 | + + i3GEOF.legenda.DICIONARIO['msgBandas'] | |
459 | + + "<p>" | |
460 | + + i3GEOF.legenda.DICIONARIO['msgReamostragem']; | |
461 | + | |
462 | + mustache = []; | |
463 | + for (i = 0; i < retorno.data[0].proc.length; i++) { | |
464 | + mustache.push({ | |
465 | + "value": retorno.data[0].proc[i] | |
466 | + }); | |
744 | 467 | } |
745 | - $i("i3GEOlegendaresultado").innerHTML = ins + ajuda; | |
746 | - b = new YAHOO.widget.Button("i3GEOlegendabotao16", { | |
747 | - onclick : { | |
748 | - fn : i3GEOF.legenda.aplicaProcessos | |
749 | - } | |
750 | - }); | |
751 | - b.addClass("rodar"); | |
468 | + | |
469 | + ins = Mustache.render( | |
470 | + i3GEOF.legenda.MUSTACHELISTA, | |
471 | + $.extend( | |
472 | + {}, | |
473 | + { | |
474 | + "hidden2":"hidden", | |
475 | + "hidden1": "", | |
476 | + "ajuda1": ajuda, | |
477 | + "processos": mustache | |
478 | + }, | |
479 | + i3GEOF.legenda.DICIONARIO | |
480 | + ) | |
481 | + ); | |
482 | + $i("i3GEOlegendaguia1obj").innerHTML = ins; | |
752 | 483 | } |
753 | 484 | } else { |
754 | 485 | $i("i3GEOlegendaresultado").innerHTML = "<p style=color:red >Erro<br>"; |
... | ... | @@ -793,11 +524,11 @@ i3GEOF.legenda = |
793 | 524 | i3GEOF.legenda.aposAlterarLegenda(); |
794 | 525 | }, p = |
795 | 526 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
796 | - + i3GEO.configura.sid | |
797 | - + "&funcao=alteraclasse&opcao=aplicacoresrgb&ext=" | |
798 | - + ext | |
799 | - + "&tema=" | |
800 | - + i3GEOF.legenda.tema, cp = new cpaint(); | |
527 | + + i3GEO.configura.sid | |
528 | + + "&funcao=alteraclasse&opcao=aplicacoresrgb&ext=" | |
529 | + + ext | |
530 | + + "&tema=" | |
531 | + + i3GEOF.legenda.tema, cp = new cpaint(); | |
801 | 532 | cp.set_transfer_mode('POST'); |
802 | 533 | cp.set_response_type("JSON"); |
803 | 534 | cp.call(p, "foo", temp, "cores=" + cores); |
... | ... | @@ -860,12 +591,12 @@ i3GEOF.legenda = |
860 | 591 | }; |
861 | 592 | var p = |
862 | 593 | i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" |
863 | - + i3GEO.configura.sid | |
864 | - + "&funcao=aplicaLegendaImg" | |
865 | - + "&tema=" | |
866 | - + i3GEOF.legenda.tema | |
867 | - + "&imagem=" | |
868 | - + objTema.legendaimg, | |
594 | + + i3GEO.configura.sid | |
595 | + + "&funcao=aplicaLegendaImg" | |
596 | + + "&tema=" | |
597 | + + i3GEOF.legenda.tema | |
598 | + + "&imagem=" | |
599 | + + objTema.legendaimg, | |
869 | 600 | cp = new cpaint(); |
870 | 601 | cp.set_response_type("JSON"); |
871 | 602 | cp.call(p, "foo", retorna); |
... | ... | @@ -886,12 +617,12 @@ i3GEOF.legenda = |
886 | 617 | }; |
887 | 618 | var p = |
888 | 619 | i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" |
889 | - + i3GEO.configura.sid | |
890 | - + "&funcao=aplicaOffsite" | |
891 | - + "&tema=" | |
892 | - + i3GEOF.legenda.tema | |
893 | - + "&offsite=" | |
894 | - + objTema.offsite, | |
620 | + + i3GEO.configura.sid | |
621 | + + "&funcao=aplicaOffsite" | |
622 | + + "&tema=" | |
623 | + + i3GEOF.legenda.tema | |
624 | + + "&offsite=" | |
625 | + + objTema.offsite, | |
895 | 626 | cp = new cpaint(); |
896 | 627 | cp.set_response_type("JSON"); |
897 | 628 | cp.call(p, "foo", retorna); |
... | ... | @@ -914,15 +645,13 @@ i3GEOF.legenda = |
914 | 645 | try { |
915 | 646 | var tabela = $i("i3GEOlegendalegenda"), trs = tabela.getElementsByTagName("tr"), minScales = [], maxScales = [], nomes = [], exps = |
916 | 647 | [], ids = [], t, nn, n, p, cp, temp; |
917 | - // expn, | |
918 | - // re = new RegExp('"', "g"); | |
919 | - for (t = 0; t < trs.length; t++) { | |
648 | + for (t = 1; t < trs.length; t++) { | |
920 | 649 | if (trs[t].childNodes) { |
921 | 650 | nn = trs[t].childNodes; |
922 | 651 | for (n = 0; n < nn.length; n++) { |
923 | - if (nn[n].childNodes) { | |
652 | + if (nn && nn[n] && nn[n].childNodes && nn[n].getElementsByTagName) { | |
924 | 653 | var isn = nn[n].getElementsByTagName("input"); |
925 | - if (isn[0] != undefined) { | |
654 | + if (isn && isn[0] != undefined) { | |
926 | 655 | if (isn[0].name == "nome") { |
927 | 656 | nomes.push(isn[0].value); |
928 | 657 | temp = (isn[0].id).split("i3GEOlegendaid_"); |
... | ... | @@ -956,27 +685,27 @@ i3GEOF.legenda = |
956 | 685 | var ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten); |
957 | 686 | p = |
958 | 687 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?" |
959 | - + "base64=nao" | |
960 | - + "&g_sid=" | |
961 | - + i3GEO.configura.sid | |
962 | - + "&funcao=alteraclasse" | |
963 | - + "&opcao=alteraclasses" | |
964 | - + "&ext=" | |
965 | - + ext; | |
688 | + + "base64=nao" | |
689 | + + "&g_sid=" | |
690 | + + i3GEO.configura.sid | |
691 | + + "&funcao=alteraclasse" | |
692 | + + "&opcao=alteraclasses" | |
693 | + + "&ext=" | |
694 | + + ext; | |
966 | 695 | cp = new cpaint(); |
967 | 696 | cp.set_transfer_mode('POST'); |
968 | 697 | cp.set_response_type("JSON"); |
969 | 698 | cp.call(p, "alteraclassesPost", temp, "ids=" + ids |
970 | - + "&nomes=" | |
971 | - //+ i3GEO.util.base64encode(nomes) | |
972 | - + nomes | |
973 | - + "&exps=" | |
974 | - //+ i3GEO.util.base64encode(exps) | |
975 | - + exps | |
976 | - + "&minScales=" | |
977 | - + minScales | |
978 | - + "&maxScales=" | |
979 | - + maxScales); | |
699 | + + "&nomes=" | |
700 | + //+ i3GEO.util.base64encode(nomes) | |
701 | + + nomes | |
702 | + + "&exps=" | |
703 | + //+ i3GEO.util.base64encode(exps) | |
704 | + + exps | |
705 | + + "&minScales=" | |
706 | + + minScales | |
707 | + + "&maxScales=" | |
708 | + + maxScales); | |
980 | 709 | } catch (e) { |
981 | 710 | i3GEO.janela.tempoMsg("Erro: " + e); |
982 | 711 | i3GEOF.legenda.aguarde.visibility = "hidden"; |
... | ... | @@ -1003,11 +732,11 @@ i3GEOF.legenda = |
1003 | 732 | }; |
1004 | 733 | var p = |
1005 | 734 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
1006 | - + i3GEO.configura.sid | |
1007 | - + "&funcao=alteraclasse&opcao=alterageometria&tema=" | |
1008 | - + i3GEOF.legenda.tema | |
1009 | - + "&tipo=" | |
1010 | - + $i("i3GEOlegentaTipoGeo").value, cp = new cpaint(); | |
735 | + + i3GEO.configura.sid | |
736 | + + "&funcao=alteraclasse&opcao=alterageometria&tema=" | |
737 | + + i3GEOF.legenda.tema | |
738 | + + "&tipo=" | |
739 | + + $i("i3GEOlegentaTipoGeo").value, cp = new cpaint(); | |
1011 | 740 | cp.set_response_type("JSON"); |
1012 | 741 | cp.call(p, "", retorna); |
1013 | 742 | }, |
... | ... | @@ -1027,10 +756,10 @@ i3GEOF.legenda = |
1027 | 756 | i3GEOF.legenda.aguarde.visibility = "visible"; |
1028 | 757 | var p = |
1029 | 758 | i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" |
1030 | - + i3GEO.configura.sid | |
1031 | - + "&funcao=contagemclasse" | |
1032 | - + "&tema=" | |
1033 | - + i3GEOF.legenda.tema, cp = new cpaint(); | |
759 | + + i3GEO.configura.sid | |
760 | + + "&funcao=contagemclasse" | |
761 | + + "&tema=" | |
762 | + + i3GEOF.legenda.tema, cp = new cpaint(); | |
1034 | 763 | cp.set_response_type("JSON"); |
1035 | 764 | cp.call(p, "contagemclasse", i3GEOF.legenda.montaLegenda); |
1036 | 765 | i3GEO.janela.tempoMsg($trad('consideraElementosVisiveis', i3GEOF.legenda.dicionario)); |
... | ... | @@ -1051,12 +780,12 @@ i3GEOF.legenda = |
1051 | 780 | var ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten); |
1052 | 781 | var p = |
1053 | 782 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
1054 | - + i3GEO.configura.sid | |
1055 | - + "&funcao=alteraclasse&opcao=adicionaclasse" | |
1056 | - + "&tema=" | |
1057 | - + i3GEOF.legenda.tema | |
1058 | - + "&ext=" | |
1059 | - + ext, cp = new cpaint(); | |
783 | + + i3GEO.configura.sid | |
784 | + + "&funcao=alteraclasse&opcao=adicionaclasse" | |
785 | + + "&tema=" | |
786 | + + i3GEOF.legenda.tema | |
787 | + + "&ext=" | |
788 | + + ext, cp = new cpaint(); | |
1060 | 789 | cp.set_response_type("JSON"); |
1061 | 790 | cp.call(p, "alteraclasse", i3GEOF.legenda.mostralegenda); |
1062 | 791 | }, |
... | ... | @@ -1081,12 +810,12 @@ i3GEOF.legenda = |
1081 | 810 | var ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten); |
1082 | 811 | var p = |
1083 | 812 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
1084 | - + i3GEO.configura.sid | |
1085 | - + "&funcao=alteraclasse&opcao=adicionaopacidade" | |
1086 | - + "&tema=" | |
1087 | - + i3GEOF.legenda.tema | |
1088 | - + "&ext=" | |
1089 | - + ext, cp = new cpaint(); | |
813 | + + i3GEO.configura.sid | |
814 | + + "&funcao=alteraclasse&opcao=adicionaopacidade" | |
815 | + + "&tema=" | |
816 | + + i3GEOF.legenda.tema | |
817 | + + "&ext=" | |
818 | + + ext, cp = new cpaint(); | |
1090 | 819 | cp.set_response_type("JSON"); |
1091 | 820 | cp.call(p, "alteraclasse", retorna); |
1092 | 821 | }, |
... | ... | @@ -1111,13 +840,13 @@ i3GEOF.legenda = |
1111 | 840 | i3GEOF.legenda.mostralegenda(); |
1112 | 841 | }, ci = $i("i3GEOlegendaacori").value, cf = $i("i3GEOlegendaacorf").value, cp = new cpaint(), p = |
1113 | 842 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
1114 | - + i3GEO.configura.sid | |
1115 | - + "&funcao=alteraCoresClasses&tema=" | |
1116 | - + i3GEOF.legenda.tema | |
1117 | - + "&cori=" | |
1118 | - + ci | |
1119 | - + "&corf=" | |
1120 | - + cf; | |
843 | + + i3GEO.configura.sid | |
844 | + + "&funcao=alteraCoresClasses&tema=" | |
845 | + + i3GEOF.legenda.tema | |
846 | + + "&cori=" | |
847 | + + ci | |
848 | + + "&corf=" | |
849 | + + cf; | |
1121 | 850 | cp.set_response_type("JSON"); |
1122 | 851 | cp.call(p, "alteraCoresClasses", retornapaleta); |
1123 | 852 | } catch (e) { |
... | ... | @@ -1146,9 +875,9 @@ i3GEOF.legenda = |
1146 | 875 | i3GEOF.legenda.mostralegenda(); |
1147 | 876 | }, cp = new cpaint(), p = |
1148 | 877 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
1149 | - + i3GEO.configura.sid | |
1150 | - + "&funcao=inverteCoresClasses&tema=" | |
1151 | - + i3GEOF.legenda.tema; | |
878 | + + i3GEO.configura.sid | |
879 | + + "&funcao=inverteCoresClasses&tema=" | |
880 | + + i3GEOF.legenda.tema; | |
1152 | 881 | cp.set_response_type("JSON"); |
1153 | 882 | cp.call(p, "alteraCoresClasses", retornapaleta); |
1154 | 883 | } catch (e) { |
... | ... | @@ -1177,9 +906,9 @@ i3GEOF.legenda = |
1177 | 906 | i3GEOF.legenda.mostralegenda(); |
1178 | 907 | }, cp = new cpaint(), p = |
1179 | 908 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
1180 | - + i3GEO.configura.sid | |
1181 | - + "&funcao=calculaTamanhoClasses&tema=" | |
1182 | - + i3GEOF.legenda.tema; | |
909 | + + i3GEO.configura.sid | |
910 | + + "&funcao=calculaTamanhoClasses&tema=" | |
911 | + + i3GEOF.legenda.tema; | |
1183 | 912 | cp.set_response_type("JSON"); |
1184 | 913 | cp.call(p, "calculaTamanhoClasses", retornapaleta); |
1185 | 914 | } catch (e) { |
... | ... | @@ -1205,9 +934,9 @@ i3GEOF.legenda = |
1205 | 934 | i3GEOF.legenda.mostralegenda(); |
1206 | 935 | }, cp = new cpaint(), p = |
1207 | 936 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
1208 | - + i3GEO.configura.sid | |
1209 | - + "&funcao=ordenaClasses&tema=" | |
1210 | - + i3GEOF.legenda.tema; | |
937 | + + i3GEO.configura.sid | |
938 | + + "&funcao=ordenaClasses&tema=" | |
939 | + + i3GEOF.legenda.tema; | |
1211 | 940 | cp.set_response_type("JSON"); |
1212 | 941 | cp.call(p, "foo", retornapaleta); |
1213 | 942 | } catch (e) { |
... | ... | @@ -1220,8 +949,8 @@ i3GEOF.legenda = |
1220 | 949 | * |
1221 | 950 | * Exclui uma linha da tabela de edição de classes da legendda |
1222 | 951 | */ |
1223 | - excluilinhaf : function(celula) { | |
1224 | - var p = celula.parentNode.parentNode; | |
952 | + excluilinhaf : function(id) { | |
953 | + var p = $i(id); | |
1225 | 954 | do { |
1226 | 955 | p.removeChild(p.childNodes[0]); |
1227 | 956 | } while (p.childNodes.length > 0); |
... | ... | @@ -1240,11 +969,11 @@ i3GEOF.legenda = |
1240 | 969 | i3GEOF.legenda.aguarde.visibility = "visible"; |
1241 | 970 | var p = |
1242 | 971 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
1243 | - + i3GEO.configura.sid | |
1244 | - + "&funcao=ALTERACLASSE&opcao=sobeclasse&tema=" | |
1245 | - + i3GEOF.legenda.tema | |
1246 | - + "&idclasse=" | |
1247 | - + idclasse, cp = new cpaint(), temp = function() { | |
972 | + + i3GEO.configura.sid | |
973 | + + "&funcao=ALTERACLASSE&opcao=sobeclasse&tema=" | |
974 | + + i3GEOF.legenda.tema | |
975 | + + "&idclasse=" | |
976 | + + idclasse, cp = new cpaint(), temp = function() { | |
1248 | 977 | i3GEOF.legenda.aguarde.visibility = "hidden"; |
1249 | 978 | i3GEOF.legenda.mostralegenda(); |
1250 | 979 | }; |
... | ... | @@ -1263,11 +992,11 @@ i3GEOF.legenda = |
1263 | 992 | i3GEOF.legenda.aguarde.visibility = "visible"; |
1264 | 993 | var p = |
1265 | 994 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
1266 | - + i3GEO.configura.sid | |
1267 | - + "&funcao=ALTERACLASSE&opcao=desceclasse&tema=" | |
1268 | - + i3GEOF.legenda.tema | |
1269 | - + "&idclasse=" | |
1270 | - + idclasse, cp = new cpaint(), temp = function() { | |
995 | + + i3GEO.configura.sid | |
996 | + + "&funcao=ALTERACLASSE&opcao=desceclasse&tema=" | |
997 | + + i3GEOF.legenda.tema | |
998 | + + "&idclasse=" | |
999 | + + idclasse, cp = new cpaint(), temp = function() { | |
1271 | 1000 | i3GEOF.legenda.aguarde.visibility = "hidden"; |
1272 | 1001 | i3GEOF.legenda.mostralegenda(); |
1273 | 1002 | }; |
... | ... | @@ -1288,7 +1017,6 @@ i3GEOF.legenda = |
1288 | 1017 | try { |
1289 | 1018 | $i("i3GEOlegendaguia1obj").style.display = "none"; |
1290 | 1019 | $i("i3GEOlegendaguia3obj").style.display = "block"; |
1291 | - i3GEOF.legenda.ativaAplicar("block"); | |
1292 | 1020 | id = id.split("-"); |
1293 | 1021 | i3GEOF.legenda.classe = id[1]; |
1294 | 1022 | i3GEOF.legenda.estilo = 0; |
... | ... | @@ -1302,11 +1030,11 @@ i3GEOF.legenda = |
1302 | 1030 | formEditorSimbolo : function() { |
1303 | 1031 | var p = |
1304 | 1032 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
1305 | - + i3GEO.configura.sid | |
1306 | - + "&funcao=editasimbolo&opcao=pegaparametros&tema=" | |
1307 | - + i3GEOF.legenda.tema | |
1308 | - + "&classe=" | |
1309 | - + i3GEOF.legenda.classe, cp = new cpaint(); | |
1033 | + + i3GEO.configura.sid | |
1034 | + + "&funcao=editasimbolo&opcao=pegaparametros&tema=" | |
1035 | + + i3GEOF.legenda.tema | |
1036 | + + "&classe=" | |
1037 | + + i3GEOF.legenda.classe, cp = new cpaint(); | |
1310 | 1038 | cp.set_response_type("JSON"); |
1311 | 1039 | cp.call(p, "pegaParametrosMapa", i3GEOF.legenda.montaEditor); |
1312 | 1040 | }, |
... | ... | @@ -1328,11 +1056,11 @@ i3GEOF.legenda = |
1328 | 1056 | var ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten); |
1329 | 1057 | var p = |
1330 | 1058 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
1331 | - + i3GEO.configura.sid | |
1332 | - + "&funcao=alteraclasse&tema=" | |
1333 | - + i3GEOF.legenda.tema | |
1334 | - + "&opcao=simbolounico&ext=" | |
1335 | - + ext, cp = new cpaint(), fim = function() { | |
1059 | + + i3GEO.configura.sid | |
1060 | + + "&funcao=alteraclasse&tema=" | |
1061 | + + i3GEOF.legenda.tema | |
1062 | + + "&opcao=simbolounico&ext=" | |
1063 | + + ext, cp = new cpaint(), fim = function() { | |
1336 | 1064 | i3GEOF.legenda.aposAlterarLegenda(); |
1337 | 1065 | i3GEOF.legenda.aguarde.visibility = "hidden"; |
1338 | 1066 | }; |
... | ... | @@ -1359,7 +1087,7 @@ i3GEOF.legenda = |
1359 | 1087 | } |
1360 | 1088 | var item = $i("i3GEOlegendaitensValorUnico").getElementsByTagName("select")[0].value, itemNome = |
1361 | 1089 | $i("i3GEOlegendaClassesValorUnico").getElementsByTagName("select")[0].value, p = |
1362 | - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1090 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1363 | 1091 | + i3GEO.configura.sid |
1364 | 1092 | + "&funcao=alteraclasse&tema=" |
1365 | 1093 | + i3GEOF.legenda.tema |
... | ... | @@ -1407,7 +1135,7 @@ i3GEOF.legenda = |
1407 | 1135 | } |
1408 | 1136 | var item = $i("i3GEOlegendaitensValorClass").getElementsByTagName("select")[0].value, nclasses = |
1409 | 1137 | $i("i3GEOlegendanclasses").value, ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), p = |
1410 | - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1138 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1411 | 1139 | + i3GEO.configura.sid |
1412 | 1140 | + "&funcao=alteraclasse&nclasses=" |
1413 | 1141 | + nclasses |
... | ... | @@ -1454,23 +1182,23 @@ i3GEOF.legenda = |
1454 | 1182 | return; |
1455 | 1183 | } |
1456 | 1184 | var item = $i("i3GEOlegendaitensMetade").getElementsByTagName("select")[0].value, |
1457 | - itemid = $i("i3GEOlegendaitensMetadeId").getElementsByTagName("select")[0].value, | |
1458 | - p = i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1459 | - + i3GEO.configura.sid | |
1460 | - + "&funcao=alteraclasse" | |
1461 | - + "&tema=" | |
1462 | - + i3GEOF.legenda.tema | |
1463 | - + "&item=" | |
1464 | - + item | |
1465 | - + "&itemid=" | |
1466 | - + itemid | |
1467 | - + "&opcao=metade&ignorar=" | |
1468 | - + $i("i3GEOlegendaignorar").value, | |
1469 | - cp = new cpaint(), | |
1470 | - fim = function() { | |
1471 | - i3GEOF.legenda.aposAlterarLegenda(); | |
1472 | - i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1473 | - }; | |
1185 | + itemid = $i("i3GEOlegendaitensMetadeId").getElementsByTagName("select")[0].value, | |
1186 | + p = i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1187 | + + i3GEO.configura.sid | |
1188 | + + "&funcao=alteraclasse" | |
1189 | + + "&tema=" | |
1190 | + + i3GEOF.legenda.tema | |
1191 | + + "&item=" | |
1192 | + + item | |
1193 | + + "&itemid=" | |
1194 | + + itemid | |
1195 | + + "&opcao=metade&ignorar=" | |
1196 | + + $i("i3GEOlegendaignorar").value, | |
1197 | + cp = new cpaint(), | |
1198 | + fim = function() { | |
1199 | + i3GEOF.legenda.aposAlterarLegenda(); | |
1200 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1201 | + }; | |
1474 | 1202 | if (item == "") { |
1475 | 1203 | i3GEO.janela.tempoMsg("Selecione um item!"); |
1476 | 1204 | return; |
... | ... | @@ -1507,20 +1235,20 @@ i3GEOF.legenda = |
1507 | 1235 | return; |
1508 | 1236 | } |
1509 | 1237 | var item = $i("i3GEOlegendaitensMedia").getElementsByTagName("select")[0].value, |
1510 | - p = i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1511 | - + i3GEO.configura.sid | |
1512 | - + "&funcao=alteraclasse" | |
1513 | - + "&tema=" | |
1514 | - + i3GEOF.legenda.tema | |
1515 | - + "&item=" | |
1516 | - + item | |
1517 | - + "&opcao=media&ignorar=" | |
1518 | - + $i("i3GEOlegendaignorar").value, | |
1519 | - cp = new cpaint(), | |
1520 | - fim = function() { | |
1521 | - i3GEOF.legenda.aposAlterarLegenda(); | |
1522 | - i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1523 | - }; | |
1238 | + p = i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1239 | + + i3GEO.configura.sid | |
1240 | + + "&funcao=alteraclasse" | |
1241 | + + "&tema=" | |
1242 | + + i3GEOF.legenda.tema | |
1243 | + + "&item=" | |
1244 | + + item | |
1245 | + + "&opcao=media&ignorar=" | |
1246 | + + $i("i3GEOlegendaignorar").value, | |
1247 | + cp = new cpaint(), | |
1248 | + fim = function() { | |
1249 | + i3GEOF.legenda.aposAlterarLegenda(); | |
1250 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1251 | + }; | |
1524 | 1252 | if (item == "") { |
1525 | 1253 | i3GEO.janela.tempoMsg("Selecione um item!"); |
1526 | 1254 | return; |
... | ... | @@ -1554,7 +1282,7 @@ i3GEOF.legenda = |
1554 | 1282 | } |
1555 | 1283 | var item = $i("i3GEOlegendaitensValorQuartil").getElementsByTagName("select")[0].value, ext = |
1556 | 1284 | i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), p = |
1557 | - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1285 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1558 | 1286 | + i3GEO.configura.sid |
1559 | 1287 | + "&funcao=alteraclasse&tema=" |
1560 | 1288 | + i3GEOF.legenda.tema |
... | ... | @@ -1597,7 +1325,7 @@ i3GEOF.legenda = |
1597 | 1325 | } |
1598 | 1326 | var item = $i("i3GEOlegendaitensValorClass").getElementsByTagName("select")[0].value, nclasses = |
1599 | 1327 | $i("i3GEOlegendanclasses").value, ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), p = |
1600 | - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1328 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1601 | 1329 | + i3GEO.configura.sid |
1602 | 1330 | + "&funcao=alteraclasse&nclasses=" |
1603 | 1331 | + nclasses |
... | ... | @@ -1640,7 +1368,7 @@ i3GEOF.legenda = |
1640 | 1368 | } |
1641 | 1369 | var item = $i("i3GEOlegendaitensValorClass").getElementsByTagName("select")[0].value, nclasses = |
1642 | 1370 | $i("i3GEOlegendanclasses").value, ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), p = |
1643 | - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1371 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1644 | 1372 | + i3GEO.configura.sid |
1645 | 1373 | + "&funcao=alteraclasse&nclasses=" |
1646 | 1374 | + nclasses |
... | ... | @@ -1685,9 +1413,9 @@ i3GEOF.legenda = |
1685 | 1413 | } |
1686 | 1414 | var p = |
1687 | 1415 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
1688 | - + i3GEO.configura.sid | |
1689 | - + "&funcao=alterarepresentacao&tema=" | |
1690 | - + i3GEOF.legenda.tema, cp = new cpaint(), fim = function() { | |
1416 | + + i3GEO.configura.sid | |
1417 | + + "&funcao=alterarepresentacao&tema=" | |
1418 | + + i3GEOF.legenda.tema, cp = new cpaint(), fim = function() { | |
1691 | 1419 | i3GEOF.legenda.aposAlterarLegenda(); |
1692 | 1420 | i3GEOF.legenda.aguarde.visibility = "hidden"; |
1693 | 1421 | }; |
... | ... | @@ -1706,11 +1434,20 @@ i3GEOF.legenda = |
1706 | 1434 | */ |
1707 | 1435 | montaEditor : function(retorno) { |
1708 | 1436 | try { |
1709 | - i3GEO.util.comboItens("i3GEOlegendaSelItemLabel", i3GEOF.legenda.tema, function(retorno) { | |
1710 | - if ($i("i3GEOlegendaitensLabel")) { | |
1711 | - $i("i3GEOlegendaitensLabel").innerHTML = retorno.dados; | |
1712 | - } | |
1713 | - }, "i3GEOlegendaitensLabel"); | |
1437 | + i3GEO.util.comboItens( | |
1438 | + "i3GEOlegendaSelItemLabel", | |
1439 | + i3GEOF.legenda.tema, | |
1440 | + function(retorno) { | |
1441 | + if ($i("i3GEOlegendaitensLabel")) { | |
1442 | + $i("i3GEOlegendaitensLabel").innerHTML = retorno.dados; | |
1443 | + } | |
1444 | + }, | |
1445 | + "i3GEOlegendaitensLabel", | |
1446 | + "", | |
1447 | + "", | |
1448 | + "", | |
1449 | + "form-control" | |
1450 | + ); | |
1714 | 1451 | if (i3GEOF.legenda.aguarde.visibility === "visible") { |
1715 | 1452 | return; |
1716 | 1453 | } |
... | ... | @@ -1720,7 +1457,7 @@ i3GEOF.legenda = |
1720 | 1457 | retorno = retorno.data; |
1721 | 1458 | i3GEOF.legenda.estilos = retorno.split("|"); |
1722 | 1459 | combo = |
1723 | - "<div class=styled-select style=width:100px ><select id='i3GEOlegendaestilos' onchange=i3GEOF.legenda.mostraEstilo(this.value)>"; | |
1460 | + "<select id='i3GEOlegendaestilos' class='form-control' onchange=i3GEOF.legenda.mostraEstilo(this.value)>"; | |
1724 | 1461 | n = i3GEOF.legenda.estilos.length; |
1725 | 1462 | for (i = 0; i < n; i++) { |
1726 | 1463 | l = i3GEOF.legenda.estilos[i].split("#"); |
... | ... | @@ -1728,123 +1465,9 @@ i3GEOF.legenda = |
1728 | 1465 | combo += sct; |
1729 | 1466 | } |
1730 | 1467 | combo += "</select></div>"; |
1731 | - $i("i3GEOlegendacomboestilos").innerHTML = | |
1732 | - "<table class='lista5'><tr><td><span class=paragrafo >" + $trad('estiloEdicao', i3GEOF.legenda.dicionario) | |
1733 | - + ":</span></td><td>" | |
1734 | - + combo | |
1735 | - + "</td><td></td></tr></table> (após adicionar ou excluir, aplique a alteração)<br>"; | |
1736 | - b = | |
1737 | - new YAHOO.widget.Button("i3GEOlegendabotao11", { | |
1738 | - onclick : { | |
1739 | - fn : function() { | |
1740 | - try { | |
1741 | - if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1742 | - return; | |
1743 | - } | |
1744 | - i3GEOF.legenda.aguarde.visibility = "visible"; | |
1745 | - var p = | |
1746 | - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1747 | - + i3GEO.configura.sid | |
1748 | - + "&funcao=editasimbolo&opcao=excluiestilo&tema=" | |
1749 | - + i3GEOF.legenda.tema | |
1750 | - + "&classe=" | |
1751 | - + i3GEOF.legenda.classe | |
1752 | - + "&estilo=" | |
1753 | - + i3GEOF.legenda.estilo, cp = new cpaint(); | |
1754 | - cp.set_response_type("JSON"); | |
1755 | - cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor); | |
1756 | - } catch (e) { | |
1757 | - i3GEO.janela.tempoMsg("Erro: " + e); | |
1758 | - i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1759 | - } | |
1760 | - } | |
1761 | - } | |
1762 | - }); | |
1763 | - b.addClass("rodar100"); | |
1764 | - b = | |
1765 | - new YAHOO.widget.Button("i3GEOlegendabotao12", { | |
1766 | - onclick : { | |
1767 | - fn : function() { | |
1768 | - try { | |
1769 | - if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1770 | - return; | |
1771 | - } | |
1772 | - i3GEOF.legenda.aguarde.visibility = "visible"; | |
1773 | - var p = | |
1774 | - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1775 | - + i3GEO.configura.sid | |
1776 | - + "&funcao=editasimbolo&opcao=adicionaestilo&tema=" | |
1777 | - + i3GEOF.legenda.tema | |
1778 | - + "&classe=" | |
1779 | - + i3GEOF.legenda.classe | |
1780 | - + "&estilo=" | |
1781 | - + i3GEOF.legenda.estilo, cp = new cpaint(); | |
1782 | - cp.set_response_type("JSON"); | |
1783 | - cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor); | |
1784 | - } catch (e) { | |
1785 | - i3GEO.janela.tempoMsg("Erro: " + e); | |
1786 | - i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1787 | - } | |
1788 | - } | |
1789 | - } | |
1790 | - }); | |
1791 | - b.addClass("rodar100"); | |
1792 | - b = | |
1793 | - new YAHOO.widget.Button("i3GEOlegendabotao13", { | |
1794 | - onclick : { | |
1795 | - fn : function() { | |
1796 | - try { | |
1797 | - if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1798 | - return; | |
1799 | - } | |
1800 | - i3GEOF.legenda.aguarde.visibility = "visible"; | |
1801 | - var p = | |
1802 | - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1803 | - + i3GEO.configura.sid | |
1804 | - + "&funcao=editasimbolo&opcao=sobeestilo&tema=" | |
1805 | - + i3GEOF.legenda.tema | |
1806 | - + "&classe=" | |
1807 | - + i3GEOF.legenda.classe | |
1808 | - + "&estilo=" | |
1809 | - + i3GEOF.legenda.estilo, cp = new cpaint(); | |
1810 | - cp.set_response_type("JSON"); | |
1811 | - cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor); | |
1812 | - } catch (e) { | |
1813 | - i3GEO.janela.tempoMsg("Erro: " + e); | |
1814 | - i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1815 | - } | |
1816 | - } | |
1817 | - } | |
1818 | - }); | |
1819 | - b.addClass("rodar100"); | |
1820 | - b = | |
1821 | - new YAHOO.widget.Button("i3GEOlegendabotao14", { | |
1822 | - onclick : { | |
1823 | - fn : function() { | |
1824 | - try { | |
1825 | - if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1826 | - return; | |
1827 | - } | |
1828 | - i3GEOF.legenda.aguarde.visibility = "visible"; | |
1829 | - var p = | |
1830 | - i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1831 | - + i3GEO.configura.sid | |
1832 | - + "&funcao=editasimbolo&opcao=desceestilo&tema=" | |
1833 | - + i3GEOF.legenda.tema | |
1834 | - + "&classe=" | |
1835 | - + i3GEOF.legenda.classe | |
1836 | - + "&estilo=" | |
1837 | - + i3GEOF.legenda.estilo, cp = new cpaint(); | |
1838 | - cp.set_response_type("JSON"); | |
1839 | - cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor); | |
1840 | - } catch (e) { | |
1841 | - i3GEO.janela.tempoMsg("Erro: " + e); | |
1842 | - i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1843 | - } | |
1844 | - } | |
1845 | - } | |
1846 | - }); | |
1847 | - b.addClass("rodar100"); | |
1468 | + $i("i3GEOlegendacomboestilos").innerHTML = combo; | |
1469 | + | |
1470 | + | |
1848 | 1471 | i3GEOF.legenda.aguarde.visibility = "hidden"; |
1849 | 1472 | i3GEOF.legenda.mostraEstilo(0); |
1850 | 1473 | } else { |
... | ... | @@ -1856,6 +1479,94 @@ i3GEOF.legenda = |
1856 | 1479 | i3GEOF.legenda.aguarde.visibility = "hidden"; |
1857 | 1480 | } |
1858 | 1481 | }, |
1482 | + desceEstilo: function() { | |
1483 | + try { | |
1484 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1485 | + return; | |
1486 | + } | |
1487 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1488 | + var p = | |
1489 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1490 | + + i3GEO.configura.sid | |
1491 | + + "&funcao=editasimbolo&opcao=desceestilo&tema=" | |
1492 | + + i3GEOF.legenda.tema | |
1493 | + + "&classe=" | |
1494 | + + i3GEOF.legenda.classe | |
1495 | + + "&estilo=" | |
1496 | + + i3GEOF.legenda.estilo, cp = new cpaint(); | |
1497 | + cp.set_response_type("JSON"); | |
1498 | + cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor); | |
1499 | + } catch (e) { | |
1500 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1501 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1502 | + } | |
1503 | + }, | |
1504 | + sobeEstilo: function() { | |
1505 | + try { | |
1506 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1507 | + return; | |
1508 | + } | |
1509 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1510 | + var p = | |
1511 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1512 | + + i3GEO.configura.sid | |
1513 | + + "&funcao=editasimbolo&opcao=sobeestilo&tema=" | |
1514 | + + i3GEOF.legenda.tema | |
1515 | + + "&classe=" | |
1516 | + + i3GEOF.legenda.classe | |
1517 | + + "&estilo=" | |
1518 | + + i3GEOF.legenda.estilo, cp = new cpaint(); | |
1519 | + cp.set_response_type("JSON"); | |
1520 | + cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor); | |
1521 | + } catch (e) { | |
1522 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1523 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1524 | + } | |
1525 | + }, | |
1526 | + adicionaEstilo: function() { | |
1527 | + try { | |
1528 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1529 | + return; | |
1530 | + } | |
1531 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1532 | + var p = | |
1533 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1534 | + + i3GEO.configura.sid | |
1535 | + + "&funcao=editasimbolo&opcao=adicionaestilo&tema=" | |
1536 | + + i3GEOF.legenda.tema | |
1537 | + + "&classe=" | |
1538 | + + i3GEOF.legenda.classe | |
1539 | + + "&estilo=" | |
1540 | + + i3GEOF.legenda.estilo, cp = new cpaint(); | |
1541 | + cp.set_response_type("JSON"); | |
1542 | + cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor); | |
1543 | + } catch (e) { | |
1544 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1545 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1546 | + } | |
1547 | + }, | |
1548 | + excluiEstilo: function() { | |
1549 | + try { | |
1550 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1551 | + return; | |
1552 | + } | |
1553 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1554 | + var p = | |
1555 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1556 | + + i3GEO.configura.sid | |
1557 | + + "&funcao=editasimbolo&opcao=excluiestilo&tema=" | |
1558 | + + i3GEOF.legenda.tema | |
1559 | + + "&classe=" | |
1560 | + + i3GEOF.legenda.classe | |
1561 | + + "&estilo=" | |
1562 | + + i3GEOF.legenda.estilo, cp = new cpaint(); | |
1563 | + cp.set_response_type("JSON"); | |
1564 | + cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor); | |
1565 | + } catch (e) { | |
1566 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1567 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1568 | + } | |
1569 | + }, | |
1859 | 1570 | /* |
1860 | 1571 | * Function: mostraEstilo |
1861 | 1572 | * |
... | ... | @@ -1864,233 +1575,62 @@ i3GEOF.legenda = |
1864 | 1575 | mostraEstilo : function(e) { |
1865 | 1576 | i3GEOF.legenda.aguarde.visibility = "visible"; |
1866 | 1577 | try { |
1867 | - var linha, tipoLayer, d, p, cp; | |
1578 | + var linha, tipoLayer, d, p, cp, mustache = {}; | |
1868 | 1579 | i3GEOF.legenda.estilo = e; // esta e uma variavel global |
1869 | 1580 | linha = i3GEOF.legenda.estilos[i3GEOF.legenda.estilo]; |
1870 | 1581 | linha = linha.split("#"); |
1871 | 1582 | tipoLayer = linha[0]; |
1872 | - d = | |
1873 | - "<img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"outlinecolor\",\"i3GEOlegendaoutlinecolor\")' title='" + $trad( | |
1874 | - 'aplicatodos', | |
1875 | - i3GEOF.legenda.dicionario) | |
1876 | - + "' src='" | |
1877 | - + i3GEO.configura.locaplic | |
1878 | - + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
1879 | - + "<p class='paragrafo'>Cor do contorno:</p>" | |
1880 | - + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1881 | - + "<div class='i3geoForm i3geoFormIconeAquarela' >" | |
1882 | - + "<input type=text value='" | |
1883 | - + linha[2] | |
1884 | - + "' id='i3GEOlegendaoutlinecolor' />" | |
1885 | - + "</div></form>" | |
1886 | - | |
1887 | - + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"color\",\"i3GEOlegendacolor\")' title='" | |
1888 | - + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
1889 | - + "' src='" | |
1890 | - + i3GEO.configura.locaplic | |
1891 | - + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
1892 | - + "<p class='paragrafo'>" | |
1893 | - + $trad('corFrente', i3GEOF.legenda.dicionario) | |
1894 | - + ":</p>" | |
1895 | - + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1896 | - + "<div class='i3geoForm i3geoFormIconeAquarela' >" | |
1897 | - + "<input type=text value='" | |
1898 | - + linha[4] | |
1899 | - + "' id='i3GEOlegendacolor' />" | |
1900 | - + "</div></form>" | |
1901 | - | |
1902 | - + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"backgroundcolor\",\"i3GEOlegendabackgroundcolor\")' title='" | |
1903 | - + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
1904 | - + "' src='" | |
1905 | - + i3GEO.configura.locaplic | |
1906 | - + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
1907 | - + "<p class='paragrafo'>" | |
1908 | - + $trad('corFundo', i3GEOF.legenda.dicionario) | |
1909 | - + ":</p>" | |
1910 | - + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1911 | - + "<div class='i3geoForm i3geoFormIconeAquarela' >" | |
1912 | - + "<input type=text value='" | |
1913 | - + linha[3] | |
1914 | - + "' id='i3GEOlegendabackgroundcolor' />" | |
1915 | - + "</div></form>" | |
1916 | - | |
1917 | - + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"size\",\"i3GEOlegendasizes\")' title='" | |
1918 | - + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
1919 | - + "' src='" | |
1920 | - + i3GEO.configura.locaplic | |
1921 | - + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
1922 | - + "<p class='paragrafo'>" | |
1923 | - + $trad('tamanhoEspacamento', i3GEOF.legenda.dicionario) | |
1924 | - + ":</p>" | |
1925 | - + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
1926 | - + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1927 | - + "<input type=text value='" | |
1928 | - + linha[6] | |
1929 | - + "' id='i3GEOlegendasizes' />" | |
1930 | - + "</form></div>" | |
1931 | - + "<div class='styled-select' id='i3GEOlegendaComboSize'></div>" | |
1932 | - | |
1933 | - + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"width\",\"i3GEOlegendawidth\")' title='" | |
1934 | - + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
1935 | - + "' src='" | |
1936 | - + i3GEO.configura.locaplic | |
1937 | - + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
1938 | - + "<p class='paragrafo'>" | |
1939 | - + $trad('espessura', i3GEOF.legenda.dicionario) | |
1940 | - + ":<p>" | |
1941 | - + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
1942 | - + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1943 | - + "<input type=text value='" | |
1944 | - + linha[8] | |
1945 | - + "' id='i3GEOlegendawidth' />" | |
1946 | - + "</form></div>" | |
1947 | - | |
1948 | - + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"pattern\",\"i3GEOlegendapattern\")' title='" | |
1949 | - + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
1950 | - + "' src='" | |
1951 | - + i3GEO.configura.locaplic | |
1952 | - + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
1953 | - + "<p class='paragrafo'>" | |
1954 | - + $trad('padraoRepeticao', i3GEOF.legenda.dicionario) | |
1955 | - + ":</p>" | |
1956 | - + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
1957 | - + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1958 | - + "<input type=text value='" | |
1959 | - + linha[9] | |
1960 | - + "' id='i3GEOlegendapattern' />" | |
1961 | - + "</form></div>" | |
1962 | - | |
1963 | - + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"opacity\",\"i3GEOlegendaopacidade\")' title='" | |
1964 | - + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
1965 | - + "' src='" | |
1966 | - + i3GEO.configura.locaplic | |
1967 | - + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
1968 | - + "<p class='paragrafo'>" | |
1969 | - + $trad('opacidade', i3GEOF.legenda.dicionario) | |
1970 | - + ":</p>" | |
1971 | - + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
1972 | - + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1973 | - + "<input type=text value='" | |
1974 | - + linha[7] | |
1975 | - + "' id='i3GEOlegendaopacidade' />" | |
1976 | - + "</form></div>" | |
1977 | - | |
1978 | - + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"angle\",\"i3GEOlegendaangulo\")' title='" | |
1979 | - + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
1980 | - + "' src='" | |
1981 | - + i3GEO.configura.locaplic | |
1982 | - + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
1983 | - + "<p class='paragrafo'>" | |
1984 | - + $trad('angulo', i3GEOF.legenda.dicionario) | |
1985 | - + ":</p>" | |
1986 | - + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
1987 | - + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1988 | - + "<input type=text value='" | |
1989 | - + linha[10] | |
1990 | - + "' id='i3GEOlegendaangulo' />" | |
1991 | - + "</form></div>" | |
1992 | - | |
1993 | - + "<br>" | |
1994 | - + "<p class='paragrafo'>" | |
1995 | - + $trad('symbolscale', i3GEOF.legenda.dicionario) | |
1996 | - + ":</p>" | |
1997 | - + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
1998 | - + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1999 | - + "<input type=text value='" | |
2000 | - + linha[11] | |
2001 | - + "' id='i3GEOlegendasymbolscale' />" | |
2002 | - + "</form></div>" | |
2003 | - | |
2004 | - + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"minsize\",\"i3GEOlegendaminsize\")' title='" | |
2005 | - + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
2006 | - + "' src='" | |
2007 | - + i3GEO.configura.locaplic | |
2008 | - + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
2009 | - + "<p class='paragrafo'>" | |
2010 | - + $trad('minsize', i3GEOF.legenda.dicionario) | |
2011 | - + ":</p>" | |
2012 | - + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
2013 | - + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
2014 | - + "<input type=text value='" | |
2015 | - + linha[12] | |
2016 | - + "' id='i3GEOlegendaminsize' />" | |
2017 | - + "</form></div>" | |
2018 | - | |
2019 | - + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"maxsize\",\"i3GEOlegendamaxsize\")' title='" | |
2020 | - + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
2021 | - + "' src='" | |
2022 | - + i3GEO.configura.locaplic | |
2023 | - + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
2024 | - + "<p class='paragrafo'>" | |
2025 | - + $trad('maxsize', i3GEOF.legenda.dicionario) | |
2026 | - + ":</p>" | |
2027 | - + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
2028 | - + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
2029 | - + "<input type=text value='" | |
2030 | - + linha[13] | |
2031 | - + "' id='i3GEOlegendamaxsize' />" | |
2032 | - + "</form></div>" | |
2033 | - | |
2034 | - + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"offsetx\",\"i3GEOlegendaoffsetx\")' title='" | |
2035 | - + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
2036 | - + "' src='" | |
2037 | - + i3GEO.configura.locaplic | |
2038 | - + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
2039 | - + "<p class='paragrafo'>" | |
2040 | - + $trad('offsetx', i3GEOF.legenda.dicionario) | |
2041 | - + ":</p>" | |
2042 | - + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
2043 | - + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
2044 | - + "<input type=text value='" | |
2045 | - + linha[14] | |
2046 | - + "' id='i3GEOlegendaoffsetx' />" | |
2047 | - + "</form></div>" | |
1583 | + mustache = { | |
1584 | + "voutlinecolor": linha[2], | |
1585 | + "vcolor": linha[4], | |
1586 | + "vbackgroundcolor": linha[3], | |
1587 | + "vsize": linha[6], | |
1588 | + "vwidth": linha[8], | |
1589 | + "vpattern": linha[9], | |
1590 | + "vopacity": linha[7], | |
1591 | + "vangle": linha[10], | |
1592 | + "vsymbolscale": linha[11], | |
1593 | + "vminsize": linha[12], | |
1594 | + "vmaxsize": linha[13], | |
1595 | + "voffsetx": linha[14], | |
1596 | + "voffsety": linha[15], | |
1597 | + "vsymbolname": linha[5], | |
1598 | + }; | |
2048 | 1599 | |
2049 | - + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"offsety\",\"i3GEOlegendaoffsety\")' title='" | |
2050 | - + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
2051 | - + "' src='" | |
2052 | - + i3GEO.configura.locaplic | |
2053 | - + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
2054 | - + "<p class='paragrafo'>" | |
2055 | - + $trad('offsety', i3GEOF.legenda.dicionario) | |
2056 | - + ":</p>" | |
2057 | - + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
2058 | - + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
2059 | - + "<input type=text value='" | |
2060 | - + linha[15] | |
2061 | - + "' id='i3GEOlegendaoffsety' />" | |
2062 | - + "</form></div>" | |
1600 | + ins = Mustache.render( | |
1601 | + i3GEOF.legenda.MUSTACHEESTILO, | |
1602 | + $.extend( | |
1603 | + {}, | |
1604 | + mustache, | |
1605 | + i3GEOF.legenda.DICIONARIO | |
1606 | + ) | |
1607 | + ); | |
1608 | + $i("i3GEOlegendaParametrosEstilos").innerHTML = ins; | |
2063 | 1609 | |
2064 | - + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"symbolname\",\"i3GEOlegendasymbolname\")' title='" | |
2065 | - + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
2066 | - + "' src='" | |
2067 | - + i3GEO.configura.locaplic | |
2068 | - + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
2069 | - + "<p class='paragrafo'>" | |
2070 | - + $trad('simbolo', i3GEOF.legenda.dicionario) | |
2071 | - + ":</p>" | |
2072 | - + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
2073 | - + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
2074 | - + "<input type=text value='" | |
2075 | - + linha[5] | |
2076 | - + "' id='i3GEOlegendasymbolname' />" | |
2077 | - + "</form></div>"; | |
2078 | 1610 | |
2079 | - $i("i3GEOlegendaParametrosEstilos").innerHTML = d; | |
2080 | 1611 | //preenche as listas de itens |
2081 | - i3GEO.util.comboItens("", i3GEOF.legenda.tema, function(retorno) { | |
2082 | - if ($i("i3GEOlegendaComboSize")) { | |
2083 | - $i("i3GEOlegendaComboSize").innerHTML = retorno.dados.replace("id=''"," onchange='$i(\"i3GEOlegendasizes\").value = this.value'"); | |
2084 | - } | |
2085 | - }); | |
1612 | + i3GEO.util.comboItens( | |
1613 | + "", | |
1614 | + i3GEOF.legenda.tema, function(retorno) { | |
1615 | + if ($i("i3GEOlegendaComboSize")) { | |
1616 | + $i("i3GEOlegendaComboSize").innerHTML = retorno.dados.replace("id=''"," onchange='$i(\"i3GEOlegendasizes\").value = this.value'"); | |
1617 | + } | |
1618 | + }, | |
1619 | + "", | |
1620 | + "", | |
1621 | + "", | |
1622 | + "", | |
1623 | + "form-control" | |
1624 | + ); | |
2086 | 1625 | |
2087 | 1626 | i3GEO.util.aplicaAquarela("i3GEOlegendaParametrosEstilos"); |
1627 | + | |
2088 | 1628 | p = |
2089 | 1629 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
2090 | - + i3GEO.configura.sid | |
2091 | - + "&funcao=editasimbolo&tipo=" | |
2092 | - + tipoLayer | |
2093 | - + "&opcao=listaSimbolos&onclick=i3GEOF.legenda.aplicaSimbolo(this)"; | |
1630 | + + i3GEO.configura.sid | |
1631 | + + "&funcao=editasimbolo&tipo=" | |
1632 | + + tipoLayer | |
1633 | + + "&opcao=listaSimbolos&onclick=i3GEOF.legenda.aplicaSimbolo(this)"; | |
2094 | 1634 | cp = new cpaint(); |
2095 | 1635 | cp.set_response_type("JSON"); |
2096 | 1636 | cp.call(p, "editasimbolo", i3GEOF.legenda.listaSimbolos); |
... | ... | @@ -2146,11 +1686,11 @@ i3GEOF.legenda = |
2146 | 1686 | i3GEOF.legenda.aguarde.visibility = "visible"; |
2147 | 1687 | var i, p, cp, fim, outlinecolor = $i("i3GEOlegendaoutlinecolor").value, backgroundcolor = |
2148 | 1688 | $i("i3GEOlegendabackgroundcolor").value, color = $i("i3GEOlegendacolor").value, symbolname = |
2149 | - $i("i3GEOlegendasymbolname").value, simbolos = $i("i3GEOlegendasimbolos").getElementsByTagName("img"), valido = "nao", n = | |
2150 | - simbolos.length, size = $i("i3GEOlegendasizes").value, width = $i("i3GEOlegendawidth").value, pattern = | |
2151 | - $i("i3GEOlegendapattern").value, opacidade = $i("i3GEOlegendaopacidade").value, angle = $i("i3GEOlegendaangulo").value, symbolscale = | |
2152 | - $i("i3GEOlegendasymbolscale").value, minsize = $i("i3GEOlegendaminsize").value, maxsize = | |
2153 | - $i("i3GEOlegendamaxsize").value, offsetx = $i("i3GEOlegendaoffsetx").value, offsety = $i("i3GEOlegendaoffsety").value; | |
1689 | + $i("i3GEOlegendasymbolname").value, simbolos = $i("i3GEOlegendasimbolos").getElementsByTagName("img"), valido = "nao", n = | |
1690 | + simbolos.length, size = $i("i3GEOlegendasizes").value, width = $i("i3GEOlegendawidth").value, pattern = | |
1691 | + $i("i3GEOlegendapattern").value, opacidade = $i("i3GEOlegendaopacidade").value, angle = $i("i3GEOlegendaangulo").value, symbolscale = | |
1692 | + $i("i3GEOlegendasymbolscale").value, minsize = $i("i3GEOlegendaminsize").value, maxsize = | |
1693 | + $i("i3GEOlegendamaxsize").value, offsetx = $i("i3GEOlegendaoffsetx").value, offsety = $i("i3GEOlegendaoffsety").value; | |
2154 | 1694 | if (symbolscale != "") { |
2155 | 1695 | symbolscale = parseInt(symbolscale, 10); |
2156 | 1696 | } else { |
... | ... | @@ -2168,41 +1708,41 @@ i3GEOF.legenda = |
2168 | 1708 | } |
2169 | 1709 | p = |
2170 | 1710 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
2171 | - + i3GEO.configura.sid | |
2172 | - + "&funcao=editasimbolo&opcao=aplica&tema=" | |
2173 | - + i3GEOF.legenda.tema | |
2174 | - + "&classe=" | |
2175 | - + i3GEOF.legenda.classe | |
2176 | - + "&estilo=" | |
2177 | - + i3GEOF.legenda.estilo | |
2178 | - + "&outlinecolor=" | |
2179 | - + outlinecolor | |
2180 | - + "&backgroundcolor=" | |
2181 | - + backgroundcolor | |
2182 | - + "&color=" | |
2183 | - + color | |
2184 | - + "&symbolname=" | |
2185 | - + symbolname | |
2186 | - + "&width=" | |
2187 | - + width | |
2188 | - + "&pattern=" | |
2189 | - + pattern | |
2190 | - + "&size=" | |
2191 | - + size | |
2192 | - + "&opacidade=" | |
2193 | - + opacidade | |
2194 | - + "&angle=" | |
2195 | - + angle | |
2196 | - + "&symbolscale=" | |
2197 | - + symbolscale | |
2198 | - + "&minsize=" | |
2199 | - + minsize | |
2200 | - + "&maxsize=" | |
2201 | - + maxsize | |
2202 | - + "&offsetx=" | |
2203 | - + offsetx | |
2204 | - + "&offsety=" | |
2205 | - + offsety; | |
1711 | + + i3GEO.configura.sid | |
1712 | + + "&funcao=editasimbolo&opcao=aplica&tema=" | |
1713 | + + i3GEOF.legenda.tema | |
1714 | + + "&classe=" | |
1715 | + + i3GEOF.legenda.classe | |
1716 | + + "&estilo=" | |
1717 | + + i3GEOF.legenda.estilo | |
1718 | + + "&outlinecolor=" | |
1719 | + + outlinecolor | |
1720 | + + "&backgroundcolor=" | |
1721 | + + backgroundcolor | |
1722 | + + "&color=" | |
1723 | + + color | |
1724 | + + "&symbolname=" | |
1725 | + + symbolname | |
1726 | + + "&width=" | |
1727 | + + width | |
1728 | + + "&pattern=" | |
1729 | + + pattern | |
1730 | + + "&size=" | |
1731 | + + size | |
1732 | + + "&opacidade=" | |
1733 | + + opacidade | |
1734 | + + "&angle=" | |
1735 | + + angle | |
1736 | + + "&symbolscale=" | |
1737 | + + symbolscale | |
1738 | + + "&minsize=" | |
1739 | + + minsize | |
1740 | + + "&maxsize=" | |
1741 | + + maxsize | |
1742 | + + "&offsetx=" | |
1743 | + + offsetx | |
1744 | + + "&offsety=" | |
1745 | + + offsety; | |
2206 | 1746 | cp = new cpaint(); |
2207 | 1747 | fim = function() { |
2208 | 1748 | i3GEOF.legenda.aposAlterarLegenda(); |
... | ... | @@ -2243,57 +1783,46 @@ i3GEOF.legenda = |
2243 | 1783 | i3GEOF.legenda.aguarde.visibility = "visible"; |
2244 | 1784 | var monta = |
2245 | 1785 | function(retorno) { |
2246 | - if (retorno.data && retorno.data[0].proc == "") { | |
2247 | - var b, ins = [], i, re, t; | |
2248 | - ins.push("<p class='paragrafo' ><input type=button value='" + $trad('graficoPizza', i3GEOF.legenda.dicionario) | |
2249 | - + "' id=i3GEOlegendaGraficoPizza /></p>"); | |
2250 | - ins.push("<p class='paragrafo' >" + $trad('numeroOcorrenciasClasses', i3GEOF.legenda.dicionario) + "</p>"); | |
2251 | - ins.push("<table width=100% >"); | |
2252 | - i3GEOF.legenda.dadosGrafico = [ | |
2253 | - "n;x" | |
2254 | - ]; | |
2255 | - if (retorno.data.length < 2) { | |
2256 | - i3GEO.janela.tempoMsg($trad('msgNumeroClasses', i3GEOF.legenda.dicionario)); | |
2257 | - i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2258 | - return; | |
2259 | - } else { | |
2260 | - i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia4", "i3GEOlegendaguia"); | |
2261 | - } | |
2262 | - for (i = 0; i < retorno.data.length; i++) { | |
2263 | - id = retorno.data[i].tema + "-" + retorno.data[i].idclasse; // layer+indice da classe | |
2264 | - re = new RegExp("'", "g"); | |
2265 | - exp = (retorno.data[i].expressao).replace(re, '"'); | |
2266 | - ins.push("<tr><td style='text-align:left;border-bottom:0 none white' >" + retorno.data[i].nomeclasse | |
2267 | - + "</td></tr>"); | |
2268 | - t = (retorno.data[i].nreg * 100) / retorno.data[i].totalreg; | |
2269 | - ins.push("<tr><td style=text-align:left ><img height=15px width=" + t | |
1786 | + if (retorno.data && retorno.data[0].proc == "") { | |
1787 | + var b, ins = [], i, re, t; | |
1788 | + ins.push("<h5>" + $trad('numeroOcorrenciasClasses', i3GEOF.legenda.dicionario) + "</h5>"); | |
1789 | + ins.push("<table width=100% >"); | |
1790 | + i3GEOF.legenda.dadosGrafico = [ | |
1791 | + "n;x" | |
1792 | + ]; | |
1793 | + if (retorno.data.length < 2) { | |
1794 | + i3GEO.janela.tempoMsg($trad('msgNumeroClasses', i3GEOF.legenda.dicionario)); | |
1795 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1796 | + return; | |
1797 | + } else { | |
1798 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia4", "i3GEOlegendaguia"); | |
1799 | + } | |
1800 | + for (i = 0; i < retorno.data.length; i++) { | |
1801 | + id = retorno.data[i].tema + "-" + retorno.data[i].idclasse; // layer+indice da classe | |
1802 | + re = new RegExp("'", "g"); | |
1803 | + exp = (retorno.data[i].expressao).replace(re, '"'); | |
1804 | + ins.push("<tr><td style='text-align:left;border-bottom:0 none white' ><label>" + retorno.data[i].nomeclasse | |
1805 | + + "</label></td></tr>"); | |
1806 | + t = (retorno.data[i].nreg * 100) / retorno.data[i].totalreg; | |
1807 | + ins.push("<tr><td style=text-align:left ><img height=15px width=" + t | |
2270 | 1808 | + "% src='" |
2271 | 1809 | + retorno.data[i].imagem |
2272 | 1810 | + "' /></td></tr>"); |
2273 | - i3GEOF.legenda.dadosGrafico.push(retorno.data[i].nomeclasse + ";" + retorno.data[i].nreg); | |
2274 | - } | |
2275 | - ins.push("</table><br>"); | |
2276 | - $i("i3GEOlegendaguia4obj").innerHTML = ins.join(""); | |
2277 | - } else { | |
2278 | - $i("i3GEOlegendaguia4obj").innerHTML = "<p style=color:red >Erro<br>"; | |
2279 | - return; | |
1811 | + i3GEOF.legenda.dadosGrafico.push(retorno.data[i].nomeclasse + ";" + retorno.data[i].nreg); | |
2280 | 1812 | } |
2281 | - i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1813 | + ins.push("</table><br>"); | |
1814 | + $i("i3GEOlegendaguia4obj").innerHTML = ins.join(""); | |
1815 | + } else { | |
1816 | + $i("i3GEOlegendaguia4obj").innerHTML = "<p style=color:red >Erro<br>"; | |
1817 | + return; | |
1818 | + } | |
1819 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2282 | 1820 | |
2283 | - b = new YAHOO.widget.Button("i3GEOlegendaGraficoPizza", { | |
2284 | - onclick : { | |
2285 | - fn : function() { | |
2286 | - var js = i3GEO.configura.locaplic + "/ferramentas/graficointerativo1/dependencias.php"; | |
2287 | - i3GEO.util.scriptTag(js, "i3GEOF.legenda.iniciaGraficoPizza()", "i3GEOF.graficointerativo1_script"); | |
2288 | - } | |
2289 | - } | |
2290 | - }); | |
2291 | - b.addClass("abrir"); | |
2292 | - }, p = | |
1821 | + }, p = | |
2293 | 1822 | i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" |
2294 | - + i3GEO.configura.sid | |
2295 | - + "&funcao=contagemclasse&tema=" | |
2296 | - + i3GEOF.legenda.tema, cp = new cpaint(); | |
1823 | + + i3GEO.configura.sid | |
1824 | + + "&funcao=contagemclasse&tema=" | |
1825 | + + i3GEOF.legenda.tema, cp = new cpaint(); | |
2297 | 1826 | // cp.set_debug(2) |
2298 | 1827 | cp.set_response_type("JSON"); |
2299 | 1828 | cp.call(p, "cocontagemclasse", monta); |
... | ... | @@ -2304,12 +1833,12 @@ i3GEOF.legenda = |
2304 | 1833 | }, |
2305 | 1834 | iniciaGraficoPizza : function() { |
2306 | 1835 | var dados = { |
2307 | - "attributes" : { | |
2308 | - "id" : "" | |
2309 | - }, | |
2310 | - "data" : { | |
2311 | - "dados" : i3GEOF.legenda.dadosGrafico | |
2312 | - } | |
1836 | + "attributes" : { | |
1837 | + "id" : "" | |
1838 | + }, | |
1839 | + "data" : { | |
1840 | + "dados" : i3GEOF.legenda.dadosGrafico | |
1841 | + } | |
2313 | 1842 | }; |
2314 | 1843 | i3GEOF.graficointerativo1.tipo = "pizza_1"; |
2315 | 1844 | i3GEOF.graficointerativo1.iniciaJanelaFlutuante(dados); |
... | ... | @@ -2346,11 +1875,11 @@ i3GEOF.legenda = |
2346 | 1875 | }; |
2347 | 1876 | p = |
2348 | 1877 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
2349 | - + i3GEO.configura.sid | |
2350 | - + "&funcao=aplicaProcessos&lista=" | |
2351 | - + lista | |
2352 | - + "&tema=" | |
2353 | - + i3GEOF.legenda.tema; | |
1878 | + + i3GEO.configura.sid | |
1879 | + + "&funcao=aplicaProcessos&lista=" | |
1880 | + + lista | |
1881 | + + "&tema=" | |
1882 | + + i3GEOF.legenda.tema; | |
2354 | 1883 | cp = new cpaint(); |
2355 | 1884 | cp.set_response_type("JSON"); |
2356 | 1885 | cp.call(p, "aplicaProcessos", temp); |
... | ... | @@ -2365,7 +1894,7 @@ i3GEOF.legenda = |
2365 | 1894 | * Adiciona um novo processo na lista de processos |
2366 | 1895 | */ |
2367 | 1896 | adicionaProcesso : function(s) { |
2368 | - $i("i3GEOlegendaprocessos").innerHTML += $inputText("", "", "", "", 50, s.value); | |
1897 | + $i("i3GEOlegendaprocessos").innerHTML += "<div class='form-group label-fixed condensed'><input value='" + s.value + "' class='form-control input-lg' type='text' /></div>"; | |
2369 | 1898 | }, |
2370 | 1899 | aplicaTodasClasses : function(parametro, id) { |
2371 | 1900 | var valor = $i(id).value; |
... | ... | @@ -2376,14 +1905,14 @@ i3GEOF.legenda = |
2376 | 1905 | }, p, cp; |
2377 | 1906 | p = |
2378 | 1907 | i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" |
2379 | - + i3GEO.configura.sid | |
2380 | - + "&funcao=aplicaTodasClasses" | |
2381 | - + "¶metro=" | |
2382 | - + parametro | |
2383 | - + "&valor=" | |
2384 | - + valor | |
2385 | - + "&tema=" | |
2386 | - + i3GEOF.legenda.tema; | |
1908 | + + i3GEO.configura.sid | |
1909 | + + "&funcao=aplicaTodasClasses" | |
1910 | + + "¶metro=" | |
1911 | + + parametro | |
1912 | + + "&valor=" | |
1913 | + + valor | |
1914 | + + "&tema=" | |
1915 | + + i3GEOF.legenda.tema; | |
2387 | 1916 | cp = new cpaint(); |
2388 | 1917 | cp.set_response_type("JSON"); |
2389 | 1918 | cp.call(p, "foo", temp); |
... | ... | @@ -2396,21 +1925,21 @@ i3GEOF.legenda = |
2396 | 1925 | }, p, cp; |
2397 | 1926 | p = |
2398 | 1927 | i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" |
2399 | - + i3GEO.configura.sid | |
2400 | - + "&funcao=aplicarCluster" | |
2401 | - + "&maxdistance=" | |
2402 | - + $i("i3GEOlegendaClusterMaxdistance").value | |
2403 | - + "&buffer=" | |
2404 | - + $i("i3GEOlegendaClusterBuffer").value | |
2405 | - + "&filter=" | |
2406 | - //+ i3GEO.util.base64encode($i("i3GEOlegendaClusterFilter").value) | |
2407 | - + $i("i3GEOlegendaClusterFilter").value | |
2408 | - + "®ion=" | |
2409 | - + $i("i3GEOlegendaClusterRegion").value | |
2410 | - + "&group=" | |
2411 | - + $i("i3GEOlegendaitensCluster").getElementsByTagName("select")[0].value | |
2412 | - + "&tema=" | |
2413 | - + i3GEOF.legenda.tema; | |
1928 | + + i3GEO.configura.sid | |
1929 | + + "&funcao=aplicarCluster" | |
1930 | + + "&maxdistance=" | |
1931 | + + $i("i3GEOlegendaClusterMaxdistance").value | |
1932 | + + "&buffer=" | |
1933 | + + $i("i3GEOlegendaClusterBuffer").value | |
1934 | + + "&filter=" | |
1935 | + //+ i3GEO.util.base64encode($i("i3GEOlegendaClusterFilter").value) | |
1936 | + + $i("i3GEOlegendaClusterFilter").value | |
1937 | + + "®ion=" | |
1938 | + + $i("i3GEOlegendaClusterRegion").value | |
1939 | + + "&group=" | |
1940 | + + $i("i3GEOlegendaitensCluster").getElementsByTagName("select")[0].value | |
1941 | + + "&tema=" | |
1942 | + + i3GEOF.legenda.tema; | |
2414 | 1943 | cp = new cpaint(); |
2415 | 1944 | cp.set_response_type("JSON"); |
2416 | 1945 | cp.call(p, "foo", temp); |
... | ... | @@ -2422,64 +1951,73 @@ i3GEOF.legenda = |
2422 | 1951 | }, p, cp; |
2423 | 1952 | p = |
2424 | 1953 | i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" |
2425 | - + i3GEO.configura.sid | |
2426 | - + "&funcao=removerCluster" | |
2427 | - + "&tema=" | |
2428 | - + i3GEOF.legenda.tema; | |
1954 | + + i3GEO.configura.sid | |
1955 | + + "&funcao=removerCluster" | |
1956 | + + "&tema=" | |
1957 | + + i3GEOF.legenda.tema; | |
2429 | 1958 | cp = new cpaint(); |
2430 | 1959 | cp.set_response_type("JSON"); |
2431 | 1960 | cp.call(p, "foo", temp); |
2432 | 1961 | }, |
2433 | 1962 | montaCombosItens : function(){ |
2434 | - i3GEO.util.comboItens("", i3GEOF.legenda.tema, function(retorno) { | |
2435 | - if ($i("i3GEOlegendaitensValorUnico")) { | |
2436 | - $i("i3GEOlegendaitensValorUnico").innerHTML = retorno.dados; | |
2437 | - } | |
2438 | - if ($i("i3GEOlegendaClassesValorUnico")) { | |
2439 | - $i("i3GEOlegendaClassesValorUnico").innerHTML = retorno.dados; | |
2440 | - } | |
2441 | - if ($i("i3GEOlegendaitensMetade")) { | |
2442 | - $i("i3GEOlegendaitensMetade").innerHTML = retorno.dados; | |
2443 | - } | |
2444 | - if ($i("i3GEOlegendaitensMetadeId")) { | |
2445 | - $i("i3GEOlegendaitensMetadeId").innerHTML = retorno.dados; | |
2446 | - } | |
2447 | - if ($i("i3GEOlegendaitensMedia")) { | |
2448 | - $i("i3GEOlegendaitensMedia").innerHTML = retorno.dados; | |
2449 | - } | |
2450 | - if ($i("i3GEOlegendaitensValorClass")) { | |
2451 | - $i("i3GEOlegendaitensValorClass").innerHTML = retorno.dados; | |
2452 | - } | |
2453 | - if ($i("i3GEOlegendaitensCluster")) { | |
2454 | - $i("i3GEOlegendaitensCluster").innerHTML = retorno.dados; | |
2455 | - } | |
2456 | - if ($i("i3GEOlegendaitensValorQuartil")) { | |
2457 | - $i("i3GEOlegendaitensValorQuartil").innerHTML = retorno.dados; | |
2458 | - } | |
2459 | - }); | |
1963 | + i3GEO.util.comboItens( | |
1964 | + "", | |
1965 | + i3GEOF.legenda.tema, | |
1966 | + function(retorno) { | |
1967 | + if ($i("i3GEOlegendaitensValorUnico")) { | |
1968 | + $i("i3GEOlegendaitensValorUnico").innerHTML = retorno.dados; | |
1969 | + } | |
1970 | + if ($i("i3GEOlegendaClassesValorUnico")) { | |
1971 | + $i("i3GEOlegendaClassesValorUnico").innerHTML = retorno.dados; | |
1972 | + } | |
1973 | + if ($i("i3GEOlegendaitensMetade")) { | |
1974 | + $i("i3GEOlegendaitensMetade").innerHTML = retorno.dados; | |
1975 | + } | |
1976 | + if ($i("i3GEOlegendaitensMetadeId")) { | |
1977 | + $i("i3GEOlegendaitensMetadeId").innerHTML = retorno.dados; | |
1978 | + } | |
1979 | + if ($i("i3GEOlegendaitensMedia")) { | |
1980 | + $i("i3GEOlegendaitensMedia").innerHTML = retorno.dados; | |
1981 | + } | |
1982 | + if ($i("i3GEOlegendaitensValorClass")) { | |
1983 | + $i("i3GEOlegendaitensValorClass").innerHTML = retorno.dados; | |
1984 | + } | |
1985 | + if ($i("i3GEOlegendaitensCluster")) { | |
1986 | + $i("i3GEOlegendaitensCluster").innerHTML = retorno.dados; | |
1987 | + } | |
1988 | + if ($i("i3GEOlegendaitensValorQuartil")) { | |
1989 | + $i("i3GEOlegendaitensValorQuartil").innerHTML = retorno.dados; | |
1990 | + } | |
1991 | + }, | |
1992 | + "", | |
1993 | + "", | |
1994 | + "", | |
1995 | + "", | |
1996 | + "form-control" | |
1997 | + ); | |
2460 | 1998 | }, |
2461 | 1999 | parametrosAuto : function() { |
2462 | 2000 | i3GEOF.legenda.aguarde.visibility = "visible"; |
2463 | 2001 | var p = i3GEO.configura.locaplic+"/ferramentas/legenda/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=parametrosauto&tema=" + i3GEOF.legenda.tema, |
2464 | - cp = new cpaint(), | |
2465 | - temp = function(retorno){ | |
2466 | - try{ | |
2467 | - if(retorno.data !== ""){ | |
2468 | - $i("i3GEOlegendaAutocolunas").innerHTML = retorno.data.colunas; | |
2469 | - $i("i3GEOlegendaAutoclassesitem").value = retorno.data.classesitem; | |
2470 | - $i("i3GEOlegendaAutoclassesnome").value = retorno.data.classesnome; | |
2471 | - $i("i3GEOlegendaAutoclassescor").value = retorno.data.classescor; | |
2472 | - $i("i3GEOlegendaAutoclassessimbolo").value = retorno.data.classessimbolo; | |
2473 | - $i("i3GEOlegendaAutoclassestamanho").value = retorno.data.classestamanho; | |
2474 | - $i("i3GEOlegendaAutopalletefile").value = retorno.data.palletefile; | |
2475 | - $i("i3GEOlegendaAutopalletestep").value = retorno.data.palletestep; | |
2476 | - } | |
2477 | - i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2478 | - }catch(e){ | |
2479 | - i3GEO.janela.tempoMsg("Erro. "+e); | |
2480 | - i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2002 | + cp = new cpaint(), | |
2003 | + temp = function(retorno){ | |
2004 | + try{ | |
2005 | + if(retorno.data !== ""){ | |
2006 | + $i("i3GEOlegendaAutocolunas").innerHTML = retorno.data.colunas; | |
2007 | + $i("i3GEOlegendaAutoclassesitem").value = retorno.data.classesitem; | |
2008 | + $i("i3GEOlegendaAutoclassesnome").value = retorno.data.classesnome; | |
2009 | + $i("i3GEOlegendaAutoclassescor").value = retorno.data.classescor; | |
2010 | + $i("i3GEOlegendaAutoclassessimbolo").value = retorno.data.classessimbolo; | |
2011 | + $i("i3GEOlegendaAutoclassestamanho").value = retorno.data.classestamanho; | |
2012 | + $i("i3GEOlegendaAutopalletefile").value = retorno.data.palletefile; | |
2013 | + $i("i3GEOlegendaAutopalletestep").value = retorno.data.palletestep; | |
2481 | 2014 | } |
2482 | - }; | |
2015 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2016 | + }catch(e){ | |
2017 | + i3GEO.janela.tempoMsg("Erro. "+e); | |
2018 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2019 | + } | |
2020 | + }; | |
2483 | 2021 | cp.set_response_type("JSON"); |
2484 | 2022 | cp.call(p,"foo",temp); |
2485 | 2023 | }, |
... | ... | @@ -2489,23 +2027,23 @@ i3GEOF.legenda = |
2489 | 2027 | } |
2490 | 2028 | i3GEOF.legenda.aguarde.visibility = "visible"; |
2491 | 2029 | var temp, |
2492 | - p, | |
2493 | - cp; | |
2030 | + p, | |
2031 | + cp; | |
2494 | 2032 | temp = function(){ |
2495 | 2033 | i3GEOF.legenda.aguarde.visibility = "hidden"; |
2496 | 2034 | i3GEOF.legenda.aposAlterarLegenda(); |
2497 | 2035 | }; |
2498 | 2036 | p = i3GEO.configura.locaplic+"/ferramentas/legenda/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=salvaparametrosauto&tema=" + i3GEOF.legenda.tema |
2499 | - + "&classesitem=" + $i("i3GEOlegendaAutoclassesitem").value | |
2500 | - + "&classesnome=" + $i("i3GEOlegendaAutoclassesnome").value | |
2501 | - + "&classescor=" + $i("i3GEOlegendaAutoclassescor").value | |
2502 | - + "&classessimbolo=" + $i("i3GEOlegendaAutoclassessimbolo").value | |
2503 | - + "&classestamanho=" + $i("i3GEOlegendaAutoclassestamanho").value | |
2504 | - + "&palletefile=" + $i("i3GEOlegendaAutopalletefile").value | |
2505 | - + "&palletestep=" + $i("i3GEOlegendaAutopalletestep").value; | |
2037 | + + "&classesitem=" + $i("i3GEOlegendaAutoclassesitem").value | |
2038 | + + "&classesnome=" + $i("i3GEOlegendaAutoclassesnome").value | |
2039 | + + "&classescor=" + $i("i3GEOlegendaAutoclassescor").value | |
2040 | + + "&classessimbolo=" + $i("i3GEOlegendaAutoclassessimbolo").value | |
2041 | + + "&classestamanho=" + $i("i3GEOlegendaAutoclassestamanho").value | |
2042 | + + "&palletefile=" + $i("i3GEOlegendaAutopalletefile").value | |
2043 | + + "&palletestep=" + $i("i3GEOlegendaAutopalletestep").value; | |
2506 | 2044 | |
2507 | 2045 | cp = new cpaint(); |
2508 | 2046 | cp.set_response_type("JSON"); |
2509 | 2047 | cp.call(p,"foo",temp); |
2510 | 2048 | } |
2511 | - }; | |
2512 | 2049 | \ No newline at end of file |
2050 | +}; | |
2513 | 2051 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,238 @@ |
1 | +<div class='form-group condensed'> | |
2 | + <div class="input-group"> | |
3 | + <div class='form-group label-fixed'> | |
4 | + <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("outlinecolor","i3GEOlegendaoutlinecolor")' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
5 | + <span class="material-icons">flash_on</span> | |
6 | + </button> | |
7 | + <label class="control-label" style="max-width: 90%;" for="i3GEOlegendaoutlinecolor">{{{corContorno}}}</label> | |
8 | + <input id='i3GEOlegendaoutlinecolor' value='{{{voutlinecolor}}}' class="form-control input-lg i3geoFormIconeAquarela" type='text' /> | |
9 | + </div> | |
10 | + <span class="input-group-btn"> | |
11 | + <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
12 | + <span class="material-icons ">send</span> | |
13 | + </a> | |
14 | + </span> | |
15 | + </div> | |
16 | +</div> | |
17 | + | |
18 | +<div class='form-group condensed'> | |
19 | + <div class="input-group"> | |
20 | + <div class='form-group label-fixed'> | |
21 | + <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("color","i3GEOlegendacolor")' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
22 | + <span class="material-icons">flash_on</span> | |
23 | + </button> | |
24 | + <label class="control-label" style="max-width: 90%;" for="i3GEOlegendacolor">{{{corFrente}}}</label> | |
25 | + <input id='i3GEOlegendacolor' value='{{{vcolor}}}' class="form-control input-lg i3geoFormIconeAquarela" type='text' /> | |
26 | + </div> | |
27 | + <span class="input-group-btn"> | |
28 | + <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
29 | + <span class="material-icons ">send</span> | |
30 | + </a> | |
31 | + </span> | |
32 | + </div> | |
33 | +</div> | |
34 | + | |
35 | +<div class='form-group condensed'> | |
36 | + <div class="input-group"> | |
37 | + <div class='form-group label-fixed'> | |
38 | + <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("backgroundcolor","i3GEOlegendabackgroundcolor")' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
39 | + <span class="material-icons">flash_on</span> | |
40 | + </button> | |
41 | + <label class="control-label" style="max-width: 90%;" for="i3GEOlegendabackgroundcolor">{{{corFundo}}}</label> | |
42 | + <input id='i3GEOlegendabackgroundcolor' value='{{{vbackgroundcolor}}}' class="form-control input-lg i3geoFormIconeAquarela" type='text' /> | |
43 | + </div> | |
44 | + <span class="input-group-btn"> | |
45 | + <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
46 | + <span class="material-icons ">send</span> | |
47 | + </a> | |
48 | + </span> | |
49 | + </div> | |
50 | +</div> | |
51 | + | |
52 | +<div class='form-group condensed'> | |
53 | + <div class="input-group"> | |
54 | + <div class='form-group label-fixed'> | |
55 | + <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("size","i3GEOlegendasizes")' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
56 | + <span class="material-icons">flash_on</span> | |
57 | + </button> | |
58 | + <label class="control-label" style="max-width: 90%;" for="i3GEOlegendasizes">{{{tamanhoEspacamento}}}</label> | |
59 | + <input id='i3GEOlegendasizes' value='{{{vsize}}}' class="form-control input-lg " type='text' /> | |
60 | + <div id='i3GEOlegendaComboSize'></div> | |
61 | + </div> | |
62 | + <span class="input-group-btn"> | |
63 | + <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
64 | + <span class="material-icons ">send</span> | |
65 | + </a> | |
66 | + </span> | |
67 | + </div> | |
68 | +</div> | |
69 | + | |
70 | +<div class='form-group condensed'> | |
71 | + <div class="input-group"> | |
72 | + <div class='form-group label-fixed'> | |
73 | + <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("width","i3GEOlegendawidth")' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
74 | + <span class="material-icons">flash_on</span> | |
75 | + </button> | |
76 | + <label class="control-label" style="max-width: 90%;" for="i3GEOlegendawidth">{{{espessura}}}</label> | |
77 | + <input value='{{{vwidth}}}' id='i3GEOlegendawidth' class="form-control input-lg " type='text' /> | |
78 | + </div> | |
79 | + <span class="input-group-btn"> | |
80 | + <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
81 | + <span class="material-icons ">send</span> | |
82 | + </a> | |
83 | + </span> | |
84 | + </div> | |
85 | +</div> | |
86 | + | |
87 | +<div class='form-group condensed'> | |
88 | + <div class="input-group"> | |
89 | + <div class='form-group label-fixed'> | |
90 | + <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("pattern","i3GEOlegendapattern")' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
91 | + <span class="material-icons">flash_on</span> | |
92 | + </button> | |
93 | + <label class="control-label" style="max-width: 90%;" for="i3GEOlegendapattern">{{{padraoRepeticao}}}</label> | |
94 | + <input value='{{{vpattern}}}' id='i3GEOlegendapattern' class="form-control input-lg " type='text' /> | |
95 | + </div> | |
96 | + <span class="input-group-btn"> | |
97 | + <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
98 | + <span class="material-icons ">send</span> | |
99 | + </a> | |
100 | + </span> | |
101 | + </div> | |
102 | +</div> | |
103 | + | |
104 | +<div class='form-group condensed'> | |
105 | + <div class="input-group"> | |
106 | + <div class='form-group label-fixed'> | |
107 | + <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("opacity","i3GEOlegendaopacidade")' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
108 | + <span class="material-icons">flash_on</span> | |
109 | + </button> | |
110 | + <label class="control-label" style="max-width: 90%;" for="i3GEOlegendaopacidade">{{{opacidade}}}</label> | |
111 | + <input value='{{{vopacity}}}' id='i3GEOlegendaopacidade' class="form-control input-lg " type='text' /> | |
112 | + </div> | |
113 | + <span class="input-group-btn"> | |
114 | + <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
115 | + <span class="material-icons ">send</span> | |
116 | + </a> | |
117 | + </span> | |
118 | + </div> | |
119 | +</div> | |
120 | + | |
121 | +<div class='form-group condensed'> | |
122 | + <div class="input-group"> | |
123 | + <div class='form-group label-fixed'> | |
124 | + <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("angle","i3GEOlegendaangulo")' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
125 | + <span class="material-icons">flash_on</span> | |
126 | + </button> | |
127 | + <label class="control-label" style="max-width: 90%;" for="i3GEOlegendaangulo">{{{angulo}}}</label> | |
128 | + <input value='{{{vangle}}}' id='i3GEOlegendaangulo' class="form-control input-lg " type='text' /> | |
129 | + </div> | |
130 | + <span class="input-group-btn"> | |
131 | + <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
132 | + <span class="material-icons ">send</span> | |
133 | + </a> | |
134 | + </span> | |
135 | + </div> | |
136 | +</div> | |
137 | + | |
138 | +<div class='form-group condensed'> | |
139 | + <div class="input-group"> | |
140 | + <div class='form-group label-fixed'> | |
141 | + <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("symbolscale","i3GEOlegendasymbolscale")' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
142 | + <span class="material-icons">flash_on</span> | |
143 | + </button> | |
144 | + <label class="control-label" style="max-width: 90%;" for="i3GEOlegendasymbolscale">{{{symbolscale}}}</label> | |
145 | + <input value='{{{vsymbolscale}}}' id='i3GEOlegendasymbolscale' class="form-control input-lg " type='text' /> | |
146 | + </div> | |
147 | + <span class="input-group-btn"> | |
148 | + <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
149 | + <span class="material-icons ">send</span> | |
150 | + </a> | |
151 | + </span> | |
152 | + </div> | |
153 | +</div> | |
154 | + | |
155 | +<div class='form-group condensed'> | |
156 | + <div class="input-group"> | |
157 | + <div class='form-group label-fixed'> | |
158 | + <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("minsize","i3GEOlegendaminsize")' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
159 | + <span class="material-icons">flash_on</span> | |
160 | + </button> | |
161 | + <label class="control-label" style="max-width: 90%;" for="i3GEOlegendaminsize">{{{minsize}}}</label> | |
162 | + <input value='{{{vminsize}}}' id='i3GEOlegendaminsize' class="form-control input-lg " type='text' /> | |
163 | + </div> | |
164 | + <span class="input-group-btn"> | |
165 | + <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
166 | + <span class="material-icons ">send</span> | |
167 | + </a> | |
168 | + </span> | |
169 | + </div> | |
170 | +</div> | |
171 | + | |
172 | +<div class='form-group condensed'> | |
173 | + <div class="input-group"> | |
174 | + <div class='form-group label-fixed'> | |
175 | + <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("maxsize","i3GEOlegendamaxsize")' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
176 | + <span class="material-icons">flash_on</span> | |
177 | + </button> | |
178 | + <label class="control-label" style="max-width: 90%;" for="i3GEOlegendamaxsize">{{{maxsize}}}</label> | |
179 | + <input value='{{{vmaxsize}}}' id='i3GEOlegendamaxsize' class="form-control input-lg " type='text' /> | |
180 | + </div> | |
181 | + <span class="input-group-btn"> | |
182 | + <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
183 | + <span class="material-icons ">send</span> | |
184 | + </a> | |
185 | + </span> | |
186 | + </div> | |
187 | +</div> | |
188 | + | |
189 | +<div class='form-group condensed'> | |
190 | + <div class="input-group"> | |
191 | + <div class='form-group label-fixed'> | |
192 | + <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("offsetx","i3GEOlegendaoffsetx")' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
193 | + <span class="material-icons">flash_on</span> | |
194 | + </button> | |
195 | + <label class="control-label" style="max-width: 90%;" for="i3GEOlegendaoffsetx">{{{offsetx}}}</label> | |
196 | + <input value='{{{voffsetx}}}' id='i3GEOlegendaoffsetx' class="form-control input-lg " type='text' /> | |
197 | + </div> | |
198 | + <span class="input-group-btn"> | |
199 | + <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
200 | + <span class="material-icons ">send</span> | |
201 | + </a> | |
202 | + </span> | |
203 | + </div> | |
204 | +</div> | |
205 | + | |
206 | +<div class='form-group condensed'> | |
207 | + <div class="input-group"> | |
208 | + <div class='form-group label-fixed'> | |
209 | + <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("offsety","i3GEOlegendaoffsety")' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
210 | + <span class="material-icons">flash_on</span> | |
211 | + </button> | |
212 | + <label class="control-label" style="max-width: 90%;" for="i3GEOlegendaoffsety">{{{offsety}}}</label> | |
213 | + <input value='{{{voffsety}}}' id='i3GEOlegendaoffsety' class="form-control input-lg " type='text' /> | |
214 | + </div> | |
215 | + <span class="input-group-btn"> | |
216 | + <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
217 | + <span class="material-icons ">send</span> | |
218 | + </a> | |
219 | + </span> | |
220 | + </div> | |
221 | +</div> | |
222 | + | |
223 | +<div class='form-group condensed'> | |
224 | + <div class="input-group"> | |
225 | + <div class='form-group label-fixed'> | |
226 | + <button title='{{{aplicatodos}}}' onclick='i3GEOF.legenda.aplicaTodasClasses("symbolname","i3GEOlegendasymbolname")' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
227 | + <span class="material-icons">flash_on</span> | |
228 | + </button> | |
229 | + <label class="control-label" style="max-width: 90%;" for="i3GEOlegendasymbolname">{{{simbolo}}}</label> | |
230 | + <input value='{{{vsymbolname}}}' id='i3GEOlegendasymbolname' class="form-control input-lg " type='text' /> | |
231 | + </div> | |
232 | + <span class="input-group-btn"> | |
233 | + <a onclick="i3GEOF.legenda.aplicaEstilo();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
234 | + <span class="material-icons ">send</span> | |
235 | + </a> | |
236 | + </span> | |
237 | + </div> | |
238 | +</div> | ... | ... |
... | ... | @@ -0,0 +1,110 @@ |
1 | +<!-- para o caso de vetores --> | |
2 | +<div class="{{{hidden2}}}"> | |
3 | + <button onclick="i3GEOF.legenda.mudaLegenda()" class='btn btn-primary btn-sm btn-raised'>{{{aplicaAlteracao}}}</button> | |
4 | + <button onclick="i3GEOF.legenda.adicionaClasse()" title='{{{adicionaNovaClasse}}}' class='btn btn-primary btn-sm btn-raised'>{{{adicionaClasse}}}</button> | |
5 | + <h5 class="alert alert-info">{{{clicaSimbolo}}}</h5> | |
6 | + <table id="i3GEOlegendalegenda" class="lista8" style="background-color: #89afd4;"> | |
7 | + <tr> | |
8 | + <td> | |
9 | + <button title='{{{inverte}}}' onclick='i3GEOF.legenda.inverteCores()' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
10 | + <span class="material-icons">invert_colors</span> | |
11 | + </button> | |
12 | + </td> | |
13 | + <td style="background-color: white"> | |
14 | + <button title='{{{calculaTamanho}}}' onclick='i3GEOF.legenda.calculaTamanho()' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
15 | + <span class="material-icons">texture</span> | |
16 | + </button> | |
17 | + </td> | |
18 | + <td></td> | |
19 | + <td style="background-color: yellow"> | |
20 | + <button onclick='i3GEOF.legenda.ordenaClasses()' class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
21 | + <span class="material-icons">sort</span> | |
22 | + </button> | |
23 | + <span style="vertical-align: super; margin-left: 3px;">nome</span> | |
24 | + </td> | |
25 | + <td style="background-color: yellow">expressão</td> | |
26 | + <td style="background-color: yellow"></td> | |
27 | + <td style="background-color: yellow">minScale</td> | |
28 | + <td style="background-color: yellow">maxScale</td> | |
29 | + </tr> | |
30 | + {{#linhas}} | |
31 | + <tr id="{{{id}}}{{{idclasse}}}"> | |
32 | + <td> | |
33 | + <button title="{{{cliqueExclui}}}" onclick="i3GEOF.legenda.excluilinhaf('{{{id}}}{{{idclasse}}}')" class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
34 | + <span class="material-icons">delete</span> | |
35 | + </button> | |
36 | + </td> | |
37 | + <td> | |
38 | + <img style="cursor: pointer; width: 30px; height: 25px" title="{{{cliqueAltera}}}" src="{{{imagem}}}" onclick="i3GEOF.legenda.editaSimbolo('i3GEOlegendaid_{{{id}}}')"> | |
39 | + </td> | |
40 | + <td> | |
41 | + <button onclick="i3GEOF.legenda.modificaCor('{{{idclasse}}}')" class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
42 | + <span class="material-icons">palette</span> | |
43 | + </button> | |
44 | + </td> | |
45 | + <td style="padding: 5px;"> | |
46 | + <div class='form-group label-fixed condensed'> | |
47 | + <input id="i3GEOlegendaid_{{{id}}}" style="width: 200px;" value="{{{nome}}}" name="nome" title="{{{novoNome}}}" tabindex="0" class="form-control input-lg" type='text' /> | |
48 | + </div> | |
49 | + </td> | |
50 | + <td style="padding: 5px;"> | |
51 | + <div class='form-group label-fixed condensed'> | |
52 | + <!-- id necessario para o construtor de filtro --> | |
53 | + <input id="i3GEOlegendaid_exp{{{id}}}" style="width: 200px;" value='{{{exp}}}' name="expressao" tabindex="0" class="form-control input-lg" type='text' /> | |
54 | + </div> | |
55 | + </td> | |
56 | + <td> | |
57 | + <button title="{{{editorExp}}}" onclick="i3GEOF.legenda.filtro('i3GEOlegendaid_exp{{{id}}}')" class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
58 | + <span class="material-icons">build</span> | |
59 | + </button> | |
60 | + </td> | |
61 | + <td style="padding: 5px;"> | |
62 | + <div class='form-group label-fixed condensed'> | |
63 | + <input style="width: 100px;" value="{{{minScale}}}" name="minScale" title="{{{txtMinscale}}}" tabindex="0" class="form-control input-lg" type='text' /> | |
64 | + </div> | |
65 | + </td> | |
66 | + <td style="padding: 5px;"> | |
67 | + <div class='form-group label-fixed condensed'> | |
68 | + <input style="width: 100px;" value="{{{maxScale}}}" name="maxScale" title="{{{txtMaxscale}}}" tabindex="0" class="form-control input-lg" type='text' /> | |
69 | + </div> | |
70 | + </td> | |
71 | + <td> | |
72 | + <button title="{{{sobe}}}" onclick="i3GEOF.legenda.sobelinhaf('{{{idclasse}}}')" class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
73 | + <span class="material-icons">arrow_drop_up</span> | |
74 | + </button> | |
75 | + </td> | |
76 | + <td> | |
77 | + <button title="{{{desce}}}" onclick="i3GEOF.legenda.descelinhaf('{{{idclasse}}}')" class="btn btn-xs" style="margin: 2px; padding: 2px;"> | |
78 | + <span class="material-icons">arrow_drop_down</span> | |
79 | + </button> | |
80 | + </td> | |
81 | + </tr> | |
82 | + {{/linhas}} | |
83 | + </table> | |
84 | +</div> | |
85 | +<!-- para o caso de imagens --> | |
86 | +<div class="{{{hidden1}}}"> | |
87 | + <button onclick="i3GEOF.legenda.aplicaProcessos()" class='btn btn-primary btn-sm btn-raised'>{{{aplicaProcesso}}}</button> | |
88 | + <div class='form-group condensed'> | |
89 | + <label class="control-label">{{{selecionaProcesso}}}</label> | |
90 | + <select class="form-control" onchange="i3GEOF.legenda.adicionaProcesso(this)"> | |
91 | + <option value=''></option> | |
92 | + <option value='SCALE='>{{{escalaCores}}}</option> | |
93 | + <option value='RESAMPLE='>{{{reamostragem}}}</option> | |
94 | + <option value='BANDS='>{{{bandas}}}</option> | |
95 | + <option value='COLOR_MATCH_THRESHOLD='>Threshold</option> | |
96 | + <option value='NODATA='>Nodata</option> | |
97 | + </select> | |
98 | + </div> | |
99 | + <br> | |
100 | + <h5>{{{existentes}}}</h5> | |
101 | + <div id=i3GEOlegendaprocessos> | |
102 | + {{#processos}} | |
103 | + <div class='form-group label-fixed condensed'> | |
104 | + <input value="{{{value}}}" tabindex="0" class="form-control input-lg" type='text' /> | |
105 | + </div> | |
106 | + {{/processos}} | |
107 | + </div> | |
108 | + <h5 class="alert alert-info">{{{ajuda1}}}</h5> | |
109 | + <h5 class="alert alert-info">{{{adicionaProcesso}}}</h5> | |
110 | +</div> | |
0 | 111 | \ No newline at end of file | ... | ... |
ferramentas/legenda/template_mst.html
1 | -<div class='yui-navset' style='top: 0px; cursor: pointer; left: 0px;'> | |
1 | +<!-- Guias --> | |
2 | +<div class='yui-navset' style='top: 0px; cursor: pointer; margin-left: 2px;'> | |
2 | 3 | <ul class='yui-nav' style='border-width: 0pt 0pt 0px; border-color: rgb(240, 240, 240); border-bottom-color: white;'> |
3 | 4 | <li> |
4 | 5 | <div id='i3GEOlegendaguia6' style='text-align: center; left: 0px;'> |
5 | - <a> | |
6 | - <em><img class='ticPropriedades2' style='height: 14px' title='{{{propriedades}}}' src='{{{locaplic}}}/imagens/branco.gif'> </em> | |
6 | + <a title='{{{propriedades}}}'> | |
7 | + <em><span class="material-icons">settings</span></em> | |
7 | 8 | </a> |
8 | 9 | </div> |
9 | 10 | </li> |
... | ... | @@ -20,7 +21,6 @@ |
20 | 21 | <em>{{{classes}}}</em> |
21 | 22 | </a> |
22 | 23 | </div> |
23 | - | |
24 | 24 | </li> |
25 | 25 | <li> |
26 | 26 | <div id='i3GEOlegendaguia3' style='text-align: center; left: 0px;'> |
... | ... | @@ -59,353 +59,343 @@ |
59 | 59 | </li> |
60 | 60 | </ul> |
61 | 61 | </div> |
62 | -<br> | |
63 | -<div id='i3GEOlegendaguia8obj' style='width: 99%; text-align: left;'> | |
64 | - <p class='paragrafo'>{{{colunasTxt}}}:</p> | |
65 | - <div id="i3GEOlegendaAutocolunas"> | |
62 | +<!--- Propriedades --> | |
63 | +<div id='i3GEOlegendaguia6obj' class="container-fluid" style="max-width: 500px;"> | |
64 | + | |
65 | + <button onclick="i3GEOF.legenda.adicionaConta()" class='btn btn-primary btn-sm btn-block btn-raised'>{{{incluiNumeroOcorrencia}}}</button> | |
66 | + <button onclick="i3GEOF.legenda.i3GEOF.legenda.adicionaOpacidade()" title='{{{aplicaOpacidade}}}' class='btn btn-primary btn-sm btn-block btn-raised'>{{{aplicaOpacidadeVariavel}}}</button> | |
67 | + <button onclick="i3GEOF.legenda.i3GEOF.legenda.janelaCorRamp()" title='{{{variaCoresExtremos}}}' class='btn btn-primary btn-sm btn-block btn-raised'>{{{escolhePaletaCores}}}</button> | |
68 | + <div class="checkbox text-left"> | |
69 | + <label> | |
70 | + <input checked type="checkbox" id="i3GEOFlegendamostra" onclick="i3GEO.tema.invertestatuslegenda(i3GEOF.legenda.tema);"> | |
71 | + <span class="checkbox-material noprint"> | |
72 | + <span class="check"></span> | |
73 | + </span> | |
74 | + {{{mostraClassesLegenda}}} | |
75 | + </label> | |
66 | 76 | </div> |
67 | - <br> | |
68 | - <p class='paragrafo'>{{{autoClasses}}}</p> | |
69 | - <br> | |
70 | - <p class='paragrafo'>{{{classesitem}}}:</p> | |
71 | - <div class='styled-select'> | |
72 | - <input type='text' id='i3GEOlegendaAutoclassesitem' value='' /> | |
77 | + <div class="form-group label-fixed"> | |
78 | + <label class="control-label" for="i3GEOlegendaImg">{{{legendaImg}}}</label> | |
79 | + <div class="input-group"> | |
80 | + <input id="i3GEOlegendaImg" class="form-control" type="text" value=""> | |
81 | + <span class="input-group-btn"> | |
82 | + <a onclick="i3GEOF.legenda.aplicarLegendaImg();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
83 | + <span class="material-icons ">send</span> | |
84 | + </a> | |
85 | + </span> | |
86 | + </div> | |
73 | 87 | </div> |
74 | - <br> | |
75 | - <p class='paragrafo'>{{{classesnome}}}:</p> | |
76 | - <div class='styled-select'> | |
77 | - <input type='text' id='i3GEOlegendaAutoclassesnome' value='' /> | |
88 | + | |
89 | + <div class="form-group label-fixed"> | |
90 | + <label class="control-label" for="i3GEOlegendaImg">{{{offsite}}}</label> | |
91 | + <div class="input-group"> | |
92 | + <input id="i3GEOoffsite" class="form-control i3geoFormIconeAquarela" type="text" value="-1,-1,-1"> | |
93 | + <span class="input-group-btn"> | |
94 | + <a onclick="i3GEOF.legenda.aplicarOffsite();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
95 | + <span class="material-icons ">send</span> | |
96 | + </a> | |
97 | + </span> | |
98 | + </div> | |
78 | 99 | </div> |
79 | - <br> | |
80 | - <p class='paragrafo'>{{{classescor}}}:</p> | |
81 | - <div class='styled-select'> | |
82 | - <input type='text' id='i3GEOlegendaAutoclassescor' value='' /> | |
100 | + | |
101 | + <div class="form-group label-fixed"> | |
102 | + <label class="control-label" for="i3GEOlegendaImg">{{{geraCores}}}</label> | |
103 | + <br> | |
104 | + {{{de}}} | |
105 | + <input class="form-control i3geoFormIconeAquarela" style="display: inline; width: 150px;" id="i3GEOlegendaacori" size="10" value="0,0,0" type="text"> | |
106 | + {{{ate}}} | |
107 | + <input class="form-control i3geoFormIconeAquarela" style="display: inline; width: 150px;" id="i3GEOlegendaacorf" size="10" value="255,255,255" type="text"> | |
108 | + | |
109 | + <span class="input-group-btn" style="display: inline;"> | |
110 | + <a title='{{{aplicaVariaCores}}}' onclick="i3GEOF.legenda.paleta();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
111 | + <span class="material-icons ">send</span> | |
112 | + </a> | |
113 | + </span> | |
83 | 114 | </div> |
84 | - <br> | |
85 | - <p class='paragrafo'>{{{classessimbolo}}}:</p> | |
86 | - <div class='styled-select'> | |
87 | - <input type='text' id='i3GEOlegendaAutoclassessimbolo' value='' /> | |
115 | +</div> | |
116 | +<!-- listagem das classes ver templateLista_mst.html --> | |
117 | +<div id='i3GEOlegendaguia1obj' class="container-fluid"></div> | |
118 | + | |
119 | +<!-- Classificacao --> | |
120 | +<div id='i3GEOlegendaguia2obj' class="container-fluid"> | |
121 | + <div class="checkbox text-left"> | |
122 | + <label> | |
123 | + <input checked id='i3GEOFlegendaaplicaextent' type="checkbox" onclick=""> | |
124 | + <span class="checkbox-material noprint"> | |
125 | + <span class="check"></span> | |
126 | + </span> | |
127 | + {{{consideraElementosVisisveis}}} | |
128 | + </label> | |
88 | 129 | </div> |
89 | - <br> | |
90 | - <p class='paragrafo'>{{{classestamanho}}}:</p> | |
91 | - <div class='styled-select'> | |
92 | - <input type='text' id='i3GEOlegendaAutoclassestamanho' value='' /> | |
130 | + <div class='form-group label-floating'> | |
131 | + <label class="control-label" for="{{{idjanela}}}i3GEOtabelaexcestat">{{{ignoraValores}}}</label> | |
132 | + <input class="form-control input-lg" type='text' id='i3GEOlegendaignorar' value='' /> | |
93 | 133 | </div> |
94 | - <br> | |
95 | - <p class='paragrafo'>{{{palletefile}}}:</p> | |
96 | - <div class='styled-select'> | |
97 | - <input type='text' id='i3GEOlegendaAutopalletefile' value='' /> | |
134 | + | |
135 | + <hr /> | |
136 | + | |
137 | + <h5>{{{alteraGeom}}}</h5> | |
138 | + <div class='form-group condensed'> | |
139 | + <label class="control-label" for="i3GEOlegentaTipoGeo">{{{transformaGeom}}}</label> | |
140 | + <div class="input-group"> | |
141 | + <select class="form-control" id='i3GEOlegentaTipoGeo'> | |
142 | + <option value=''>{{{semTransformacao}}}</option> | |
143 | + <option value='centroid'>{{{centroide}}}</option> | |
144 | + <option value='bbox'>box</option> | |
145 | + <option value='vertices'>{{{vertices}}}</option> | |
146 | + <option value='start'>{{{verticeInicial}}}</option> | |
147 | + <option value='end'>{{{verticeFinal}}}</option> | |
148 | + </select> | |
149 | + <span class="input-group-btn"> | |
150 | + <a onclick="i3GEOF.legenda.alteraGeometriaTema();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
151 | + <span class="material-icons ">send</span> | |
152 | + </a> | |
153 | + </span> | |
154 | + </div> | |
98 | 155 | </div> |
99 | - <br> | |
100 | - <p class='paragrafo'>{{{palletestep}}}:</p> | |
101 | - <div class='styled-select'> | |
102 | - <input type='text' id='i3GEOlegendaAutopalletestep' value='' /> | |
156 | + | |
157 | + <hr /> | |
158 | + | |
159 | + <h5>{{{alteraTipo}}}</h5> | |
160 | + <div class='form-group condensed'> | |
161 | + <div class="input-group"> | |
162 | + <label class="control-label">{{{alteraTipoGeom}}}</label> | |
163 | + <span class="input-group-btn"> | |
164 | + <a onclick="i3GEOF.legenda.representacao();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
165 | + <span class="material-icons ">send</span> | |
166 | + </a> | |
167 | + </span> | |
168 | + </div> | |
169 | + </div> | |
170 | + | |
171 | + <hr /> | |
172 | + | |
173 | + <h5>{{{simboloUnico}}}</h5> | |
174 | + <div class='form-group condensed'> | |
175 | + <div class="input-group"> | |
176 | + <label class="control-label">{{{todosElementosUnicoSimbolo}}}</label> | |
177 | + <span class="input-group-btn"> | |
178 | + <a onclick="i3GEOF.legenda.simbU();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
179 | + <span class="material-icons ">send</span> | |
180 | + </a> | |
181 | + </span> | |
182 | + </div> | |
183 | + </div> | |
184 | + | |
185 | + <hr /> | |
186 | + | |
187 | + <h5>{{{valorUnico}}}</h5> | |
188 | + <div class='form-group condensed'> | |
189 | + <label class="control-label">{{{cadaOcorrenciaUnicoSimbolo}}}</label> | |
190 | + <div class="input-group"> | |
191 | + <div id='i3GEOlegendaitensValorUnico'></div> | |
192 | + </div> | |
193 | + </div> | |
194 | + <div class='form-group condensed'> | |
195 | + <label class="control-label">{{{nomeClassesUnicoSimbolo}}}</label> | |
196 | + <div class="input-group"> | |
197 | + <div id='i3GEOlegendaClassesValorUnico'></div> | |
198 | + <span class="input-group-btn"> | |
199 | + <a onclick="i3GEOF.legenda.valorU();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
200 | + <span class="material-icons ">send</span> | |
201 | + </a> | |
202 | + </span> | |
203 | + </div> | |
204 | + </div> | |
205 | + | |
206 | + <hr /> | |
207 | + | |
208 | + <h5>{{{classesFixas}}}</h5> | |
209 | + <div class='form-group condensed'> | |
210 | + <label class="control-label">{{{criaClassesItemNumerico}}}</label> | |
211 | + <div class="input-group"> | |
212 | + <div id='i3GEOlegendaitensValorClass'></div> | |
213 | + </div> | |
214 | + </div> | |
215 | + <div class='form-group label-floating'> | |
216 | + <label class="control-label" for="i3GEOlegendanclasses">{{{numeroClasses}}}</label> | |
217 | + <input class="form-control input-lg" type='text' id='i3GEOlegendanclasses' value='5' /> | |
218 | + </div> | |
219 | + <h5>{{{tipoCalculo}}}</h5> | |
220 | + <button onclick="i3GEOF.legenda.valorC()" class='btn btn-primary btn-sm btn-raised'>{{{intervalosIguais}}}</button> | |
221 | + <button onclick="i3GEOF.legenda.valorQN()" class='btn btn-primary btn-sm btn-raised'>{{{quebrasNaturais}}}</button> | |
222 | + <button onclick="i3GEOF.legenda.valorQu()" class='btn btn-primary btn-sm btn-raised'>{{{calcularQuantil}}}</button> | |
223 | + | |
224 | + <hr /> | |
225 | + | |
226 | + <h5>{{{metade}}}</h5> | |
227 | + <div class='form-group condensed'> | |
228 | + <label class="control-label">{{{duasmetades}}}</label> | |
229 | + <div class="input-group"> | |
230 | + <div id='i3GEOlegendaitensMetade'></div> | |
231 | + </div> | |
232 | + </div> | |
233 | + <div class='form-group condensed'> | |
234 | + <label class="control-label">{{{iunico}}}</label> | |
235 | + <div class="input-group"> | |
236 | + <div id='i3GEOlegendaitensMetadeId'></div> | |
237 | + <span class="input-group-btn"> | |
238 | + <a onclick="i3GEOF.legenda.metade();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
239 | + <span class="material-icons ">send</span> | |
240 | + </a> | |
241 | + </span> | |
242 | + </div> | |
243 | + </div> | |
244 | + | |
245 | + <hr /> | |
246 | + | |
247 | + <h5>{{{media}}}</h5> | |
248 | + <div class='form-group condensed'> | |
249 | + <label class="control-label">{{{duasmedias}}}</label> | |
250 | + <div class="input-group"> | |
251 | + <div id='i3GEOlegendaitensMedia'></div> | |
252 | + <span class="input-group-btn"> | |
253 | + <a onclick="i3GEOF.legenda.media();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
254 | + <span class="material-icons ">send</span> | |
255 | + </a> | |
256 | + </span> | |
257 | + </div> | |
258 | + </div> | |
259 | + | |
260 | + <hr /> | |
261 | + | |
262 | + <h5>{{{calcularQuartil}}}</h5> | |
263 | + <div class='form-group condensed'> | |
264 | + <label class="control-label">{{{criaQuartis}}}</label> | |
265 | + <div class="input-group"> | |
266 | + <div id='i3GEOlegendaitensValorQuartil'></div> | |
267 | + </div> | |
268 | + </div> | |
269 | + <div class='form-group condensed'> | |
270 | + <label class="control-label">{{{estiloNomeClasses}}}</label> | |
271 | + <div class="input-group"> | |
272 | + <select class="form-control" id='estiloClassesQuartis'> | |
273 | + <option value='minimo'>{{{soValores}}}</option> | |
274 | + <option value='simples'>{{{quartilValores}}}</option> | |
275 | + <option value='completo'>{{{expressaoCompleta}}}</option> | |
276 | + </select> | |
277 | + <span class="input-group-btn"> | |
278 | + <a onclick="i3GEOF.legenda.valorQ();return false;" role="button" type="button" class="btn btn-primary btn-fab btn-fab-max" href="javascript:void(0)"> | |
279 | + <span class="material-icons ">send</span> | |
280 | + </a> | |
281 | + </span> | |
282 | + </div> | |
103 | 283 | </div> |
104 | - <br> | |
105 | - <p class='paragrafo'> | |
106 | - <input id='i3GEOlegendabotaoAplicarAuto' size='35' type='button' value='{{{aplicar}}}'> | |
107 | - </p> | |
108 | 284 | <br> |
109 | 285 | </div> |
110 | -<div id='i3GEOlegendaguia7obj' style='width: 99%; text-align: left;'> | |
111 | - <p class='paragrafo'>{{{ClusterMaxdistance}}}:</p> | |
112 | - <div class='i3geoForm i3geoFormIconeNumero'> | |
113 | - <input type='number' id='i3GEOlegendaClusterMaxdistance' value='5' /> | |
286 | +<!-- editor de simbolos --> | |
287 | +<div id='i3GEOlegendaguia3obj' class="container-fluid"> | |
288 | + <h5>{{{etiquetasClasse}}}</h5> | |
289 | + <div class='form-group condensed'> | |
290 | + <label class="control-label" for="i3GEOlegendaitensLabel">{{{itemComTexto}}}</label> | |
291 | + <div class="input-group"> | |
292 | + <div id='i3GEOlegendaitensLabel'></div> | |
293 | + </div> | |
114 | 294 | </div> |
115 | - <br> | |
116 | - <p class='paragrafo'>{{{ClusterBuffer}}}:</p> | |
117 | - <div class='i3geoForm i3geoFormIconeNumero'> | |
118 | - <input type='number' id='i3GEOlegendaClusterBuffer' value='0' /> | |
295 | + <button onclick="i3GEOF.legenda.excluiLabels()" class='btn btn-primary btn-sm btn-raised'>{{{removeLabels}}}</button> | |
296 | + <button onclick="i3GEOF.legenda.incluirLabels()" class='btn btn-primary btn-sm btn-raised'>{{{aplicar}}}</button> | |
297 | + <button onclick="i3GEOF.legenda.propriedadesLabels()" class='btn btn-primary btn-sm btn-raised'>{{{propriedades2}}}</button> | |
298 | + | |
299 | + <hr /> | |
300 | + | |
301 | + <h5>{{{estilos}}}</h5> | |
302 | + | |
303 | + <div class='form-group condensed'> | |
304 | + <label class="control-label" for="i3GEOlegendaestilos">{{{estiloEdicao}}}</label> | |
305 | + <div class="input-group" style="width:150px;"> | |
306 | + <div id='i3GEOlegendacomboestilos'></div> | |
307 | + </div> | |
119 | 308 | </div> |
120 | - <br> | |
121 | - <p class='paragrafo'>{{{ClusterFilter}}}:</p> | |
122 | - <div class='i3geoForm i3geoFormIconeNumero'> | |
123 | - <input type='text' id='i3GEOlegendaClusterFilter' value='' /> | |
309 | + <button onclick="i3GEOF.legenda.excluiEstilo()" class='btn btn-primary btn-sm btn-raised'>{{{exclui}}}</button> | |
310 | + <button onclick="i3GEOF.legenda.adicionaEstilo()" class='btn btn-primary btn-sm btn-raised'>{{{adiciona}}}</button> | |
311 | + <button onclick="i3GEOF.legenda.sobeEstilo()" class='btn btn-primary btn-sm btn-raised'>{{{sobe}}}</button> | |
312 | + <button onclick="i3GEOF.legenda.desceEstilo()" class='btn btn-primary btn-sm btn-raised'>{{{desce}}}</button> | |
313 | + | |
314 | + <hr /> | |
315 | + | |
316 | + <h5>{{{edicaoEstilo}}}</h5> | |
317 | + <h5>{{{ajudaEstilo}}}</h5> | |
318 | + <div id='i3GEOlegendaParametrosEstilos' ></div> | |
319 | + <div style='position: relative; top: 0px; left: 0px; text-align: left;' id='i3GEOlegendamostraEstilo'></div> | |
320 | + <div style='position: relative; top: 0px; left: 0px; text-align: left;' id='i3GEOlegendasimbolos'></div> | |
321 | +</div> | |
322 | + | |
323 | +<!-- graficos --> | |
324 | +<div id='i3GEOlegendaguia4obj' class="container-fluid"></div> | |
325 | + | |
326 | +<!-- SLD --> | |
327 | +<div id='i3GEOlegendaguia5obj' class="container-fluid"> | |
328 | + <h5>{{{geraSLD}}} <a href='http://mapserver.org/ogc/sld.html#sld' target='_blank'> Mapserver SLD </a> {{{ajudaSLD}}}</h5> | |
329 | + <button onclick="i3GEOF.legenda.slde()" class='btn btn-primary btn-sm btn-raised'>{{{exportaSLD}}}</button> | |
330 | + <h5>{{{msgAplicaSLD}}}</h5> | |
331 | + <button onclick="i3GEOF.legenda.sldi()" class='btn btn-primary btn-sm btn-raised'>{{{aplicaSLD}}}</button> | |
332 | +</div> | |
333 | + | |
334 | +<!-- cluster --> | |
335 | +<div id='i3GEOlegendaguia7obj' class="container-fluid"> | |
336 | + <h5>{{{clusterAjuda}}}</h5> | |
337 | + <div class='form-group label-fixed' > | |
338 | + <label class="control-label" for="i3GEOlegendaClusterMaxdistance">{{{ClusterMaxdistance}}}</label> | |
339 | + <input class="form-control input-lg" type='text' id='i3GEOlegendaClusterMaxdistance' value='5' /> | |
124 | 340 | </div> |
125 | - <br> | |
126 | - <p class='paragrafo'>{{{ClusterRegion}}}</p> | |
127 | - <div class='styled-select'> | |
128 | - <select id='i3GEOlegendaClusterRegion'> | |
341 | + <div class='form-group label-fixed' > | |
342 | + <label class="control-label" for="i3GEOlegendaClusterBuffer">{{{ClusterBuffer}}}</label> | |
343 | + <input class="form-control input-lg" type='text' id='i3GEOlegendaClusterBuffer' value='0' /> | |
344 | + </div> | |
345 | + <div class='form-group label-fixed' > | |
346 | + <label class="control-label" for="i3GEOlegendaClusterFilter">{{{ClusterFilter}}}</label> | |
347 | + <input class="form-control input-lg" type='text' id='i3GEOlegendaClusterFilter' value='' /> | |
348 | + </div> | |
349 | + <div class='form-group label-fixed' > | |
350 | + <label class="control-label" for="i3GEOlegendaClusterRegion">{{{ClusterRegion}}}</label> | |
351 | + <select class="form-control" id='i3GEOlegendaClusterRegion'> | |
129 | 352 | <option value='rectangle'>rectangle</option> |
130 | 353 | <option value='ellipse'>ellipse</option> |
131 | 354 | </select> |
132 | 355 | </div> |
133 | - <br> | |
134 | - <p class='paragrafo'>{{{ClusterGroup}}}</p> | |
135 | - <div id='i3GEOlegendaitensCluster' class='styled-select'></div> | |
136 | - <br> | |
137 | - <p class='paragrafo'> | |
138 | - <input id='i3GEOlegendabotaoAplicarCluster' size='35' type='button' value='{{{aplicar}}}'> | |
139 | - </p> | |
140 | - <br> | |
141 | - <p class='paragrafo'> | |
142 | - <input id='i3GEOlegendabotaoRemoverCluster' size='35' type='button' value='{{{remover}}}'> | |
143 | - </p> | |
144 | -</div> | |
145 | -<div id='i3GEOlegendaguia6obj' style='width: 99%; text-align: left;'> | |
146 | - <p class='paragrafo'> | |
147 | - | |
148 | - <input type='checkbox' onclick='' checked id='i3GEOFlegendamostra' style='cursor: pointer; border: 0px solid white;' /> | |
149 | - <span style='cursor: pointer; position: relative; top: -2px;'>{{{mostraClassesLegenda}}}</span> | |
150 | - </p> | |
151 | - <br> | |
152 | - <p class='paragrafo'>{{{legendaImg}}}</p> | |
153 | - <table summary='' class='lista6'> | |
154 | - <tr> | |
155 | - <td> | |
156 | - <div class="styled-select"> | |
157 | - <input id="i3GEOlegendaImg" value="" type="text"> | |
158 | - </div> | |
159 | - </td> | |
160 | - <td> | |
161 | - <input id='i3GEOlegendabotaoImagemLegenda' type='button' size='15' value='{{{aplica}}}' /> | |
162 | - </td> | |
163 | - </tr> | |
164 | - </table> | |
165 | - <br> | |
166 | - <p class='paragrafo'>{{{offsite}}}</p> | |
167 | - <table summary='' class='lista6'> | |
168 | - <tr> | |
169 | - <td> | |
170 | - <div class='i3geoForm100 i3geoFormIconeAquarela'> | |
171 | - <input type='text' id='i3GEOoffsite' value='-1,-1,-1' /> | |
172 | - </div> | |
173 | - </td> | |
174 | - <td> | |
175 | - <input id='i3GEOlegendabotaoOffsite' type='button' size='15' value='{{{aplica}}}' /> | |
176 | - </td> | |
177 | - </tr> | |
178 | - </table> | |
179 | - <br> | |
180 | - <p class='paragrafo'> | |
181 | - <input id='i3GEOlegendabotao3' type='button' value='{{{incluiNumeroOcorrencia}}}' title='{{{incluiNumeroOcorrencia2}}}' /> | |
182 | - </p> | |
183 | - <p class='paragrafo'> | |
184 | - <input id='i3GEOlegendabotao15' type='button' value='{{{aplicaOpacidadeVariavel}}}' title='{{{aplicaOpacidade}}}' /> | |
185 | - </p> | |
186 | - <p class='paragrafo'> | |
187 | - <input id='i3GEOlegendabotaoRamp' type='button' size='15' value='{{{escolhePaletaCores}}}' title='{{{variaCoresExtremos}}}' /> | |
188 | - </p> | |
189 | - <div style='margin-left: 5px;'> | |
190 | - <p class='paragrafo'>{{{geraCores}}}</p> | |
191 | - <table summary='' class='lista6'> | |
192 | - <tr> | |
193 | - <td>{{{de}}}:</td> | |
194 | - <td> | |
195 | - <div class='i3geoForm100 i3geoFormIconeAquarela'> | |
196 | - <input type='text' id='i3GEOlegendaacori' value='0,0,0' /> | |
197 | - </div> | |
198 | - </td> | |
199 | - <td>{{{ate}}}:</td> | |
200 | - <td> | |
201 | - <div class='i3geoForm100 i3geoFormIconeAquarela'> | |
202 | - <input type='text' id='i3GEOlegendaacorf' value='255,255,255' /> | |
203 | - </div> | |
204 | - </td> | |
205 | - <td> | |
206 | - <input id='i3GEOlegendabotao4' type='button' size='15' value='{{{aplica}}}' title='{{{aplicaVariaCores}}}' /> | |
207 | - </td> | |
208 | - </tr> | |
209 | - </table> | |
356 | + <div class='form-group label-fixed' > | |
357 | + <label class="control-label" for="i3GEOlegendaClusterRegion">{{{ClusterGroup}}}</label> | |
358 | + <div id='i3GEOlegendaitensCluster' ></div> | |
210 | 359 | </div> |
360 | + <button onclick="i3GEOF.legenda.aplicarCluster()" class='btn btn-primary btn-sm btn-raised'>{{{aplicar}}}</button> | |
361 | + <button onclick="i3GEOF.legenda.removerCluster()" class='btn btn-primary btn-sm btn-raised'>{{{remover}}}</button> | |
362 | + | |
211 | 363 | </div> |
212 | -<div id='i3GEOlegendaguia1obj' style='width: 99%; text-align: left;'> | |
213 | - <div style='margin-left: 5px;'> | |
214 | - <table summary='' class='lista5'> | |
215 | - <tr> | |
216 | - <td> | |
217 | - <p class='paragrafo'> | |
218 | - <input id='i3GEOlegendabotao1' size='22' type='button' value='{{{aplicaAlteracao}}}' /> | |
219 | - </p> | |
220 | - </td> | |
221 | - <td> | |
222 | - <p class='paragrafo'> | |
223 | - <input id='i3GEOlegendabotao2' size='22' type='button' value='{{{adicionaClasse}}}' title='{{{adicionaNovaClasse}}}' /> | |
224 | - </p> | |
225 | - </td> | |
226 | - </tr> | |
227 | - </table> | |
228 | - <br> | |
229 | - <p class='paragrafo'>{{{clicaSimbolo}}}</p> | |
230 | - <div id='i3GEOlegendaresultado' style='text-align: left; width: 100%; display: block; left: 0px'></div> | |
364 | +<!--autoclasses--> | |
365 | +<div id='i3GEOlegendaguia8obj' class="container-fluid"> | |
366 | + <h5>{{{autoClasses}}}</h5> | |
367 | + | |
368 | + <h5>{{{colunasTxt}}}</h5> | |
369 | + <div id="i3GEOlegendaAutocolunas"></div> | |
370 | + <div class='form-group label-fixed' > | |
371 | + <label class="control-label" for="i3GEOlegendaClusterFilter">{{{classesitem}}}</label> | |
372 | + <input class="form-control input-lg" type='text' id='i3GEOlegendaAutoclassesitem' value='' /> | |
231 | 373 | </div> |
232 | -</div> | |
233 | -<div id='i3GEOlegendaguia2obj' style='width: 99%; text-align: left;'> | |
234 | - <div style='margin-left: 5px;'> | |
235 | - <div id='i3GEOFlegendaClassesOpcionais'> | |
236 | - <fieldset style='padding: 5px; margin: 2px;'> | |
237 | - <p class='paragrafo'> | |
238 | - | |
239 | - <input type='checkbox' onclick='' checked id='i3GEOFlegendaaplicaextent' style='cursor: pointer; border: 0px solid white;' /> | |
240 | - <span style='cursor: pointer; position: relative; top: -2px;left: 2px;'>{{{consideraElementosVisisveis}}}</span> | |
241 | - </p> | |
242 | - <p class='paragrafo'>{{{ignoraValores}}}:</p> | |
243 | - <div class='styled-select'> | |
244 | - <input type='text' id='i3GEOlegendaignorar' value='' /> | |
245 | - </div> | |
246 | - </fieldset> | |
247 | - <br> | |
248 | - <fieldset style='padding: 5px; margin: 2px;'> | |
249 | - <legend>{{{alteraGeom}}}</legend> | |
250 | - <p class='paragrafo'>{{{transformaGeom}}}</p> | |
251 | - <div class='styled-select'> | |
252 | - <select id='i3GEOlegentaTipoGeo'> | |
253 | - <option value=''>{{{semTransformacao}}}</option> | |
254 | - <option value='centroid'>{{{centroide}}}</option> | |
255 | - <option value='bbox'>box</option> | |
256 | - <option value='vertices'>{{{vertices}}}</option> | |
257 | - <option value='start'>{{{verticeInicial}}}</option> | |
258 | - <option value='end'>{{{verticeFinal}}}</option> | |
259 | - </select> | |
260 | - </div> | |
261 | - <br> | |
262 | - <p class='paragrafo'> | |
263 | - <input id='i3GEOlegendabotao17' size='35' type='button' value='{{{aplicar}}}'> | |
264 | - </p> | |
265 | - </fieldset> | |
266 | - <br> | |
267 | - <fieldset style='padding: 5px; margin: 2px;'> | |
268 | - <legend>{{{alteraTipo}}}</legend> | |
269 | - <p class='paragrafo'>{{{alteraTipoGeom}}}</p> | |
270 | - <p class='paragrafo'> | |
271 | - <input id='i3GEOlegendabotao7' size='25' type='button' value='{{{aplicar}}}' /> | |
272 | - </p> | |
273 | - </fieldset> | |
274 | - </div> | |
275 | - <br> | |
276 | - <fieldset style='padding: 5px; margin: 2px;'> | |
277 | - <legend>{{{simboloUnico}}}</legend> | |
278 | - <p class='paragrafo'>{{{todosElementosUnicoSimbolo}}}</p> | |
279 | - <p class='paragrafo'> | |
280 | - <input id='i3GEOlegendabotao5' size='25' type='button' value='{{{aplicar}}}' /> | |
281 | - </p> | |
282 | - </fieldset> | |
283 | - <br> | |
284 | - <fieldset style='padding: 5px; margin: 2px;'> | |
285 | - <legend>{{{valorUnico}}}</legend> | |
286 | - <p class='paragrafo'>{{{cadaOcorrenciaUnicoSimbolo}}}</p> | |
287 | - <div id='i3GEOlegendaitensValorUnico' class='styled-select'></div> | |
288 | - <br> | |
289 | - <p class='paragrafo'>{{{nomeClassesUnicoSimbolo}}}</p> | |
290 | - <div id='i3GEOlegendaClassesValorUnico' class='styled-select'></div> | |
291 | - <br> | |
292 | - <p class='paragrafo'> | |
293 | - <input id='i3GEOlegendabotao6' size='25' type='button' value='{{{aplicar}}}' /> | |
294 | - </p> | |
295 | - </fieldset> | |
296 | - <br> | |
297 | - <fieldset style='padding: 5px; margin: 2px;'> | |
298 | - <legend>{{{classes}}}</legend> | |
299 | - <p class='paragrafo'>{{{criaClassesItemNumerico}}}</p> | |
300 | - <div id='i3GEOlegendaitensValorClass' class='styled-select'></div> | |
301 | - <br> | |
302 | - <p class='paragrafo'>{{{numeroClasses}}}:</p> | |
303 | - <div class='i3geoForm i3geoFormIconeNumero'> | |
304 | - <input type='number' id='i3GEOlegendanclasses' value='5' /> | |
305 | - </div> | |
306 | - <br> | |
307 | - <p class='paragrafo'> | |
308 | - <input id='i3GEOlegendabotao8' type='button' value='{{{intervalosIguais}}}' /> | |
309 | - </p> | |
310 | - <p class='paragrafo'> | |
311 | - <input id='i3GEOlegendabotaoQN' type='button' value='{{{quebrasNaturais}}}' /> | |
312 | - </p> | |
313 | - <p class='paragrafo'> | |
314 | - <input id='i3GEOlegendabotaoQuantil' type='button' value='{{{calcularQuantil}}}' /> | |
315 | - </p> | |
316 | - </fieldset> | |
317 | - <br> | |
318 | - <fieldset style='padding: 5px; margin: 2px;'> | |
319 | - <legend>{{{metade}}}</legend> | |
320 | - <p class='paragrafo'>{{{duasmetades}}}</p> | |
321 | - <div id='i3GEOlegendaitensMetade' class='styled-select'></div> | |
322 | - <br> | |
323 | - <p class='paragrafo'>{{{iunico}}}</p> | |
324 | - <div id='i3GEOlegendaitensMetadeId' class='styled-select'></div> | |
325 | - <br> | |
326 | - <p class='paragrafo'> | |
327 | - <input id='i3GEOlegendabotaoMetade' size='25' type='button' value='{{{aplicar}}}' /> | |
328 | - </p> | |
329 | - </fieldset> | |
330 | - <br> | |
331 | - <fieldset style='padding: 5px; margin: 2px;'> | |
332 | - <legend>{{{media}}}</legend> | |
333 | - <p class='paragrafo'>{{{duasmedias}}}</p> | |
334 | - <div id='i3GEOlegendaitensMedia' class='styled-select'></div> | |
335 | - <br> | |
336 | - <p class='paragrafo'> | |
337 | - <input id='i3GEOlegendabotaoMedia' size='25' type='button' value='{{{aplicar}}}' /> | |
338 | - </p> | |
339 | - </fieldset> | |
340 | - <br> | |
341 | - <fieldset style='padding: 5px; margin: 2px;'> | |
342 | - <legend>{{{calcularQuartil}}}</legend> | |
343 | - <p class='paragrafo'>{{{criaQuartis}}}</p> | |
344 | - <div id='i3GEOlegendaitensValorQuartil' class='styled-select'></div> | |
345 | - <br> | |
346 | - <p class='paragrafo'> | |
347 | - <input id='i3GEOlegendabotao9' size='25' type='button' value='{{{aplicar}}}' /> | |
348 | - </p> | |
349 | - <p class='paragrafo'>{{{estiloNomeClasses}}}: | |
350 | - <div class='styled-select'> | |
351 | - <select id='estiloClassesQuartis'> | |
352 | - <option value='minimo'>{{{soValores}}}</option> | |
353 | - <option value='simples'>{{{quartilValores}}}</option> | |
354 | - <option value='completo'>{{{expressaoCompleta}}}</option> | |
355 | - </select> | |
356 | - </div> | |
357 | - </fieldset> | |
358 | - <br> | |
374 | + <div class='form-group label-fixed' > | |
375 | + <label class="control-label" for="i3GEOlegendaAutoclassesnome">{{{classesnome}}}</label> | |
376 | + <input class="form-control input-lg" type='text' id='i3GEOlegendaAutoclassesnome' value='' /> | |
359 | 377 | </div> |
378 | + <div class='form-group label-fixed' > | |
379 | + <label class="control-label" for="i3GEOlegendaAutoclassescor">{{{classescor}}}</label> | |
380 | + <input class="form-control input-lg" type='text' id='i3GEOlegendaAutoclassescor' value='' /> | |
381 | + </div> | |
382 | + <div class='form-group label-fixed' > | |
383 | + <label class="control-label" for="i3GEOlegendaAutoclassessimbolo">{{{classessimbolo}}}</label> | |
384 | + <input class="form-control input-lg" type='text' id='i3GEOlegendaAutoclassessimbolo' value='' /> | |
385 | + </div> | |
386 | + <div class='form-group label-fixed' > | |
387 | + <label class="control-label" for="i3GEOlegendaAutoclassestamanho">{{{classestamanho}}}</label> | |
388 | + <input class="form-control input-lg" type='text' id='i3GEOlegendaAutoclassestamanho' value='' /> | |
389 | + </div> | |
390 | + <div class='form-group label-fixed' > | |
391 | + <label class="control-label" for="i3GEOlegendaAutopalletefile">{{{palletefile}}}</label> | |
392 | + <input class="form-control input-lg" type='text' id='i3GEOlegendaAutopalletefile' value='' /> | |
393 | + </div> | |
394 | + <div class='form-group label-fixed' > | |
395 | + <label class="control-label" for="i3GEOlegendaAutopalletestep">{{{palletestep}}}</label> | |
396 | + <input class="form-control input-lg" type='text' id='i3GEOlegendaAutopalletestep' value='' /> | |
397 | + </div> | |
398 | + <button onclick="i3GEOF.legenda.salvaParametrosAuto()" class='btn btn-primary btn-sm btn-raised'>{{{aplicar}}}</button> | |
360 | 399 | </div> |
361 | -<div id='i3GEOlegendaguia3obj' style='width: 99%; text-align: left;'> | |
362 | - <fieldset style='padding: 5px; margin: 2px;'> | |
363 | - <legend>{{{etiquetasClasse}}}</legend> | |
364 | - <p class='paragrafo'>{{{itemComTexto}}}:</p> | |
365 | - <div class='styled-select' id='i3GEOlegendaitensLabel'></div> | |
366 | - <br> | |
367 | - <p class='paragrafo' style='font-size: 10px;'> | |
368 | - <input id='i3GEOlegendabotaoExcluirLabel' size='10' type='button' value='{{{exclui}}}' /> | |
369 | - <input id='i3GEOlegendabotaoIncluirLabel' size='10' type='button' value='{{{aplicar}}}' /> | |
370 | - <input id='i3GEOlegendabotaoPropriedadeLabel' size='10' type='button' value='{{{propriedades2}}}' /> | |
371 | - </p> | |
372 | - </fieldset> | |
373 | - <br> | |
374 | - <fieldset style='padding: 5px; margin: 2px;'> | |
375 | - <legend>{{{estilos}}}</legend> | |
376 | - <p class='paragrafo' style='font-size: 10px;'>{{{ajudaEstilo}}} | |
377 | - <div id='i3GEOlegendacomboestilos'></div> | |
378 | - <br> | |
379 | - <input id='i3GEOlegendabotao11' class='executar' size='10' type='button' value='{{{exclui}}}' /> | |
380 | - | |
381 | - <input id='i3GEOlegendabotao12' class='executar' size='14' type='button' value='{{{adiciona}}}' /> | |
382 | - | |
383 | - <input id='i3GEOlegendabotao13' class='executar' size='8' type='button' value='{{{sobe}}}' /> | |
384 | - | |
385 | - <input id='i3GEOlegendabotao14' class='executar' size='8' type='button' value='{{{desce}}}' /> | |
386 | - <div id='i3GEOlegendaParametrosEstilos' style='position: relative; top: 10px; left: 0px; text-align: left'></div> | |
387 | - <br> <br> | |
388 | - <!-- | |
389 | - <p class='paragrafo' style='font-size: 10px'> | |
390 | - <input id='i3GEOlegendabotao10' size='35' type='button' value='{{{aplicaAlteracoes}}}' /> | |
391 | - </p> | |
392 | - --> | |
393 | - <div style='position: relative; top: 0px; left: 0px; text-align: left;' id='i3GEOlegendamostraEstilo'></div> | |
394 | - <div style='position: relative; top: 0px; left: 0px; text-align: left;' id='i3GEOlegendasimbolos'></div> | |
395 | - </fieldset> | |
396 | -</div> | |
397 | -<div id='i3GEOlegendaguia4obj' style='width: 99%; text-align: left;'></div> | |
398 | -<div id='i3GEOlegendaguia5obj' style='width: 99%; text-align: left;'> | |
399 | - <p class='paragrafo'> | |
400 | - {{{geraSLD}}} | |
401 | - <a href='http://mapserver.org/ogc/sld.html#sld' target='_blank'> Mapserver SLD </a> | |
402 | - {{{ajudaSLD}}} | |
403 | - <p class='paragrafo'> | |
404 | - <input id='i3GEOlegendabotaoSLDe' size='25' type='button' value='{{{exportaSLD}}}' /> | |
405 | - </p> | |
406 | - <p class='paragrafo'>{{{msgAplicaSLD}}} | |
407 | - <p class='paragrafo'> | |
408 | - <input id='i3GEOlegendabotaoSLDi' size='25' type='button' value='{{{aplicaSLD}}}' /> | |
409 | - </p> | |
410 | -</div> | |
400 | + | |
411 | 401 | <input type='hidden' value='' id='listaColourRamp' onchange='javascript:i3GEOF.legenda.aplicaColourRamp()' /> |
412 | 402 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,24 @@ |
1 | +<?php | |
2 | +include(dirname(__FILE__)."/../blacklist.php"); | |
3 | +verificaBlFerramentas(basename(dirname(__FILE__))); | |
4 | + | |
5 | +/** | |
6 | + * Carrega os programas javascript necessarios para a ferramenta | |
7 | + * Esse programa e usado na tag <script> ou com a funcao scripttag do i3Geo | |
8 | + * Alem de carregar os scripts, carrega tambem o template no formato MUSTACHE, definindo a variavel | |
9 | + * javascript i3GEOF.legenda.MUSTACHE | |
10 | + * O template e substituido pelos valores definidos em index.js no momento da inicializacao da ferramenta | |
11 | + */ | |
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 | 25 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,905 @@ |
1 | +//+$trad(1,i3GEOF.legenda.dicionario)+ | |
2 | +i3GEOF.legenda.dicionario = | |
3 | + { | |
4 | + 'ajuda' : [ | |
5 | + { | |
6 | + pt : "Para acessar o editor, clique em um símbolo na guia <i>Legenda</i>", | |
7 | + en : "", | |
8 | + es : "" | |
9 | + } | |
10 | + ], | |
11 | + 'propriedades' : [ | |
12 | + { | |
13 | + pt : "Propriedades", | |
14 | + en : "", | |
15 | + es : "" | |
16 | + } | |
17 | + ], | |
18 | + "legenda" : [ | |
19 | + { | |
20 | + pt : "Legenda", | |
21 | + en : "", | |
22 | + es : "" | |
23 | + } | |
24 | + ], | |
25 | + "classes" : [ | |
26 | + { | |
27 | + pt : "Classes", | |
28 | + en : "", | |
29 | + es : "" | |
30 | + } | |
31 | + ], | |
32 | + 'editor' : [ | |
33 | + { | |
34 | + pt : "Editor", | |
35 | + en : "", | |
36 | + es : "" | |
37 | + } | |
38 | + ], | |
39 | + 'graficos' : [ | |
40 | + { | |
41 | + pt : "Gráficos", | |
42 | + en : "", | |
43 | + es : "" | |
44 | + } | |
45 | + ], | |
46 | + 'importaExportaSLD' : [ | |
47 | + { | |
48 | + pt : "SLD", | |
49 | + en : "", | |
50 | + es : "" | |
51 | + } | |
52 | + ], | |
53 | + 'mostraClassesLegenda' : [ | |
54 | + { | |
55 | + pt : "Mostra as classes desse tema na legenda do mapa", | |
56 | + en : "", | |
57 | + es : "" | |
58 | + } | |
59 | + ], | |
60 | + 'incluiNumeroOcorrencia' : [ | |
61 | + { | |
62 | + pt : "Inclui número de ocorrências", | |
63 | + en : "", | |
64 | + es : "" | |
65 | + } | |
66 | + ], | |
67 | + 'incluiNumeroOcorrencia2' : [ | |
68 | + { | |
69 | + pt : "incluir o número de ocorrências no nome de cada classe", | |
70 | + en : "", | |
71 | + es : "" | |
72 | + } | |
73 | + ], | |
74 | + 'aplicaOpacidadeVariavel' : [ | |
75 | + { | |
76 | + pt : "Aplica opacidade variável", | |
77 | + en : "", | |
78 | + es : "" | |
79 | + } | |
80 | + ], | |
81 | + 'aplicaOpacidade' : [ | |
82 | + { | |
83 | + pt : "aplicar opacidade nas classes existente, variando de 10 até 100", | |
84 | + en : "", | |
85 | + es : "" | |
86 | + } | |
87 | + ], | |
88 | + 'escolhePaletaCores' : [ | |
89 | + { | |
90 | + pt : "Escolher paleta de cores", | |
91 | + en : "", | |
92 | + es : "" | |
93 | + } | |
94 | + ], | |
95 | + 'variaCoresExtremos' : [ | |
96 | + { | |
97 | + pt : "escolher e aplicar as variações de cores, entre dois extremos, nas classes existentes", | |
98 | + en : "", | |
99 | + es : "" | |
100 | + } | |
101 | + ], | |
102 | + 'geraCores' : [ | |
103 | + { | |
104 | + pt : "Gerar cores", | |
105 | + en : "", | |
106 | + es : "" | |
107 | + } | |
108 | + ], | |
109 | + 'ate' : [ | |
110 | + { | |
111 | + pt : "até", | |
112 | + en : "", | |
113 | + es : "" | |
114 | + } | |
115 | + ], | |
116 | + 'de' : [ | |
117 | + { | |
118 | + pt : "de", | |
119 | + en : "", | |
120 | + es : "" | |
121 | + } | |
122 | + ], | |
123 | + 'aplica' : [ | |
124 | + { | |
125 | + pt : "Aplicar", | |
126 | + en : "", | |
127 | + es : "" | |
128 | + } | |
129 | + ], | |
130 | + 'aplicaVariaCores' : [ | |
131 | + { | |
132 | + pt : "aplicar variações de cores, entre dois extremos, nas classes existentes", | |
133 | + en : "", | |
134 | + es : "" | |
135 | + } | |
136 | + ], | |
137 | + 'aplicaAlteracao' : [ | |
138 | + { | |
139 | + pt : "Aplicar alterações", | |
140 | + en : "", | |
141 | + es : "" | |
142 | + } | |
143 | + ], | |
144 | + 'adicionaClasse' : [ | |
145 | + { | |
146 | + pt : "Adicionar classe", | |
147 | + en : "", | |
148 | + es : "" | |
149 | + } | |
150 | + ], | |
151 | + 'adicionaNovaClasse' : [ | |
152 | + { | |
153 | + pt : "adicionar uma nova classe na legenda", | |
154 | + en : "", | |
155 | + es : "" | |
156 | + } | |
157 | + ], | |
158 | + 'clicaSimbolo' : [ | |
159 | + { | |
160 | + pt : "Clique no símbolo da classe para alterar", | |
161 | + en : "", | |
162 | + es : "" | |
163 | + } | |
164 | + ], | |
165 | + 'consideraElementosVisisveis' : [ | |
166 | + { | |
167 | + pt : "marque para considerar apenas os elementos visíveis na extensão geográfica atual, caso contrário, será considerada a extensão geográfica inicial do mapa", | |
168 | + en : "", | |
169 | + es : "" | |
170 | + } | |
171 | + ], | |
172 | + 'ignoraValores' : [ | |
173 | + { | |
174 | + pt : "Ao gerar as classes, ignorar os valores (separe com vírgula)", | |
175 | + en : "", | |
176 | + es : "" | |
177 | + } | |
178 | + ], | |
179 | + 'transformaGeom' : [ | |
180 | + { | |
181 | + pt : "Transforma a representação geométrica dos elementos do tema. Após alterar esse parâmetro, pode ser necessário modificar as características do símbolo.", | |
182 | + en : "", | |
183 | + es : "" | |
184 | + } | |
185 | + ], | |
186 | + 'semTransformacao' : [ | |
187 | + { | |
188 | + pt : "nenhuma transformação", | |
189 | + en : "", | |
190 | + es : "" | |
191 | + } | |
192 | + ], | |
193 | + 'centroide' : [ | |
194 | + { | |
195 | + pt : "centróide", | |
196 | + en : "", | |
197 | + es : "" | |
198 | + } | |
199 | + ], | |
200 | + 'vertices' : [ | |
201 | + { | |
202 | + pt : "vértices", | |
203 | + en : "", | |
204 | + es : "" | |
205 | + } | |
206 | + ], | |
207 | + 'verticeInicial' : [ | |
208 | + { | |
209 | + pt : "vértice inicial", | |
210 | + en : "", | |
211 | + es : "" | |
212 | + } | |
213 | + ], | |
214 | + 'verticeFinal' : [ | |
215 | + { | |
216 | + pt : "vértice final", | |
217 | + en : "", | |
218 | + es : "" | |
219 | + } | |
220 | + ], | |
221 | + 'alteraGeom' : [ | |
222 | + { | |
223 | + pt : "Altera geometria", | |
224 | + en : "", | |
225 | + es : "" | |
226 | + } | |
227 | + ], | |
228 | + 'alteraTipoGeom' : [ | |
229 | + { | |
230 | + pt : "Altera o tipo de representação do tema. Se for poligonal, passa para linear e vice-versa.", | |
231 | + en : "", | |
232 | + es : "" | |
233 | + } | |
234 | + ], | |
235 | + 'alteraTipo' : [ | |
236 | + { | |
237 | + pt : "Altera tipo", | |
238 | + en : "", | |
239 | + es : "" | |
240 | + } | |
241 | + ], | |
242 | + 'todosElementosUnicoSimbolo' : [ | |
243 | + { | |
244 | + pt : "Todos os elementos serão desenhados com um único símbolo", | |
245 | + en : "", | |
246 | + es : "" | |
247 | + } | |
248 | + ], | |
249 | + 'simboloUnico' : [ | |
250 | + { | |
251 | + pt : "Símbolo único", | |
252 | + en : "", | |
253 | + es : "" | |
254 | + } | |
255 | + ], | |
256 | + 'cadaOcorrenciaUnicoSimbolo' : [ | |
257 | + { | |
258 | + pt : "Cada ocorrência de um valor para o item selecionado, será desenhado com o mesmo símbolo", | |
259 | + en : "", | |
260 | + es : "" | |
261 | + } | |
262 | + ], | |
263 | + 'valorUnico' : [ | |
264 | + { | |
265 | + pt : "Calcular valor único", | |
266 | + en : "", | |
267 | + es : "" | |
268 | + } | |
269 | + ], | |
270 | + 'criaClassesItemNumerico' : [ | |
271 | + { | |
272 | + pt : "Cria classes para um item numérico utilizando um número fixo de classes", | |
273 | + en : "", | |
274 | + es : "" | |
275 | + } | |
276 | + ], | |
277 | + 'numeroClasses' : [ | |
278 | + { | |
279 | + pt : "Número de classes", | |
280 | + en : "", | |
281 | + es : "" | |
282 | + } | |
283 | + ], | |
284 | + 'intervalosIguais' : [ | |
285 | + { | |
286 | + pt : "Calcular intervalos iguais", | |
287 | + en : "", | |
288 | + es : "" | |
289 | + } | |
290 | + ], | |
291 | + 'criaQuartis' : [ | |
292 | + { | |
293 | + pt : "Cria classes para um item numérico utilizando os quartis", | |
294 | + en : "", | |
295 | + es : "" | |
296 | + } | |
297 | + ], | |
298 | + 'estiloNomeClasses' : [ | |
299 | + { | |
300 | + pt : "Estilo dos nomes das classes", | |
301 | + en : "", | |
302 | + es : "" | |
303 | + } | |
304 | + ], | |
305 | + 'soValores' : [ | |
306 | + { | |
307 | + pt : "só os valores", | |
308 | + en : "", | |
309 | + es : "" | |
310 | + } | |
311 | + ], | |
312 | + 'quartilValores' : [ | |
313 | + { | |
314 | + pt : "quartil e os valores", | |
315 | + en : "", | |
316 | + es : "" | |
317 | + } | |
318 | + ], | |
319 | + 'expressaoCompleta' : [ | |
320 | + { | |
321 | + pt : "expressão completa", | |
322 | + en : "", | |
323 | + es : "" | |
324 | + } | |
325 | + ], | |
326 | + "etiquetasClasse" : [ | |
327 | + { | |
328 | + pt : "Textos da classe (labels)", | |
329 | + en : "", | |
330 | + es : "" | |
331 | + } | |
332 | + ], | |
333 | + 'itemComTexto' : [ | |
334 | + { | |
335 | + pt : "Item com o texto", | |
336 | + en : "", | |
337 | + es : "" | |
338 | + } | |
339 | + ], | |
340 | + 'exclui' : [ | |
341 | + { | |
342 | + pt : "excluir", | |
343 | + en : "", | |
344 | + es : "" | |
345 | + } | |
346 | + ], | |
347 | + 'adiciona' : [ | |
348 | + { | |
349 | + pt : "adicionar", | |
350 | + en : "", | |
351 | + es : "" | |
352 | + } | |
353 | + ], | |
354 | + 'propriedades2' : [ | |
355 | + { | |
356 | + pt : "propriedades", | |
357 | + en : "", | |
358 | + es : "" | |
359 | + } | |
360 | + ], | |
361 | + 'estilos' : [ | |
362 | + { | |
363 | + pt : "Estilos", | |
364 | + en : "", | |
365 | + es : "" | |
366 | + } | |
367 | + ], | |
368 | + 'ajudaEstilo' : [ | |
369 | + { | |
370 | + pt : "Cada símbolo pode ser formado por um ou mais estilos. Utilize -1,-1,-1 para anular uma cor. A cor deve ser definida no formato vermelho,verde,azul. Para criar linhas tracejadas utilize o símbolo 0 ou vazio e digite um padrão de repetição como por exemplo 2 10 2 10 ", | |
371 | + en : "", | |
372 | + es : "" | |
373 | + } | |
374 | + ], | |
375 | + 'aplicaAlteracoes' : [ | |
376 | + { | |
377 | + pt : "Aplicar todas as alterações", | |
378 | + en : "", | |
379 | + es : "" | |
380 | + } | |
381 | + ], | |
382 | + 'geraSLD' : [ | |
383 | + { | |
384 | + pt : "Gera um arquivo XML, no padrão SLD, contendo a legenda atual da camada. Para maiores informações, veja", | |
385 | + en : "", | |
386 | + es : "" | |
387 | + } | |
388 | + ], | |
389 | + 'ajudaSLD' : [ | |
390 | + { | |
391 | + pt : "(O SLD só é gerado ou aplicado corretamente em camadas que utilizam expressões simples e o elemento CLASSITEM)", | |
392 | + en : "", | |
393 | + es : "" | |
394 | + } | |
395 | + ], | |
396 | + 'exportaSLD' : [ | |
397 | + { | |
398 | + pt : "Exportar SLD", | |
399 | + en : "", | |
400 | + es : "" | |
401 | + } | |
402 | + ], | |
403 | + 'msgAplicaSLD' : [ | |
404 | + { | |
405 | + pt : "Aplica um arquivo SLD à camada ativa", | |
406 | + en : "", | |
407 | + es : "" | |
408 | + } | |
409 | + ], | |
410 | + 'aplicaSLD' : [ | |
411 | + { | |
412 | + pt : "Aplicar SLD", | |
413 | + en : "", | |
414 | + es : "" | |
415 | + } | |
416 | + ], | |
417 | + 'temaInexistente' : [ | |
418 | + { | |
419 | + pt : "O tema ja nao existe mais no mapa", | |
420 | + en : "", | |
421 | + es : "" | |
422 | + } | |
423 | + ], | |
424 | + 'cliqueAltera' : [ | |
425 | + { | |
426 | + pt : "clique para alterar", | |
427 | + en : "", | |
428 | + es : "" | |
429 | + } | |
430 | + ], | |
431 | + 'cliqueExclui' : [ | |
432 | + { | |
433 | + pt : "clique para excluir", | |
434 | + en : "", | |
435 | + es : "" | |
436 | + } | |
437 | + ], | |
438 | + 'digitaNovoNome' : [ | |
439 | + { | |
440 | + pt : "digite o novo nome", | |
441 | + en : "", | |
442 | + es : "" | |
443 | + } | |
444 | + ], | |
445 | + 'digitaNovaExpressao' : [ | |
446 | + { | |
447 | + pt : "digite a nova expressão", | |
448 | + en : "", | |
449 | + es : "" | |
450 | + } | |
451 | + ], | |
452 | + 'sobe' : [ | |
453 | + { | |
454 | + pt : "sobe", | |
455 | + en : "", | |
456 | + es : "" | |
457 | + } | |
458 | + ], | |
459 | + 'desce' : [ | |
460 | + { | |
461 | + pt : "desce", | |
462 | + en : "", | |
463 | + es : "" | |
464 | + } | |
465 | + ], | |
466 | + 'ajudaEscalaCores' : [ | |
467 | + { | |
468 | + pt : "Para aplicar um ajuste entre 0 e 255 cores, utilize a opção <i>Escala de Cores</i>.", | |
469 | + en : "", | |
470 | + es : "" | |
471 | + } | |
472 | + ], | |
473 | + 'msgEscalaCoresAuto' : [ | |
474 | + { | |
475 | + pt : "O valor de SCALE= pode ser a palavra AUTO (SCALE=AUTO) ou um valor mínimo e máximo (por exemplo SCALE=20,3000).", | |
476 | + en : "", | |
477 | + es : "" | |
478 | + } | |
479 | + ], | |
480 | + 'msgEscalaCoresIndividual' : [ | |
481 | + { | |
482 | + pt : "Você pode aplicar a escala em bandas individuais, para isso, utilize SCALE_n, por exemplo SCALE_1=AUTO SCALE_2=200,500.", | |
483 | + en : "", | |
484 | + es : "" | |
485 | + } | |
486 | + ], | |
487 | + 'msgBandas' : [ | |
488 | + { | |
489 | + pt : "Para escolher quais bandas serão utilizadas e qual sua ordem, utilize a opção BANDAS. Utilize, por exemplo, BANDS=1,2,3 BANDS=1 .", | |
490 | + en : "", | |
491 | + es : "" | |
492 | + } | |
493 | + ], | |
494 | + 'msgReamostragem' : [ | |
495 | + { | |
496 | + pt : "Para alterar o modo de amostragem, utilize RESAMPLE com uma das opções: AVERAGE,NEAREST ou BILINEAR.", | |
497 | + en : "", | |
498 | + es : "" | |
499 | + } | |
500 | + ], | |
501 | + 'adicionaProcesso' : [ | |
502 | + { | |
503 | + pt : "Você pode incluir processos na imagem para modificar as características de visualização<br><br>Adicionar processo", | |
504 | + en : "", | |
505 | + es : "" | |
506 | + } | |
507 | + ], | |
508 | + 'selecionaProcesso' : [ | |
509 | + { | |
510 | + pt : "selecione o processo", | |
511 | + en : "", | |
512 | + es : "" | |
513 | + } | |
514 | + ], | |
515 | + 'escalaCores' : [ | |
516 | + { | |
517 | + pt : "Escala de cores", | |
518 | + en : "", | |
519 | + es : "" | |
520 | + } | |
521 | + ], | |
522 | + 'reamostragem' : [ | |
523 | + { | |
524 | + pt : "Reamostragem", | |
525 | + en : "", | |
526 | + es : "" | |
527 | + } | |
528 | + ], | |
529 | + 'bandas' : [ | |
530 | + { | |
531 | + pt : "Bandas", | |
532 | + en : "", | |
533 | + es : "" | |
534 | + } | |
535 | + ], | |
536 | + 'aplicaProcesso' : [ | |
537 | + { | |
538 | + pt : "aplicar processos", | |
539 | + en : "", | |
540 | + es : "" | |
541 | + } | |
542 | + ], | |
543 | + 'msgNaoEditaLegenda' : [ | |
544 | + { | |
545 | + pt : "Não é possível editar a legenda desse tema", | |
546 | + en : "", | |
547 | + es : "" | |
548 | + } | |
549 | + ], | |
550 | + 'msgAplicaAlteracao' : [ | |
551 | + { | |
552 | + pt : "Clique em <i>Aplicar</i> para que as alteraçõpes sejam salvas", | |
553 | + en : "", | |
554 | + es : "" | |
555 | + } | |
556 | + ], | |
557 | + 'consideraElementosVisiveis' : [ | |
558 | + { | |
559 | + pt : "A contagem considera apenas os elementos visíveis na abrangência do mapa", | |
560 | + en : "", | |
561 | + es : "" | |
562 | + } | |
563 | + ], | |
564 | + 'selecionaUmItem' : [ | |
565 | + { | |
566 | + pt : "Selecione um item!", | |
567 | + en : "", | |
568 | + es : "" | |
569 | + } | |
570 | + ], | |
571 | + 'estiloEdicao' : [ | |
572 | + { | |
573 | + pt : "Estilo em edição", | |
574 | + en : "", | |
575 | + es : "" | |
576 | + } | |
577 | + ], | |
578 | + 'corFundo' : [ | |
579 | + { | |
580 | + pt : "Cor do fundo", | |
581 | + en : "", | |
582 | + es : "" | |
583 | + } | |
584 | + ], | |
585 | + 'corFrente' : [ | |
586 | + { | |
587 | + pt : "Cor da frente", | |
588 | + en : "", | |
589 | + es : "" | |
590 | + } | |
591 | + ], | |
592 | + 'tamanhoEspacamento' : [ | |
593 | + { | |
594 | + pt : "Tamanho / espaçamento", | |
595 | + en : "", | |
596 | + es : "" | |
597 | + } | |
598 | + ], | |
599 | + 'espessura' : [ | |
600 | + { | |
601 | + pt : "Espessura", | |
602 | + en : "", | |
603 | + es : "" | |
604 | + } | |
605 | + ], | |
606 | + 'padraoRepeticao' : [ | |
607 | + { | |
608 | + pt : "Padrão de repetição", | |
609 | + en : "", | |
610 | + es : "" | |
611 | + } | |
612 | + ], | |
613 | + 'opacidade' : [ | |
614 | + { | |
615 | + pt : "Opacidade", | |
616 | + en : "", | |
617 | + es : "" | |
618 | + } | |
619 | + ], | |
620 | + 'angulo' : [ | |
621 | + { | |
622 | + pt : "Ângulo", | |
623 | + en : "", | |
624 | + es : "" | |
625 | + } | |
626 | + ], | |
627 | + 'simbolo' : [ | |
628 | + { | |
629 | + pt : "Nome do símbolo<br>Você pode também usar o caminho absoluto de uma imagem PNG existente no servidor ou clicar em " + "um dos símbolos mostrados abaixo. <a href='" | |
630 | + + i3GEO.configura.locaplic | |
631 | + + "/admin/html/subirsimbolo.html' target=_blank >Clique aqui para upload dessa imagem</a>", | |
632 | + en : "", | |
633 | + es : "" | |
634 | + } | |
635 | + ], | |
636 | + 'listaSimbolo' : [ | |
637 | + { | |
638 | + pt : "Lista de símbolos. Clique para selecionar", | |
639 | + en : "", | |
640 | + es : "" | |
641 | + } | |
642 | + ], | |
643 | + 'graficoPizza' : [ | |
644 | + { | |
645 | + pt : "Gráfico de pizza", | |
646 | + en : "", | |
647 | + es : "" | |
648 | + } | |
649 | + ], | |
650 | + 'numeroOcorrenciasClasses' : [ | |
651 | + { | |
652 | + pt : "Número de ocorrências em cada classe (n)", | |
653 | + en : "", | |
654 | + es : "" | |
655 | + } | |
656 | + ], | |
657 | + 'msgNumeroClasses' : [ | |
658 | + { | |
659 | + pt : "O tema deve conter pelo menos 2 classes", | |
660 | + en : "", | |
661 | + es : "" | |
662 | + } | |
663 | + ], | |
664 | + 'quebrasNaturais' : [ | |
665 | + { | |
666 | + pt : "Calcular quebras naturais", | |
667 | + en : "", | |
668 | + es : "" | |
669 | + } | |
670 | + ], | |
671 | + 'calcularQuartil' : [ | |
672 | + { | |
673 | + pt : "Calcular quartis", | |
674 | + en : "", | |
675 | + es : "" | |
676 | + } | |
677 | + ], | |
678 | + 'calcularQuantil' : [ | |
679 | + { | |
680 | + pt : "Calcular quantis", | |
681 | + en : "", | |
682 | + es : "" | |
683 | + } | |
684 | + ], | |
685 | + 'minScale' : [ | |
686 | + { | |
687 | + pt : "Não desenha se escala for menor que", | |
688 | + en : "", | |
689 | + es : "" | |
690 | + } | |
691 | + ], | |
692 | + 'maxScale' : [ | |
693 | + { | |
694 | + pt : "Não desenha se escala for maior que", | |
695 | + en : "", | |
696 | + es : "" | |
697 | + } | |
698 | + ], | |
699 | + 'aplicatodos' : [ | |
700 | + { | |
701 | + pt : "Aplicar esse parâmetro em todas as classes", | |
702 | + en : "", | |
703 | + es : "" | |
704 | + } | |
705 | + ], | |
706 | + 'nomeClassesUnicoSimbolo' : [ | |
707 | + { | |
708 | + pt : "(Opcional) Item que será utilizado para obter os nomes das classes", | |
709 | + en : "", | |
710 | + es : "" | |
711 | + } | |
712 | + ], | |
713 | + 'aplicar' : [ | |
714 | + { | |
715 | + pt : "aplicar", | |
716 | + en : "", | |
717 | + es : "" | |
718 | + } | |
719 | + ], | |
720 | + 'symbolscale' : [ | |
721 | + { | |
722 | + pt : "Denominador da escala na qual o símbolo será apresentado com o tamanho definido. Esse parâmetro funciona em conjunto com MAXSCALE e MINSCALE e é válido para a camada como um todo e não para cada estilo (afeta pontos)", | |
723 | + en : "", | |
724 | + es : "" | |
725 | + } | |
726 | + ], | |
727 | + 'minsize' : [ | |
728 | + { | |
729 | + pt : "Menor tamanho (pixels), que os símbolos serão desenhados, quando a escala de desenho de símbolos estiver ativo", | |
730 | + en : "", | |
731 | + es : "" | |
732 | + } | |
733 | + ], | |
734 | + 'maxsize' : [ | |
735 | + { | |
736 | + pt : "Maior tamanho (pixels), que os símbolos serão desenhados, quando a escala de desenho de símbolos estiver ativo", | |
737 | + en : "", | |
738 | + es : "" | |
739 | + } | |
740 | + ], | |
741 | + "editorExp" : [ | |
742 | + { | |
743 | + pt : "Editor de expressão", | |
744 | + en : "", | |
745 | + es : "" | |
746 | + } | |
747 | + ], | |
748 | + "offsetx" : [ | |
749 | + { | |
750 | + pt : "Deslocamento em <b>X</b> com relação ao ponto de inserção de símbolo", | |
751 | + en : "", | |
752 | + es : "" | |
753 | + } | |
754 | + ], | |
755 | + "offsety" : [ | |
756 | + { | |
757 | + pt : "Deslocamento em <b>Y</b> com relação ao ponto de inserção de símbolo", | |
758 | + en : "", | |
759 | + es : "" | |
760 | + } | |
761 | + ], | |
762 | + "metade" : [ | |
763 | + { | |
764 | + pt : "Metade", | |
765 | + en : "", | |
766 | + es : "" | |
767 | + } | |
768 | + ], | |
769 | + "duasmetades" : [ | |
770 | + { | |
771 | + pt : "Classifica os dados em duas classes, a primeira concentra os registros que somados correspondem à primeira metade do total e a segunda classe corresponde à segunda metade", | |
772 | + en : "", | |
773 | + es : "" | |
774 | + } | |
775 | + ], | |
776 | + "iunico" : [ | |
777 | + { | |
778 | + pt : "Coluna que identifica cada registro de forma única", | |
779 | + en : "", | |
780 | + es : "" | |
781 | + } | |
782 | + ], | |
783 | + "media" : [ | |
784 | + { | |
785 | + pt : "Média", | |
786 | + en : "", | |
787 | + es : "" | |
788 | + } | |
789 | + ], | |
790 | + "duasmedias" : [ | |
791 | + { | |
792 | + pt : "Classifica os dados em duas classes, a primeira concentra os registros que estão abaixo da média e a segunda aqueles que são iguais ou superiores a média", | |
793 | + en : "", | |
794 | + es : "" | |
795 | + } | |
796 | + ], | |
797 | + "cluster" : [ | |
798 | + { | |
799 | + pt : "Cluster", | |
800 | + en : "", | |
801 | + es : "" | |
802 | + } | |
803 | + ], | |
804 | + "ClusterMaxdistance" : [ | |
805 | + { | |
806 | + pt : "Distância (pixels) máxima entre os pontos que será considerada para permitir o agrupamento", | |
807 | + en : "", | |
808 | + es : "" | |
809 | + } | |
810 | + ], | |
811 | + "ClusterBuffer" : [ | |
812 | + { | |
813 | + pt : "Distância em pixel, no entorno da extensão geográfica do mapa ou dos tiles, se for o caso, que extende a área de pesuisa dos pontos para formação do agrupamento", | |
814 | + en : "", | |
815 | + es : "" | |
816 | + } | |
817 | + ], | |
818 | + "ClusterFilter" : [ | |
819 | + { | |
820 | + pt : "Filtro que será aplicado para restringir os pontos que podem participar do agrupamento. A sintaxe do filtro é a mesma utilizada na definição das expressões que definem cada classe (ver o editor de classes)", | |
821 | + en : "", | |
822 | + es : "" | |
823 | + } | |
824 | + ], | |
825 | + "ClusterRegion" : [ | |
826 | + { | |
827 | + pt : "Tipo de forma que será utilizada na definição da região de busca dos pontos que formarão o agrupamento", | |
828 | + en : "", | |
829 | + es : "" | |
830 | + } | |
831 | + ], | |
832 | + "ClusterGroup" : [ | |
833 | + { | |
834 | + pt : "Item que será utilizado para separar os diferentes agrupamentos", | |
835 | + en : "", | |
836 | + es : "" | |
837 | + } | |
838 | + ], | |
839 | + "remover" : [ | |
840 | + { | |
841 | + pt : "Remover", | |
842 | + en : "", | |
843 | + es : "" | |
844 | + } | |
845 | + ], | |
846 | + "legendaImg" : [ | |
847 | + { | |
848 | + pt : "Imagem que será utilizada no lugar da montagem automática da legenda", | |
849 | + en : "", | |
850 | + es : "" | |
851 | + } | |
852 | + ], | |
853 | + "offsite" : [ | |
854 | + { | |
855 | + pt : "Cor, em imagens, que será considerada como NODATA e renderizada como transparente (RGB separado por vírgulas)", | |
856 | + en : "", | |
857 | + es : "" | |
858 | + } | |
859 | + ], | |
860 | + 'autoClasses' : [ { | |
861 | + pt : "É possível a geração de classes automaticamente por meio da definição de colunas na tabela de atributos do tema que armazenam as informações sobre cor, tamanho, etc.", | |
862 | + en : "", | |
863 | + es : "" | |
864 | + } ], | |
865 | + 'classesitem' : [ { | |
866 | + pt : "Qual a coluna da tabela que identifica unicamente cada classe. Para cada valor será criada uma classe. O tema que utiliza a geração de classes de forma automática, deve ter definido apenas uma classe. Essa classe será utilizada como padrão para geração das demais.", | |
867 | + en : "", | |
868 | + es : "" | |
869 | + } ], | |
870 | + 'classesnome' : [ { | |
871 | + pt : "Nome da coluna que será utilizada para compor o nome das classes geradas automaticamente.", | |
872 | + en : "", | |
873 | + es : "" | |
874 | + } ], | |
875 | + 'classescor' : [ { | |
876 | + pt : "Nome da coluna que definirá a cor do símbolo utilizado em cada classe. As cores devem ser definidas em RGB.", | |
877 | + en : "", | |
878 | + es : "" | |
879 | + } ], | |
880 | + 'classessimbolo' : [ { | |
881 | + pt : "Nome da coluna que definirá o símbolo utilizado em cada classe.", | |
882 | + en : "", | |
883 | + es : "" | |
884 | + } ], | |
885 | + 'classestamanho' : [ { | |
886 | + pt : "Nome da coluna que definirá o tamanho de cada símbolo.", | |
887 | + en : "", | |
888 | + es : "" | |
889 | + } ], | |
890 | + 'palletefile' : [ { | |
891 | + pt : "Palete de cores. Endereço do arquivo no servidor (opcional)", | |
892 | + en : "", | |
893 | + es : "" | |
894 | + } ], | |
895 | + 'palletestep' : [ { | |
896 | + pt : "Quantas cores em cada nível da palete (opcional)", | |
897 | + en : "", | |
898 | + es : "" | |
899 | + } ], | |
900 | + "colunasTxt" : [ { | |
901 | + pt : "Itens disponíveis", | |
902 | + en : "", | |
903 | + es : "" | |
904 | + } ] | |
905 | + }; | ... | ... |
... | ... | @@ -0,0 +1,173 @@ |
1 | +<?php | |
2 | +include(dirname(__FILE__)."/../safe.php"); | |
3 | +verificaBlFerramentas(basename(dirname(__FILE__)),$i3geoBlFerramentas,false); | |
4 | +// | |
5 | +//faz a busca da função que deve ser executada | |
6 | +// | |
7 | +$retorno = ""; //string que será retornada ao browser via JSON | |
8 | +switch (strtoupper($funcao)) | |
9 | +{ | |
10 | + case "PARAMETROSAUTO": | |
11 | + $map = ms_newMapObj($map_file); | |
12 | + $layer = $map->getlayerbyname($tema); | |
13 | + $retorno = array(); | |
14 | + $retorno["classesitem"] = $layer->getmetadata("classesitem"); | |
15 | + $retorno["classesnome"] = $layer->getmetadata("classesnome"); | |
16 | + $retorno["classescor"] = $layer->getmetadata("classescor"); | |
17 | + $retorno["classessimbolo"] = $layer->getmetadata("classessimbolo"); | |
18 | + $retorno["classestamanho"] = $layer->getmetadata("classestamanho"); | |
19 | + $retorno["palletefile"] = $layer->getmetadata("palletefile"); | |
20 | + $retorno["palletestep"] = $layer->getmetadata("palletestep"); | |
21 | + $sopen = $layer->open(); | |
22 | + if($sopen != MS_FAILURE){ | |
23 | + $items = $layer->getItems(); | |
24 | + } | |
25 | + else{ | |
26 | + $items = array(); | |
27 | + } | |
28 | + $retorno["colunas"] = implode(",",$items); | |
29 | + break; | |
30 | + case "SALVAPARAMETROSAUTO": | |
31 | + $map = ms_newMapObj($map_file); | |
32 | + $layer = $map->getlayerbyname($tema); | |
33 | + $layer->setmetadata("classesitem",$_GET["classesitem"]); | |
34 | + $layer->setmetadata("classesnome",$_GET["classesnome"]); | |
35 | + $layer->setmetadata("classescor",$_GET["classescor"]); | |
36 | + $layer->setmetadata("classessimbolo",$_GET["classessimbolo"]); | |
37 | + $layer->setmetadata("classestamanho",$_GET["classestamanho"]); | |
38 | + $layer->setmetadata("palletefile",$_GET["palletefile"]); | |
39 | + $layer->setmetadata("palletestep",$_GET["palletestep"]); | |
40 | + $map->save($map_file); | |
41 | + $retorno = "ok"; | |
42 | + break; | |
43 | +/* | |
44 | +Valor: TEMA2SLD | |
45 | + | |
46 | +Mostra na tela o SLD de um tema | |
47 | + | |
48 | +<Temas->sld> | |
49 | +*/ | |
50 | + case "TEMA2SLD": | |
51 | + include_once(dirname(__FILE__)."/../../classesphp/classe_temas.php"); | |
52 | + $m = new Temas($map_file,$tema); | |
53 | + $sld = $m->sld(); | |
54 | + echo header('Content-Disposition: attachment; filename="'.$tema.'.sld"'); | |
55 | + echo header("Content-type: application/xml"); | |
56 | + echo $m->sld(); | |
57 | + exit; | |
58 | + break; | |
59 | +/* | |
60 | +function: ADICIONALABELCLASSE | |
61 | + | |
62 | +Adiciona LABEL em uma classe de um layer | |
63 | + | |
64 | +<Temas->adicionaLabel> | |
65 | +*/ | |
66 | + case "ADICIONALABELCLASSE": | |
67 | + include_once(dirname(__FILE__)."/../../classesphp/classe_temas.php"); | |
68 | + $m = new Temas($map_file,$tema); | |
69 | + $l = $m->mapa->getlayerbyname($tema); | |
70 | + if(empty($item)) | |
71 | + {$retorno = "erro";} | |
72 | + else{ | |
73 | + //$l->set("labelitem",$item); | |
74 | + $novac = $l->getclass($_GET["classe"]); | |
75 | + $m->adicionaLabel($novac,$_GET["wrap"],$_GET["fonte"],$_GET["tamanho"],$_GET["angulo"],$_GET["fundo"],$_GET["sombra"],$_GET["cor"],$_GET["outlinecolor"],$_GET["shadowcolor"],$_GET["shadowsizex"],$_GET["shadowsizey"],$_GET["force"],$_GET["mindistance"],$_GET["minfeaturesize"],$_GET["offsetx"],$_GET["offsety"],$_GET["partials"],$_GET["position"],"[".$_GET["item"]."]"); | |
76 | + $m->salva(); | |
77 | + $retorno = "ok"; | |
78 | + } | |
79 | + break; | |
80 | +/* | |
81 | +function: REMOVELABELCLASSE | |
82 | + | |
83 | +Remove LABEL em uma classe de um layer | |
84 | +*/ | |
85 | + case "REMOVELABELCLASSE": | |
86 | + include_once(dirname(__FILE__)."/../../classesphp/classe_temas.php"); | |
87 | + $m = new Temas($map_file,$tema); | |
88 | + $m->removeLabel($_GET["classe"]); | |
89 | + $m->salva(); | |
90 | + $retorno = "ok"; | |
91 | + break; | |
92 | +/* | |
93 | +Valor: EDITALEGENDA | |
94 | + | |
95 | +Cria elementos para construir uma legenda no formato de tabela em HTML. | |
96 | + | |
97 | +<Legenda->tabelaLegenda> | |
98 | +*/ | |
99 | + case "EDITALEGENDA": | |
100 | + include_once(dirname(__FILE__)."/../../classesphp/classe_legenda.php"); | |
101 | + $m = new Legenda($map_file,$locaplic,$tema); | |
102 | + $r = $m->tabelaLegenda(); | |
103 | + if (!$r){$r = "erro.Erro legenda nao disponivel";} | |
104 | + $retorno = $r; | |
105 | + break; | |
106 | +/* | |
107 | +Valor: CONTAGEMCLASSE | |
108 | + | |
109 | +Acrescenta a contagem de elementos em cada classe. | |
110 | + | |
111 | +<Legenda->tabelaLegenda> | |
112 | +*/ | |
113 | + case "CONTAGEMCLASSE": | |
114 | + //apresenta erro com palavras acentuadas | |
115 | + include_once(dirname(__FILE__)."/../../classesphp/classe_legenda.php"); | |
116 | + $m = new Legenda($map_file,$locaplic,$tema); | |
117 | + $r = $m->tabelaLegenda("sim"); | |
118 | + $m->salva(); | |
119 | + if (!$r){$r = "erro.Erro legenda nao disponivel";} | |
120 | + $retorno = $r; | |
121 | + break; | |
122 | + /* | |
123 | + Valor: APLICATODASCLASSES | |
124 | + | |
125 | + Aplica um parametro a todas as classes | |
126 | + */ | |
127 | + case "APLICATODASCLASSES": | |
128 | + include_once(dirname(__FILE__)."/../../classesphp/classe_legenda.php"); | |
129 | + $m = new Legenda($map_file,$locaplic,$tema); | |
130 | + $r = $m->aplicaTodasClasses($_GET["parametro"],$_GET["valor"]); | |
131 | + $m->salva(); | |
132 | + if (!$r){$r = "erro.Erro legenda nao disponivel";} | |
133 | + $retorno = $r; | |
134 | + break; | |
135 | + case "APLICARCLUSTER": | |
136 | + include_once(dirname(__FILE__)."/../../classesphp/classe_temas.php"); | |
137 | + $m = new Temas($map_file,$tema); | |
138 | + $l = $m->mapa->getlayerbyname($tema); | |
139 | + if($filter != ""){ | |
140 | + //$filter = base64decode($filter); | |
141 | + } | |
142 | + $m->criaCluster($_GET["group"],$_GET["filter"],$_GET["maxdistance"],$_GET["region"],$_GET["buffer"]); | |
143 | + $m->salva(); | |
144 | + $retorno = "ok"; | |
145 | + break; | |
146 | + case "REMOVERCLUSTER": | |
147 | + include_once(dirname(__FILE__)."/../../classesphp/classe_temas.php"); | |
148 | + $m = new Temas($map_file,$tema); | |
149 | + $l = $m->mapa->getlayerbyname($tema); | |
150 | + $m->removeCluster(); | |
151 | + $m->salva(); | |
152 | + $retorno = "ok"; | |
153 | + break; | |
154 | + case "APLICALEGENDAIMG": | |
155 | + include_once(dirname(__FILE__)."/../../classesphp/classe_legenda.php"); | |
156 | + $m = new Legenda($map_file,$locaplic,$tema); | |
157 | + $m->aplicaLegendaImg($_GET["imagem"]); | |
158 | + $m->salva(); | |
159 | + $retorno = "ok"; | |
160 | + break; | |
161 | + case "APLICAOFFSITE": | |
162 | + include_once(dirname(__FILE__)."/../../classesphp/classe_temas.php"); | |
163 | + $m = new Temas($map_file,$tema); | |
164 | + $m->mudaOffsite($_GET["offsite"]); | |
165 | + $m->salva(); | |
166 | + $retorno = "ok"; | |
167 | + break; | |
168 | +} | |
169 | +if(isset($map_file) && isset($postgis_mapa) && $map_file != ""){ | |
170 | + restauraCon($map_file,$postgis_mapa); | |
171 | +} | |
172 | +cpjson($retorno); | |
173 | +?> | |
0 | 174 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,2511 @@ |
1 | +/* | |
2 | + Title: Editor de legenda | |
3 | + | |
4 | + Define a forma de representação de um tema, modificando o tipo de classificação e os símbolos utilizados em cada classe | |
5 | + | |
6 | + Veja: | |
7 | + | |
8 | + <i3GEO.tema.dialogo.editaLegenda> | |
9 | + | |
10 | + Arquivo: | |
11 | + | |
12 | + i3geo/ferramentas/legenda/index.js.php | |
13 | + | |
14 | + Licenca: | |
15 | + | |
16 | + GPL2 | |
17 | + | |
18 | + i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
19 | + | |
20 | + Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | |
21 | + Desenvolvedor: Edmar Moretti edmar.moretti@gmail.com | |
22 | + | |
23 | + Este programa é software livre; você pode redistribuí-lo | |
24 | + e/ou modificá-lo sob os termos da Licença Pública Geral | |
25 | + GNU conforme publicada pela Free Software Foundation; | |
26 | + | |
27 | + Este programa é distribuído na expectativa de que seja útil, | |
28 | + porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
29 | + de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
30 | + Consulte a Licença Pública Geral do GNU para mais detalhes. | |
31 | + Você deve ter recebido uma cópia da Licença Pública Geral do | |
32 | + GNU junto com este programa; se não, escreva para a | |
33 | + Free Software Foundation, Inc., no endereço | |
34 | + 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
35 | + */ | |
36 | + | |
37 | +if (typeof (i3GEOF) === 'undefined') { | |
38 | + var i3GEOF = {}; | |
39 | +} | |
40 | +/* | |
41 | + * Classe: i3GEOF.legenda | |
42 | + */ | |
43 | +// incuir opcao para inserir o nome de uma imagem da legenda | |
44 | +i3GEOF.legenda = | |
45 | + { | |
46 | + /* | |
47 | + * Variavel: parDefault | |
48 | + * | |
49 | + * Parametros padrão utilizados para formatar os labels | |
50 | + */ | |
51 | + parDefault : "&position=MS_UR&partials=1&offsetx=0&offsety=0&minfeaturesize=auto&mindistance=auto&force=0&shadowsizex=1&shadowsizey=1&cor=0 0 0&sombray=1&sombrax=1&angulo=0&tamanho=8&fonte=bitmap&fundo=off&sombra=off&outlinecolor=off&shadowcolor=off&wrap=", | |
52 | + /* | |
53 | + * Variavel: aviso | |
54 | + * | |
55 | + * Indica que uma alteração ainda não foi salva | |
56 | + * | |
57 | + * Type: {boolean} | |
58 | + */ | |
59 | + aviso : false, | |
60 | + /* | |
61 | + * Variavel: tema | |
62 | + * | |
63 | + * Tema que será utilizado | |
64 | + * | |
65 | + * Type: {string} | |
66 | + */ | |
67 | + tema : i3GEO.temaAtivo, | |
68 | + /* | |
69 | + * Variavel: dadosGrafico | |
70 | + * | |
71 | + * Dados utilizados no gráfico no formato da ferramenta graficointerativo | |
72 | + */ | |
73 | + dadosGrafico : "", | |
74 | + /* | |
75 | + * Variavel: aguarde | |
76 | + * | |
77 | + * Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. | |
78 | + */ | |
79 | + aguarde : "", | |
80 | + /* | |
81 | + * Variavel: estilos | |
82 | + * | |
83 | + * Estilos existentes em um símbolo de uma classe | |
84 | + */ | |
85 | + estilos : "", | |
86 | + /* | |
87 | + * Variavel: estilo | |
88 | + * | |
89 | + * Ultimo estilo selecionado | |
90 | + */ | |
91 | + estilo : "", | |
92 | + /* | |
93 | + * Variavel: classe | |
94 | + * | |
95 | + * Ultima classe selecionado | |
96 | + */ | |
97 | + classe : "", | |
98 | + /** | |
99 | + * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php | |
100 | + */ | |
101 | + MUSTACHE : "", | |
102 | + /** | |
103 | + * Funcao do usuario que e executada apos iniciar a ferramenta | |
104 | + */ | |
105 | + aposIniciar : function(){ | |
106 | + | |
107 | + }, | |
108 | + /** | |
109 | + * Susbtitutos para o template | |
110 | + */ | |
111 | + mustacheHash : function() { | |
112 | + var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.legenda.dicionario); | |
113 | + dicionario["locaplic"] = i3GEO.configura.locaplic; | |
114 | + dicionario["asp"] = '"'; | |
115 | + dicionario["aplicar"] = $trad("p14"); | |
116 | + return dicionario; | |
117 | + }, | |
118 | + /* | |
119 | + * Function: inicia | |
120 | + * | |
121 | + * Inicia a ferramenta. É chamado por criaJanelaFlutuante | |
122 | + * | |
123 | + * Parametro: | |
124 | + * | |
125 | + * iddiv {String} - id do div que receberá o conteudo HTML da ferramenta | |
126 | + */ | |
127 | + inicia : function(iddiv) { | |
128 | + if(i3GEOF.legenda.MUSTACHE == ""){ | |
129 | + $.get(i3GEO.configura.locaplic + "/ferramentas/legenda/template_mst.html", function(template) { | |
130 | + i3GEOF.legenda.MUSTACHE = template; | |
131 | + i3GEOF.legenda.inicia(iddiv); | |
132 | + }); | |
133 | + return; | |
134 | + } | |
135 | + if (!$i("i3GEOFlegendaComboCabecaSel")) { | |
136 | + i3GEO.janela.comboCabecalhoTemasBs("i3GEOFlegendaComboCabeca", "i3GEOFlegendaComboCabecaSel", "legenda", "ligados",function(evt){ | |
137 | + var botao = evt.target; | |
138 | + if (botao) { | |
139 | + if (botao.value != "") { | |
140 | + i3GEO.mapa.ativaTema(botao.value); | |
141 | + i3GEOF.legenda.tema = botao.value; | |
142 | + $i(iddiv).innerHTML = ""; | |
143 | + i3GEOF.legenda.inicia(iddiv); | |
144 | + } else { | |
145 | + $i(iddiv).innerHTML = ""; | |
146 | + } | |
147 | + } | |
148 | + }); | |
149 | + } | |
150 | + if (i3GEO.temaAtivo === "") { | |
151 | + $i(iddiv).innerHTML = ""; | |
152 | + return; | |
153 | + } | |
154 | + try { | |
155 | + $i(iddiv).innerHTML += i3GEOF.legenda.html(); | |
156 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia1", "i3GEOlegendaguia"); | |
157 | + // eventos das guias | |
158 | + $i("i3GEOlegendaguia8").onclick = function() { | |
159 | + i3GEOF.legenda.ativaAplicar("none"); | |
160 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia8", "i3GEOlegendaguia"); | |
161 | + i3GEOF.legenda.parametrosAuto(); | |
162 | + }; | |
163 | + $i("i3GEOlegendaguia7").onclick = function() { | |
164 | + i3GEOF.legenda.ativaAplicar("none"); | |
165 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia7", "i3GEOlegendaguia"); | |
166 | + }; | |
167 | + $i("i3GEOlegendaguia6").onclick = function() { | |
168 | + i3GEOF.legenda.ativaAplicar("none"); | |
169 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia6", "i3GEOlegendaguia"); | |
170 | + }; | |
171 | + $i("i3GEOlegendaguia1").onclick = function() { | |
172 | + i3GEOF.legenda.ativaAplicar("none"); | |
173 | + i3GEOF.legenda.mostralegenda(); | |
174 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia1", "i3GEOlegendaguia"); | |
175 | + }; | |
176 | + $i("i3GEOlegendaguia2").onclick = function() { | |
177 | + i3GEOF.legenda.ativaAplicar("none"); | |
178 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia2", "i3GEOlegendaguia"); | |
179 | + }; | |
180 | + $i("i3GEOlegendaguia3").onclick = function() { | |
181 | + i3GEO.janela.tempoMsg($trad('ajuda', i3GEOF.legenda.dicionario)); | |
182 | + }; | |
183 | + $i("i3GEOlegendaguia4").onclick = function() { | |
184 | + i3GEOF.legenda.ativaAplicar("none"); | |
185 | + i3GEOF.legenda.mostraGrafico(); | |
186 | + }; | |
187 | + $i("i3GEOlegendaguia5").onclick = function() { | |
188 | + i3GEOF.legenda.ativaAplicar("none"); | |
189 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia5", "i3GEOlegendaguia"); | |
190 | + }; | |
191 | + | |
192 | + var b = new YAHOO.widget.Button("i3GEOlegendabotaoImagemLegenda", { | |
193 | + onclick : { | |
194 | + fn : i3GEOF.legenda.aplicarLegendaImg | |
195 | + } | |
196 | + }); | |
197 | + b.addClass("rodar100"); | |
198 | + | |
199 | + var b = new YAHOO.widget.Button("i3GEOlegendabotaoOffsite", { | |
200 | + onclick : { | |
201 | + fn : i3GEOF.legenda.aplicarOffsite | |
202 | + } | |
203 | + }); | |
204 | + b.addClass("rodar100"); | |
205 | + | |
206 | + var b = new YAHOO.widget.Button("i3GEOlegendabotaoAplicarCluster", { | |
207 | + onclick : { | |
208 | + fn : i3GEOF.legenda.aplicarCluster | |
209 | + } | |
210 | + }); | |
211 | + b.addClass("rodar"); | |
212 | + | |
213 | + var b = new YAHOO.widget.Button("i3GEOlegendabotaoRemoverCluster", { | |
214 | + onclick : { | |
215 | + fn : i3GEOF.legenda.removerCluster | |
216 | + } | |
217 | + }); | |
218 | + b.addClass("rodar"); | |
219 | + | |
220 | + var b = new YAHOO.widget.Button("i3GEOlegendabotaoAplicarAuto", { | |
221 | + onclick : { | |
222 | + fn : i3GEOF.legenda.salvaParametrosAuto | |
223 | + } | |
224 | + }); | |
225 | + b.addClass("rodar"); | |
226 | + | |
227 | + var b = new YAHOO.widget.Button("i3GEOlegendabotao1", { | |
228 | + onclick : { | |
229 | + fn : i3GEOF.legenda.mudaLegenda | |
230 | + } | |
231 | + }); | |
232 | + b.addClass("rodar150"); | |
233 | + b = new YAHOO.widget.Button("i3GEOlegendabotao2", { | |
234 | + onclick : { | |
235 | + fn : i3GEOF.legenda.adicionaClasse | |
236 | + } | |
237 | + }); | |
238 | + b.addClass("rodar150"); | |
239 | + b = new YAHOO.widget.Button("i3GEOlegendabotao3", { | |
240 | + onclick : { | |
241 | + fn : i3GEOF.legenda.adicionaConta | |
242 | + } | |
243 | + }); | |
244 | + b.addClass("rodar"); | |
245 | + b = new YAHOO.widget.Button("i3GEOlegendabotao15", { | |
246 | + onclick : { | |
247 | + fn : i3GEOF.legenda.adicionaOpacidade | |
248 | + } | |
249 | + }); | |
250 | + b.addClass("rodar"); | |
251 | + | |
252 | + b = new YAHOO.widget.Button("i3GEOlegendabotaoRamp", { | |
253 | + onclick : { | |
254 | + fn : function() { | |
255 | + var tabela = $i("i3GEOlegendalegenda"); | |
256 | + var trs = tabela.getElementsByTagName("tr"); | |
257 | + var ncores = trs.length - 1; | |
258 | + // $i("i3geo_janelaCorRampComboCabecaSel").value = i3GEOF.legenda.tema; | |
259 | + i3GEO.util.abreColourRamp("", "listaColourRamp", ncores, i3GEOF.legenda.tema); | |
260 | + } | |
261 | + } | |
262 | + }); | |
263 | + b.addClass("rodar"); | |
264 | + b = new YAHOO.widget.Button("i3GEOlegendabotao4", { | |
265 | + onclick : { | |
266 | + fn : i3GEOF.legenda.paleta | |
267 | + } | |
268 | + }); | |
269 | + b.addClass("rodar100"); | |
270 | + b = new YAHOO.widget.Button("i3GEOlegendabotao5", { | |
271 | + onclick : { | |
272 | + fn : i3GEOF.legenda.simbU | |
273 | + } | |
274 | + }); | |
275 | + b.addClass("rodar"); | |
276 | + b = new YAHOO.widget.Button("i3GEOlegendabotao6", { | |
277 | + onclick : { | |
278 | + fn : i3GEOF.legenda.valorU | |
279 | + } | |
280 | + }); | |
281 | + b.addClass("rodar"); | |
282 | + b = new YAHOO.widget.Button("i3GEOlegendabotaoMetade", { | |
283 | + onclick : { | |
284 | + fn : i3GEOF.legenda.metade | |
285 | + } | |
286 | + }); | |
287 | + b.addClass("rodar"); | |
288 | + b = new YAHOO.widget.Button("i3GEOlegendabotaoMedia", { | |
289 | + onclick : { | |
290 | + fn : i3GEOF.legenda.media | |
291 | + } | |
292 | + }); | |
293 | + b.addClass("rodar"); | |
294 | + b = new YAHOO.widget.Button("i3GEOlegendabotao7", { | |
295 | + onclick : { | |
296 | + fn : i3GEOF.legenda.representacao | |
297 | + } | |
298 | + }); | |
299 | + b.addClass("rodar"); | |
300 | + b = new YAHOO.widget.Button("i3GEOlegendabotao8", { | |
301 | + onclick : { | |
302 | + fn : i3GEOF.legenda.valorC | |
303 | + } | |
304 | + }); | |
305 | + b.addClass("rodar"); | |
306 | + b = new YAHOO.widget.Button("i3GEOlegendabotao9", { | |
307 | + onclick : { | |
308 | + fn : i3GEOF.legenda.valorQ | |
309 | + } | |
310 | + }); | |
311 | + b.addClass("rodar"); | |
312 | + b = new YAHOO.widget.Button("i3GEOlegendabotaoQuantil", { | |
313 | + onclick : { | |
314 | + fn : i3GEOF.legenda.valorQu | |
315 | + } | |
316 | + }); | |
317 | + b.addClass("rodar"); | |
318 | + b = new YAHOO.widget.Button("i3GEOlegendabotaoQN", { | |
319 | + onclick : { | |
320 | + fn : i3GEOF.legenda.valorQN | |
321 | + } | |
322 | + }); | |
323 | + b.addClass("rodar"); | |
324 | + | |
325 | + b = new YAHOO.widget.Button("i3GEOlegendabotao17", { | |
326 | + onclick : { | |
327 | + fn : i3GEOF.legenda.alteraGeometriaTema | |
328 | + } | |
329 | + }); | |
330 | + b.addClass("rodar"); | |
331 | + b = | |
332 | + new YAHOO.widget.Button("i3GEOlegendabotaoSLDe", { | |
333 | + onclick : { | |
334 | + fn : function() { | |
335 | + window.open(i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?funcao=tema2sld&tema=" | |
336 | + + i3GEOF.legenda.tema | |
337 | + + "&g_sid=" | |
338 | + + i3GEO.configura.sid); | |
339 | + } | |
340 | + } | |
341 | + }); | |
342 | + b.addClass("rodar"); | |
343 | + b = new YAHOO.widget.Button("i3GEOlegendabotaoSLDi", { | |
344 | + onclick : { | |
345 | + fn : function() { | |
346 | + i3GEO.tema.dialogo.aplicarsld(i3GEOF.legenda.tema); | |
347 | + } | |
348 | + } | |
349 | + }); | |
350 | + b.addClass("rodar"); | |
351 | + | |
352 | + b = | |
353 | + new YAHOO.widget.Button("i3GEOlegendabotaoIncluirLabel", { | |
354 | + onclick : { | |
355 | + fn : function() { | |
356 | + var par, p, temp, cp; | |
357 | + try { | |
358 | + par = i3GEOF.proplabel.pegaPar(); | |
359 | + i3GEOF.legenda.parDefault = par; | |
360 | + } catch (e) { | |
361 | + par = i3GEOF.legenda.parDefault; | |
362 | + } | |
363 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
364 | + temp = function() { | |
365 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
366 | + i3GEOF.legenda.aposAlterarLegenda(); | |
367 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
368 | + }; | |
369 | + p = | |
370 | + i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" | |
371 | + + i3GEO.configura.sid | |
372 | + + "&funcao=adicionaLabelClasse&tema=" | |
373 | + + i3GEOF.legenda.tema | |
374 | + + "&classe=" | |
375 | + + i3GEOF.legenda.classe | |
376 | + + par; | |
377 | + p += "&item=" + $i("i3GEOlegendaSelItemLabel").value; | |
378 | + cp = new cpaint(); | |
379 | + cp.set_response_type("JSON"); | |
380 | + cp.call(p, "foo", temp); | |
381 | + } | |
382 | + } | |
383 | + }); | |
384 | + b.addClass("rodar100"); | |
385 | + b = | |
386 | + new YAHOO.widget.Button("i3GEOlegendabotaoExcluirLabel", { | |
387 | + onclick : { | |
388 | + fn : function() { | |
389 | + var p, temp, cp; | |
390 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
391 | + temp = function() { | |
392 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
393 | + i3GEOF.legenda.aposAlterarLegenda(); | |
394 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
395 | + }; | |
396 | + p = | |
397 | + i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" | |
398 | + + i3GEO.configura.sid | |
399 | + + "&funcao=removeLabelClasse&tema=" | |
400 | + + i3GEOF.legenda.tema | |
401 | + + "&classe=" | |
402 | + + i3GEOF.legenda.classe; | |
403 | + cp = new cpaint(); | |
404 | + cp.set_response_type("JSON"); | |
405 | + cp.call(p, "foo", temp); | |
406 | + } | |
407 | + } | |
408 | + }); | |
409 | + b.addClass("rodar100"); | |
410 | + b = | |
411 | + new YAHOO.widget.Button("i3GEOlegendabotaoPropriedadeLabel", { | |
412 | + onclick : { | |
413 | + fn : function() { | |
414 | + i3GEO.util.scriptTag( | |
415 | + i3GEO.configura.locaplic + "/ferramentas/opcoes_label/index.js", | |
416 | + "i3GEOF.proplabel.criaJanelaFlutuante(false)", | |
417 | + "i3GEOFproplabel", | |
418 | + false); | |
419 | + } | |
420 | + } | |
421 | + }); | |
422 | + b.addClass("abrir100"); | |
423 | + i3GEOF.legenda.ativaFoco(); | |
424 | + i3GEOF.legenda.mostralegenda(); | |
425 | + i3GEOF.legenda.montaCombosItens(); | |
426 | + var objTema = i3GEO.arvoreDeCamadas.pegaTema(i3GEOF.legenda.tema); | |
427 | + if (objTema.classe && objTema.classe.toLowerCase() == "nao") { | |
428 | + $i("i3GEOFlegendamostra").checked = false; | |
429 | + } | |
430 | + if(objTema.legendaimg){ | |
431 | + $i("i3GEOlegendaImg").value = objTema.legendaimg; | |
432 | + } | |
433 | + if(objTema.offsite){ | |
434 | + $i("i3GEOoffsite").value = objTema.offsite; | |
435 | + } | |
436 | + $i("i3GEOFlegendamostra").onclick = function() { | |
437 | + i3GEO.tema.invertestatuslegenda(i3GEOF.legenda.tema); | |
438 | + }; | |
439 | + i3GEO.util.aplicaAquarela("i3GEOF.legenda_corpo"); | |
440 | + i3GEOF.legenda.aposIniciar.call(); | |
441 | + } catch (erro) { | |
442 | + i3GEO.janela.tempoMsg(erro); | |
443 | + i3GEOF.legenda.aposIniciar = function(){}; | |
444 | + } | |
445 | + i3GEO.guias.ajustaGuiaFerramenta("i3GEOF.legenda", "i3GEOlegenda"); | |
446 | + }, | |
447 | + /* | |
448 | + * Function: html | |
449 | + * | |
450 | + * Gera o código html para apresentação das opções da ferramenta | |
451 | + * | |
452 | + * Retorno: | |
453 | + * | |
454 | + * String com o código html | |
455 | + */ | |
456 | + html : function() { | |
457 | + var ins = Mustache.render(i3GEOF.legenda.MUSTACHE, i3GEOF.legenda.mustacheHash()); | |
458 | + return ins; | |
459 | + }, | |
460 | + /* | |
461 | + * Function: iniciaJanelaFlutuante | |
462 | + * | |
463 | + * Cria a janela flutuante para controle da ferramenta. | |
464 | + */ | |
465 | + iniciaJanelaFlutuante : function() { | |
466 | + var minimiza, cabecalho, janela, divid, temp, titulo; | |
467 | + if ($i("i3GEOF.legenda")) { | |
468 | + i3GEOF.legenda.tema = i3GEO.temaAtivo; | |
469 | + i3GEOF.legenda.inicia("i3GEOF.legenda_corpo"); | |
470 | + return; | |
471 | + } | |
472 | + cabecalho = function() { | |
473 | + i3GEOF.legenda.ativaFoco(); | |
474 | + }; | |
475 | + minimiza = function() { | |
476 | + i3GEO.janela.minimiza("i3GEOF.legenda"); | |
477 | + i3GEOF.legenda.ativaAplicar("none"); | |
478 | + }; | |
479 | + // cria a janela flutuante | |
480 | + titulo = | |
481 | + "<div id='i3GEOF.legendaI' style='left:5px;'>" | |
482 | + + "<div id='i3GEOFlegendaComboCabeca' class='comboTemasCabecalhoBs form-group' style='width:200px'> ------</div></div>" | |
483 | + + "</div><a class='i3GeoTituloJanelaBs' target=_blank href='" | |
484 | + + i3GEO.configura.locaplic | |
485 | + + "/ajuda_usuario.php?idcategoria=5&idajuda=41' > " | |
486 | + + $trad("t33") | |
487 | + +"</a>"; | |
488 | + janela = i3GEO.janela.cria( | |
489 | + "590px", | |
490 | + "350px", | |
491 | + "", | |
492 | + "", | |
493 | + "", | |
494 | + titulo, | |
495 | + "i3GEOF.legenda", | |
496 | + false, | |
497 | + "hd", | |
498 | + cabecalho, | |
499 | + minimiza, | |
500 | + function() {i3GEO.guias.ajustaGuiaFerramenta("i3GEOF.legenda", "i3GEOlegenda");}, | |
501 | + true | |
502 | + ); | |
503 | + | |
504 | + divid = janela[2].id; | |
505 | + i3GEOF.legenda.aguarde = $i("i3GEOF.legenda_imagemCabecalho").style; | |
506 | + $i("i3GEOF.legenda_corpo").style.backgroundColor = "white"; | |
507 | + i3GEOF.legenda.inicia(divid); | |
508 | + }, | |
509 | + /* | |
510 | + * Function: ativaFoco | |
511 | + * | |
512 | + * Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado | |
513 | + */ | |
514 | + ativaFoco : function() { | |
515 | + | |
516 | + }, | |
517 | + ativaAplicar : function(tipo) { | |
518 | + var b = $i("i3GEOlegendabotao10"); | |
519 | + if (b) { | |
520 | + b.style.display = tipo; | |
521 | + } else { | |
522 | + YAHOO.i3GEO.janela.manager.find("i3GEOF.legenda").setFooter( | |
523 | + '<input id="i3GEOlegendabotao10" type="button" value="' + $trad('aplicaAlteracoes', i3GEOF.legenda.dicionario) | |
524 | + + '" style="width: 450px;cursor:pointer;color:blue;display: block;"/>'); | |
525 | + b = new YAHOO.widget.Button("i3GEOlegendabotao10", { | |
526 | + onclick : { | |
527 | + fn : i3GEOF.legenda.aplicaEstilo | |
528 | + } | |
529 | + }); | |
530 | + b.addClass("rodar"); | |
531 | + $i("i3GEOlegendabotao10-button").style.width = "100%"; | |
532 | + $i("i3GEOlegendabotao10").style.width = "100%"; | |
533 | + $i("i3GEOlegendabotao10").style.display = tipo; | |
534 | + } | |
535 | + }, | |
536 | + /* | |
537 | + * Function: aposAlterarLegenda | |
538 | + * | |
539 | + * Função executada após ocorrer alguma alteração efetiva da legenda do mapa | |
540 | + */ | |
541 | + aposAlterarLegenda : function() { | |
542 | + i3GEO.arvoreDeCamadas.CAMADAS = []; | |
543 | + i3GEO.atualiza(); | |
544 | + i3GEO.Interface.atualizaTema("", i3GEOF.legenda.tema); | |
545 | + i3GEO.arvoreDeCamadas.atualizaLegenda(i3GEOF.legenda.tema); | |
546 | + i3GEO.mapa.legendaHTML.atualiza(); | |
547 | + }, | |
548 | + /* | |
549 | + * Function: mostralegenda | |
550 | + * | |
551 | + * Pega os dados da legenda do mapa atual e mostra na tela | |
552 | + * | |
553 | + * Veja: | |
554 | + * | |
555 | + * <EDITALEGENDA> | |
556 | + */ | |
557 | + mostralegenda : function() { | |
558 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
559 | + return; | |
560 | + } | |
561 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
562 | + var p, cp; | |
563 | + p = | |
564 | + i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" | |
565 | + + i3GEO.configura.sid | |
566 | + + "&funcao=editalegenda&opcao=edita&tema=" | |
567 | + + i3GEOF.legenda.tema; | |
568 | + cp = new cpaint(); | |
569 | + cp.set_response_type("JSON"); | |
570 | + cp.call(p, "tabelaLegenda", i3GEOF.legenda.montaLegenda); | |
571 | + }, | |
572 | + /* | |
573 | + * Function: montaLegenda | |
574 | + * | |
575 | + * Formata a tabela de edição da legenda | |
576 | + * | |
577 | + * Parametro: | |
578 | + * | |
579 | + * retorno - objeto contendo os dados para formatação da legenda | |
580 | + */ | |
581 | + montaLegenda : function(retorno) { | |
582 | + i3GEOF.legenda.aviso = false; | |
583 | + try { | |
584 | + if (retorno.data != undefined) { | |
585 | + var b, ins, i, ajuda, id, re, exp, n, filtro; | |
586 | + // se nao for do tipo raster | |
587 | + if (retorno.data[0].proc === "") { | |
588 | + ins = | |
589 | + [ | |
590 | + "<table class=lista4 id=i3GEOlegendalegenda ><tr>" + "<td><img src='" | |
591 | + + i3GEO.configura.locaplic | |
592 | + + "/imagens/inverter.png' title='Inverter cores' onclick='i3GEOF.legenda.inverteCores()' style=cursor:pointer /></td>" | |
593 | + + "<td style=background-color:white ><img src='" | |
594 | + + i3GEO.configura.locaplic | |
595 | + + "/imagens/tamanho.png' title='Calcula tamanho' onclick='i3GEOF.legenda.calculaTamanho()' style=cursor:pointer /></td>" | |
596 | + + "<td></td>" | |
597 | + + "<td style=background-color:yellow >" | |
598 | + + "<img src='" | |
599 | + + i3GEO.configura.locaplic | |
600 | + + "/imagens/oxygen/16x16/draw-triangle.png' title='Ordenar' onclick='i3GEOF.legenda.ordenaClasses()' style=cursor:pointer />" | |
601 | + + "<span style='vertical-align:super;margin-left:3px;'>nome</span></td>" | |
602 | + + "<td style=background-color:yellow >expressão</td>" | |
603 | + + "<td style=background-color:yellow ></td>" | |
604 | + + "<td style=background-color:yellow >minScale</td>" | |
605 | + + "<td style=background-color:yellow >maxScale</td>" | |
606 | + + "</tr>" | |
607 | + ]; | |
608 | + n = retorno.data.length; | |
609 | + for (i = 0; i < n; i++) { | |
610 | + id = retorno.data[i].tema + "-" + retorno.data[i].idclasse; // layer+indice da classe | |
611 | + re = new RegExp("'", "g"); | |
612 | + exp = (retorno.data[i].expressao).replace(re, '"'); | |
613 | + | |
614 | + ins.push("<tr>"); | |
615 | + ins.push("<td><div style='cursor:pointer;height:14px;' title='" + $trad('cliqueExclui', i3GEOF.legenda.dicionario) | |
616 | + + "' onclick='i3GEOF.legenda.excluilinhaf(this)' src='" | |
617 | + + i3GEO.configura.locaplic | |
618 | + + "/imagens/x.gif' title='excluir' class='i3GEOiconeXis' > </div></td>"); | |
619 | + | |
620 | + ins.push("<td><img width='30px' height='15px' style='cursor:pointer' title='" + $trad( | |
621 | + 'cliqueAltera', | |
622 | + i3GEOF.legenda.dicionario) | |
623 | + + "' src='" | |
624 | + + retorno.data[i].imagem | |
625 | + + "' onclick=i3GEOF.legenda.editaSimbolo('i3GEOlegendaid_" | |
626 | + + id | |
627 | + + "') /></td>"); | |
628 | + | |
629 | + ins.push("<td><img onclick=i3GEOF.legenda.modificaCor('" + retorno.data[i].idclasse | |
630 | + + "') title='alterar a cor' style='cursor:pointer' src='" | |
631 | + + i3GEO.configura.locaplic | |
632 | + + "/imagens/aquarela.gif' /></td>"); | |
633 | + | |
634 | + ins.push("<td>" + $inputText( | |
635 | + "", | |
636 | + "", | |
637 | + "i3GEOlegendaid_" + id, | |
638 | + $trad('digitaNovoNome', i3GEOF.legenda.dicionario), | |
639 | + 20, | |
640 | + retorno.data[i].nomeclasse, | |
641 | + "nome", | |
642 | + "javascript:i3GEOF.legenda.aviso()") | |
643 | + + "</td>"); | |
644 | + | |
645 | + filtro = | |
646 | + "<img title='" + $trad("editorExp", i3GEOF.legenda.dicionario) | |
647 | + + "' src='" | |
648 | + + i3GEO.configura.locaplic | |
649 | + + "/imagens/oxygen/16x16/tools-wizard.png' " | |
650 | + + "onclick='i3GEOF.legenda.filtro(\"" | |
651 | + + "i3GEOlegendaid_exp" | |
652 | + + id | |
653 | + + "\")'>"; | |
654 | + | |
655 | + ins.push("<td>" + $inputText("", "", "i3GEOlegendaid_exp" + id, $trad( | |
656 | + 'digitaNovaExpressao', | |
657 | + i3GEOF.legenda.dicionario), 25, exp, "expressao", "javascript:i3GEOF.legenda.aviso()") | |
658 | + + "</td>"); | |
659 | + | |
660 | + ins.push("<td>" + filtro + "</td>"); | |
661 | + | |
662 | + ins.push("<td>" + $inputText( | |
663 | + "", | |
664 | + "", | |
665 | + "i3GEOlegendaid_" + id, | |
666 | + $trad('minScale', i3GEOF.legenda.dicionario), | |
667 | + 10, | |
668 | + retorno.data[i].minScale, | |
669 | + "minScale", | |
670 | + "javascript:i3GEOF.legenda.aviso()") | |
671 | + + "</td>"); | |
672 | + | |
673 | + ins.push("<td>" + $inputText( | |
674 | + "", | |
675 | + "", | |
676 | + "i3GEOlegendaid_" + id, | |
677 | + $trad('maxScale', i3GEOF.legenda.dicionario), | |
678 | + 10, | |
679 | + retorno.data[i].maxScale, | |
680 | + "maxScale", | |
681 | + "javascript:i3GEOF.legenda.aviso()") | |
682 | + + "</td>"); | |
683 | + | |
684 | + if (n > 1) { | |
685 | + ins.push("<td><img src='" + i3GEO.configura.locaplic | |
686 | + + "/imagens/sobe1.png' style=cursor:pointer title='" | |
687 | + + $trad('sobe', i3GEOF.legenda.dicionario) | |
688 | + + "' onclick=i3GEOF.legenda.sobelinhaf('" | |
689 | + + retorno.data[i].idclasse | |
690 | + + "') /></td>"); | |
691 | + | |
692 | + ins.push("<td><img src='" + i3GEO.configura.locaplic | |
693 | + + "/imagens/desce1.png' style=cursor:pointer title='" | |
694 | + + $trad('desce', i3GEOF.legenda.dicionario) | |
695 | + + "' onclick=i3GEOF.legenda.descelinhaf('" | |
696 | + + retorno.data[i].idclasse | |
697 | + + "') /></td>"); | |
698 | + } | |
699 | + ins.push("</tr>"); | |
700 | + } | |
701 | + ins.push("</table><br>"); | |
702 | + $i("i3GEOlegendaresultado").innerHTML = ins.join(""); | |
703 | + } else { | |
704 | + ajuda = | |
705 | + "<br><p class=paragrafo >" + $trad('ajudaEscalaCores', i3GEOF.legenda.dicionario) | |
706 | + + "<p class=paragrafo >" | |
707 | + + $trad('msgEscalaCoresAuto', i3GEOF.legenda.dicionario) | |
708 | + + "<p class=paragrafo >" | |
709 | + + $trad('msgEscalaCoresIndividual', i3GEOF.legenda.dicionario) | |
710 | + + "<p class=paragrafo >" | |
711 | + + $trad('msgBandas', i3GEOF.legenda.dicionario) | |
712 | + + "<p class=paragrafo >" | |
713 | + + $trad('msgReamostragem', i3GEOF.legenda.dicionario); | |
714 | + ins = | |
715 | + "<p class=paragrafo >" + $trad('adicionaProcesso', i3GEOF.legenda.dicionario) | |
716 | + + ":" | |
717 | + + "<select onchange=i3GEOF.legenda.adicionaProcesso(this) >" | |
718 | + + "<option value='' >" | |
719 | + + $trad('selecionaProcesso', i3GEOF.legenda.dicionario) | |
720 | + + "</option>" | |
721 | + + "<option value='SCALE=' >" | |
722 | + + $trad('escalaCores', i3GEOF.legenda.dicionario) | |
723 | + + "</option>" | |
724 | + + "<option value='RESAMPLE=' >" | |
725 | + + $trad('reamostragem', i3GEOF.legenda.dicionario) | |
726 | + + "</option>" | |
727 | + + "<option value='BANDS=' >" | |
728 | + + $trad('bandas', i3GEOF.legenda.dicionario) | |
729 | + + "</option>" | |
730 | + + "<option value='COLOR_MATCH_THRESHOLD=' >Threshold</option>" | |
731 | + + "<option value='NODATA=' >Nodata</option>" | |
732 | + + "</select><br>" | |
733 | + + '<p class=paragrafo ><input id=i3GEOlegendabotao16 class="executar" size="22" type="buttom" value="' | |
734 | + + $trad('aplicaProcesso', i3GEOF.legenda.dicionario) | |
735 | + + '">'; | |
736 | + if (retorno.data[0].proc == "") { | |
737 | + ins += "<div style=width:80% id=i3GEOlegendaprocessos ></div>"; | |
738 | + } else { | |
739 | + ins += "<div style='width:80%;text-align:left;' id=i3GEOlegendaprocessos >"; | |
740 | + for (i = 0; i < retorno.data[0].proc.length; i++) { | |
741 | + ins += "<br>" + $inputText("", "", "", "", 50, retorno.data[0].proc[i]); | |
742 | + } | |
743 | + ins += "</div>"; | |
744 | + } | |
745 | + $i("i3GEOlegendaresultado").innerHTML = ins + ajuda; | |
746 | + b = new YAHOO.widget.Button("i3GEOlegendabotao16", { | |
747 | + onclick : { | |
748 | + fn : i3GEOF.legenda.aplicaProcessos | |
749 | + } | |
750 | + }); | |
751 | + b.addClass("rodar"); | |
752 | + } | |
753 | + } else { | |
754 | + $i("i3GEOlegendaresultado").innerHTML = "<p style=color:red >Erro<br>"; | |
755 | + } | |
756 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
757 | + } catch (e) { | |
758 | + i3GEO.janela.tempoMsg($trad('msgNaoEditaLegenda', i3GEOF.legenda.dicionario)); | |
759 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
760 | + } | |
761 | + }, | |
762 | + filtro : function(idRetorno) { | |
763 | + i3GEO.tema.dialogo.filtro(i3GEOF.legenda.tema, true, idRetorno); | |
764 | + }, | |
765 | + /* | |
766 | + * Function: aviso | |
767 | + * | |
768 | + * Mostra um i3GEO.janela.tempoMsga ao usuário quando um campo da tabela que contém os dados da legenda é | |
769 | + * alterado | |
770 | + * | |
771 | + * O aviso é mostrado apenas uma vez | |
772 | + */ | |
773 | + aviso : function() { | |
774 | + if (i3GEOF.legenda.aviso == true) { | |
775 | + i3GEO.janela.tempoMsg($trad('msgAplicaAlteracao', i3GEOF.legenda.dicionario)); | |
776 | + i3GEOF.legenda.aviso == false; | |
777 | + } | |
778 | + }, | |
779 | + /* | |
780 | + * Function: aplicaColourRamp | |
781 | + * | |
782 | + * Aplica nas classes da legenda as cores escolhidas no seletor de cores | |
783 | + */ | |
784 | + aplicaColourRamp : function() { | |
785 | + if ($i("listaColourRamp").value != "") { | |
786 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
787 | + return; | |
788 | + } | |
789 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
790 | + var cores = $i("listaColourRamp").value, ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), temp = function() { | |
791 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
792 | + i3GEOF.legenda.mostralegenda(); | |
793 | + i3GEOF.legenda.aposAlterarLegenda(); | |
794 | + }, p = | |
795 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
796 | + + i3GEO.configura.sid | |
797 | + + "&funcao=alteraclasse&opcao=aplicacoresrgb&ext=" | |
798 | + + ext | |
799 | + + "&tema=" | |
800 | + + i3GEOF.legenda.tema, cp = new cpaint(); | |
801 | + cp.set_transfer_mode('POST'); | |
802 | + cp.set_response_type("JSON"); | |
803 | + cp.call(p, "foo", temp, "cores=" + cores); | |
804 | + } | |
805 | + }, | |
806 | + /* | |
807 | + * Function: corj | |
808 | + * | |
809 | + * Abre a janela para o usuário selecionar uma cor interativamente | |
810 | + */ | |
811 | + corj : function(obj) { | |
812 | + i3GEO.util.abreCor("", obj); | |
813 | + }, | |
814 | + /* | |
815 | + * Function: modificaCor | |
816 | + * | |
817 | + * Modifica a cor de uma classe | |
818 | + */ | |
819 | + modificaCor : function(id) { | |
820 | + var obj = $i("tempCorLegenda"); | |
821 | + if (!obj) { | |
822 | + var obj = document.createElement("input"); | |
823 | + obj.id = "tempCorLegenda"; | |
824 | + obj.style.display = "none"; | |
825 | + obj.type = "text"; | |
826 | + obj.value = ""; | |
827 | + document.body.appendChild(obj); | |
828 | + obj.onchange = function() { | |
829 | + i3GEOF.legenda.aplicaNovaCor($i("tempCorLegenda").name); | |
830 | + }; | |
831 | + } | |
832 | + obj.name = id; | |
833 | + i3GEO.util.abreCor("", "tempCorLegenda"); | |
834 | + }, | |
835 | + aplicaNovaCor : function(id) { | |
836 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
837 | + return; | |
838 | + } | |
839 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
840 | + var retorna = function() { | |
841 | + i3GEOF.legenda.aposAlterarLegenda(); | |
842 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
843 | + i3GEOF.legenda.mostralegenda(); | |
844 | + }; | |
845 | + i3GEO.php.aplicaCorClasseTema(retorna, i3GEOF.legenda.tema, id, $i("tempCorLegenda").value); | |
846 | + }, | |
847 | + aplicarLegendaImg : function() { | |
848 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
849 | + return; | |
850 | + } | |
851 | + //muda o valor do objeto tema para que a proxima vez que abrir a ferramenta o campo input seja preenchido corretamente | |
852 | + var objTema = i3GEO.arvoreDeCamadas.pegaTema(i3GEOF.legenda.tema); | |
853 | + objTema.legendaimg = $i("i3GEOlegendaImg").value; | |
854 | + | |
855 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
856 | + var retorna = function() { | |
857 | + i3GEOF.legenda.aposAlterarLegenda(); | |
858 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
859 | + i3GEOF.legenda.mostralegenda(); | |
860 | + }; | |
861 | + var p = | |
862 | + i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" | |
863 | + + i3GEO.configura.sid | |
864 | + + "&funcao=aplicaLegendaImg" | |
865 | + + "&tema=" | |
866 | + + i3GEOF.legenda.tema | |
867 | + + "&imagem=" | |
868 | + + objTema.legendaimg, | |
869 | + cp = new cpaint(); | |
870 | + cp.set_response_type("JSON"); | |
871 | + cp.call(p, "foo", retorna); | |
872 | + }, | |
873 | + aplicarOffsite : function() { | |
874 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
875 | + return; | |
876 | + } | |
877 | + //muda o valor do objeto tema para que a proxima vez que abrir a ferramenta o campo input seja preenchido corretamente | |
878 | + var objTema = i3GEO.arvoreDeCamadas.pegaTema(i3GEOF.legenda.tema); | |
879 | + objTema.offsite = $i("i3GEOoffsite").value; | |
880 | + | |
881 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
882 | + var retorna = function() { | |
883 | + i3GEOF.legenda.aposAlterarLegenda(); | |
884 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
885 | + i3GEOF.legenda.mostralegenda(); | |
886 | + }; | |
887 | + var p = | |
888 | + i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" | |
889 | + + i3GEO.configura.sid | |
890 | + + "&funcao=aplicaOffsite" | |
891 | + + "&tema=" | |
892 | + + i3GEOF.legenda.tema | |
893 | + + "&offsite=" | |
894 | + + objTema.offsite, | |
895 | + cp = new cpaint(); | |
896 | + cp.set_response_type("JSON"); | |
897 | + cp.call(p, "foo", retorna); | |
898 | + }, | |
899 | + /* | |
900 | + * Function: mudaLegenda | |
901 | + * | |
902 | + * Altera a legenda conforme os valores existentes na tabela de propriedades (expressão e nome da classe) | |
903 | + * | |
904 | + * Veja: | |
905 | + * | |
906 | + * <ALTERACLASSE> | |
907 | + */ | |
908 | + mudaLegenda : function() { | |
909 | + i3GEOF.legenda.aviso = false; | |
910 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
911 | + return; | |
912 | + } | |
913 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
914 | + try { | |
915 | + var tabela = $i("i3GEOlegendalegenda"), trs = tabela.getElementsByTagName("tr"), minScales = [], maxScales = [], nomes = [], exps = | |
916 | + [], ids = [], t, nn, n, p, cp, temp; | |
917 | + // expn, | |
918 | + // re = new RegExp('"', "g"); | |
919 | + for (t = 0; t < trs.length; t++) { | |
920 | + if (trs[t].childNodes) { | |
921 | + nn = trs[t].childNodes; | |
922 | + for (n = 0; n < nn.length; n++) { | |
923 | + if (nn[n].childNodes) { | |
924 | + var isn = nn[n].getElementsByTagName("input"); | |
925 | + if (isn[0] != undefined) { | |
926 | + if (isn[0].name == "nome") { | |
927 | + nomes.push(isn[0].value); | |
928 | + temp = (isn[0].id).split("i3GEOlegendaid_"); | |
929 | + ids.push(temp[1]); | |
930 | + } | |
931 | + if (isn[0].name == "expressao") { | |
932 | + exps.push(isn[0].value); | |
933 | + } | |
934 | + if (isn[0].name == "minScale") { | |
935 | + minScales.push(parseInt(isn[0].value, 10)); | |
936 | + } | |
937 | + if (isn[0].name == "maxScale") { | |
938 | + maxScales.push(parseInt(isn[0].value, 10)); | |
939 | + } | |
940 | + } | |
941 | + } | |
942 | + } | |
943 | + } | |
944 | + } | |
945 | + ids = ids.join(";"); | |
946 | + nomes = nomes.join(";"); | |
947 | + exps = exps.join(";"); | |
948 | + minScales = minScales.join(";"); | |
949 | + maxScales = maxScales.join(";"); | |
950 | + temp = function() { | |
951 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
952 | + i3GEOF.legenda.mostralegenda(); | |
953 | + i3GEOF.legenda.aposAlterarLegenda(); | |
954 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
955 | + }; | |
956 | + var ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten); | |
957 | + p = | |
958 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?" | |
959 | + + "base64=nao" | |
960 | + + "&g_sid=" | |
961 | + + i3GEO.configura.sid | |
962 | + + "&funcao=alteraclasse" | |
963 | + + "&opcao=alteraclasses" | |
964 | + + "&ext=" | |
965 | + + ext; | |
966 | + cp = new cpaint(); | |
967 | + cp.set_transfer_mode('POST'); | |
968 | + cp.set_response_type("JSON"); | |
969 | + cp.call(p, "alteraclassesPost", temp, "ids=" + ids | |
970 | + + "&nomes=" | |
971 | + //+ i3GEO.util.base64encode(nomes) | |
972 | + + nomes | |
973 | + + "&exps=" | |
974 | + //+ i3GEO.util.base64encode(exps) | |
975 | + + exps | |
976 | + + "&minScales=" | |
977 | + + minScales | |
978 | + + "&maxScales=" | |
979 | + + maxScales); | |
980 | + } catch (e) { | |
981 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
982 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
983 | + } | |
984 | + }, | |
985 | + /* | |
986 | + * Function: alteraGeometria | |
987 | + * | |
988 | + * Altera o tipo de representação geométrica dos elementos de um layer | |
989 | + * | |
990 | + * Veja: | |
991 | + * | |
992 | + * <ALTERACLASSE> | |
993 | + */ | |
994 | + alteraGeometriaTema : function() { | |
995 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
996 | + return; | |
997 | + } | |
998 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
999 | + var retorna = function() { | |
1000 | + i3GEOF.legenda.aposAlterarLegenda(); | |
1001 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1002 | + i3GEOF.legenda.mostralegenda(); | |
1003 | + }; | |
1004 | + var p = | |
1005 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1006 | + + i3GEO.configura.sid | |
1007 | + + "&funcao=alteraclasse&opcao=alterageometria&tema=" | |
1008 | + + i3GEOF.legenda.tema | |
1009 | + + "&tipo=" | |
1010 | + + $i("i3GEOlegentaTipoGeo").value, cp = new cpaint(); | |
1011 | + cp.set_response_type("JSON"); | |
1012 | + cp.call(p, "", retorna); | |
1013 | + }, | |
1014 | + /* | |
1015 | + * Function: adicionaConta | |
1016 | + * | |
1017 | + * Adiciona ao nome de cada classe o número de ocorrências em cada uma | |
1018 | + * | |
1019 | + * Veja: | |
1020 | + * | |
1021 | + * <CONTAGEMCLASSE> | |
1022 | + */ | |
1023 | + adicionaConta : function() { | |
1024 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1025 | + return; | |
1026 | + } | |
1027 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1028 | + var p = | |
1029 | + i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" | |
1030 | + + i3GEO.configura.sid | |
1031 | + + "&funcao=contagemclasse" | |
1032 | + + "&tema=" | |
1033 | + + i3GEOF.legenda.tema, cp = new cpaint(); | |
1034 | + cp.set_response_type("JSON"); | |
1035 | + cp.call(p, "contagemclasse", i3GEOF.legenda.montaLegenda); | |
1036 | + i3GEO.janela.tempoMsg($trad('consideraElementosVisiveis', i3GEOF.legenda.dicionario)); | |
1037 | + }, | |
1038 | + /* | |
1039 | + * Function: adicionaClasse | |
1040 | + * | |
1041 | + * Adiciona uma nova classe ao tema | |
1042 | + * | |
1043 | + * Veja: | |
1044 | + * | |
1045 | + * <ALTERACLASSE> | |
1046 | + */ | |
1047 | + adicionaClasse : function() { | |
1048 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1049 | + return; | |
1050 | + } | |
1051 | + var ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten); | |
1052 | + var p = | |
1053 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1054 | + + i3GEO.configura.sid | |
1055 | + + "&funcao=alteraclasse&opcao=adicionaclasse" | |
1056 | + + "&tema=" | |
1057 | + + i3GEOF.legenda.tema | |
1058 | + + "&ext=" | |
1059 | + + ext, cp = new cpaint(); | |
1060 | + cp.set_response_type("JSON"); | |
1061 | + cp.call(p, "alteraclasse", i3GEOF.legenda.mostralegenda); | |
1062 | + }, | |
1063 | + /* | |
1064 | + * Function: adicionaOpacidade | |
1065 | + * | |
1066 | + * Adiciona opacidade variável em cada classe | |
1067 | + * | |
1068 | + * Veja: | |
1069 | + * | |
1070 | + * <ALTERACLASSE> | |
1071 | + */ | |
1072 | + adicionaOpacidade : function() { | |
1073 | + var retorna = function() { | |
1074 | + i3GEOF.legenda.aposAlterarLegenda(); | |
1075 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1076 | + i3GEOF.legenda.mostralegenda(); | |
1077 | + }; | |
1078 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1079 | + return; | |
1080 | + } | |
1081 | + var ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten); | |
1082 | + var p = | |
1083 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1084 | + + i3GEO.configura.sid | |
1085 | + + "&funcao=alteraclasse&opcao=adicionaopacidade" | |
1086 | + + "&tema=" | |
1087 | + + i3GEOF.legenda.tema | |
1088 | + + "&ext=" | |
1089 | + + ext, cp = new cpaint(); | |
1090 | + cp.set_response_type("JSON"); | |
1091 | + cp.call(p, "alteraclasse", retorna); | |
1092 | + }, | |
1093 | + /* | |
1094 | + * Function: paleta | |
1095 | + * | |
1096 | + * Gera as cores para as classes considerando um RGB inicial e um final | |
1097 | + * | |
1098 | + * Veja: | |
1099 | + * | |
1100 | + * <ALTERACORESCLASSES> | |
1101 | + */ | |
1102 | + paleta : function() { | |
1103 | + try { | |
1104 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1105 | + return; | |
1106 | + } | |
1107 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1108 | + var retornapaleta = function() { | |
1109 | + i3GEOF.legenda.aposAlterarLegenda(); | |
1110 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1111 | + i3GEOF.legenda.mostralegenda(); | |
1112 | + }, ci = $i("i3GEOlegendaacori").value, cf = $i("i3GEOlegendaacorf").value, cp = new cpaint(), p = | |
1113 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1114 | + + i3GEO.configura.sid | |
1115 | + + "&funcao=alteraCoresClasses&tema=" | |
1116 | + + i3GEOF.legenda.tema | |
1117 | + + "&cori=" | |
1118 | + + ci | |
1119 | + + "&corf=" | |
1120 | + + cf; | |
1121 | + cp.set_response_type("JSON"); | |
1122 | + cp.call(p, "alteraCoresClasses", retornapaleta); | |
1123 | + } catch (e) { | |
1124 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1125 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1126 | + } | |
1127 | + }, | |
1128 | + /* | |
1129 | + * Function: inverteCores | |
1130 | + * | |
1131 | + * Inverte as cores utilizadas nos símbolos das classes | |
1132 | + * | |
1133 | + * Veja: | |
1134 | + * | |
1135 | + * <INVERTECORESCLASSES> | |
1136 | + */ | |
1137 | + inverteCores : function() { | |
1138 | + try { | |
1139 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1140 | + return; | |
1141 | + } | |
1142 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1143 | + var retornapaleta = function() { | |
1144 | + i3GEOF.legenda.aposAlterarLegenda(); | |
1145 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1146 | + i3GEOF.legenda.mostralegenda(); | |
1147 | + }, cp = new cpaint(), p = | |
1148 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1149 | + + i3GEO.configura.sid | |
1150 | + + "&funcao=inverteCoresClasses&tema=" | |
1151 | + + i3GEOF.legenda.tema; | |
1152 | + cp.set_response_type("JSON"); | |
1153 | + cp.call(p, "alteraCoresClasses", retornapaleta); | |
1154 | + } catch (e) { | |
1155 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1156 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1157 | + } | |
1158 | + }, | |
1159 | + /* | |
1160 | + * Function: calculaTamanho | |
1161 | + * | |
1162 | + * Muda o símbolo de cada classe aplicando tamanhos diferentes e lineares | |
1163 | + * | |
1164 | + * Veja: | |
1165 | + * | |
1166 | + * <CALCULATAMANHOCLASSES> | |
1167 | + */ | |
1168 | + calculaTamanho : function() { | |
1169 | + try { | |
1170 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1171 | + return; | |
1172 | + } | |
1173 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1174 | + var retornapaleta = function() { | |
1175 | + i3GEOF.legenda.aposAlterarLegenda(); | |
1176 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1177 | + i3GEOF.legenda.mostralegenda(); | |
1178 | + }, cp = new cpaint(), p = | |
1179 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1180 | + + i3GEO.configura.sid | |
1181 | + + "&funcao=calculaTamanhoClasses&tema=" | |
1182 | + + i3GEOF.legenda.tema; | |
1183 | + cp.set_response_type("JSON"); | |
1184 | + cp.call(p, "calculaTamanhoClasses", retornapaleta); | |
1185 | + } catch (e) { | |
1186 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1187 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1188 | + } | |
1189 | + }, | |
1190 | + /* | |
1191 | + * Function: ordenaClasses | |
1192 | + * | |
1193 | + * Ordena as classes pelo nome | |
1194 | + * | |
1195 | + */ | |
1196 | + ordenaClasses : function() { | |
1197 | + try { | |
1198 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1199 | + return; | |
1200 | + } | |
1201 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1202 | + var retornapaleta = function() { | |
1203 | + i3GEOF.legenda.aposAlterarLegenda(); | |
1204 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1205 | + i3GEOF.legenda.mostralegenda(); | |
1206 | + }, cp = new cpaint(), p = | |
1207 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1208 | + + i3GEO.configura.sid | |
1209 | + + "&funcao=ordenaClasses&tema=" | |
1210 | + + i3GEOF.legenda.tema; | |
1211 | + cp.set_response_type("JSON"); | |
1212 | + cp.call(p, "foo", retornapaleta); | |
1213 | + } catch (e) { | |
1214 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1215 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1216 | + } | |
1217 | + }, | |
1218 | + /* | |
1219 | + * Function: excluilinhaf | |
1220 | + * | |
1221 | + * Exclui uma linha da tabela de edição de classes da legendda | |
1222 | + */ | |
1223 | + excluilinhaf : function(celula) { | |
1224 | + var p = celula.parentNode.parentNode; | |
1225 | + do { | |
1226 | + p.removeChild(p.childNodes[0]); | |
1227 | + } while (p.childNodes.length > 0); | |
1228 | + p.parentNode.removeChild(p); | |
1229 | + i3GEOF.legenda.mudaLegenda(); | |
1230 | + }, | |
1231 | + /* | |
1232 | + * Function: sobelinhaf | |
1233 | + * | |
1234 | + * Sobe uma linha na tabela de edição de classes da legendda | |
1235 | + */ | |
1236 | + sobelinhaf : function(idclasse) { | |
1237 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1238 | + return; | |
1239 | + } | |
1240 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1241 | + var p = | |
1242 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1243 | + + i3GEO.configura.sid | |
1244 | + + "&funcao=ALTERACLASSE&opcao=sobeclasse&tema=" | |
1245 | + + i3GEOF.legenda.tema | |
1246 | + + "&idclasse=" | |
1247 | + + idclasse, cp = new cpaint(), temp = function() { | |
1248 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1249 | + i3GEOF.legenda.mostralegenda(); | |
1250 | + }; | |
1251 | + cp.set_response_type("JSON"); | |
1252 | + cp.call(p, "foo", temp); | |
1253 | + }, | |
1254 | + /* | |
1255 | + * Function: descelinhaf | |
1256 | + * | |
1257 | + * Desce uma linha na tabela de edição de classes da legendda | |
1258 | + */ | |
1259 | + descelinhaf : function(idclasse) { | |
1260 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1261 | + return; | |
1262 | + } | |
1263 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1264 | + var p = | |
1265 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1266 | + + i3GEO.configura.sid | |
1267 | + + "&funcao=ALTERACLASSE&opcao=desceclasse&tema=" | |
1268 | + + i3GEOF.legenda.tema | |
1269 | + + "&idclasse=" | |
1270 | + + idclasse, cp = new cpaint(), temp = function() { | |
1271 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1272 | + i3GEOF.legenda.mostralegenda(); | |
1273 | + }; | |
1274 | + ; | |
1275 | + cp.set_response_type("JSON"); | |
1276 | + cp.call(p, "foo", temp); | |
1277 | + }, | |
1278 | + /* | |
1279 | + * Function: editaSimbolo | |
1280 | + * | |
1281 | + * Abre o editor de símbolos | |
1282 | + * | |
1283 | + * Veja: | |
1284 | + * | |
1285 | + * <EDITASIMBOLO> | |
1286 | + */ | |
1287 | + editaSimbolo : function(id) { | |
1288 | + try { | |
1289 | + $i("i3GEOlegendaguia1obj").style.display = "none"; | |
1290 | + $i("i3GEOlegendaguia3obj").style.display = "block"; | |
1291 | + i3GEOF.legenda.ativaAplicar("block"); | |
1292 | + id = id.split("-"); | |
1293 | + i3GEOF.legenda.classe = id[1]; | |
1294 | + i3GEOF.legenda.estilo = 0; | |
1295 | + i3GEOF.legenda.formEditorSimbolo(); | |
1296 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1297 | + } catch (e) { | |
1298 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1299 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1300 | + } | |
1301 | + }, | |
1302 | + formEditorSimbolo : function() { | |
1303 | + var p = | |
1304 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1305 | + + i3GEO.configura.sid | |
1306 | + + "&funcao=editasimbolo&opcao=pegaparametros&tema=" | |
1307 | + + i3GEOF.legenda.tema | |
1308 | + + "&classe=" | |
1309 | + + i3GEOF.legenda.classe, cp = new cpaint(); | |
1310 | + cp.set_response_type("JSON"); | |
1311 | + cp.call(p, "pegaParametrosMapa", i3GEOF.legenda.montaEditor); | |
1312 | + }, | |
1313 | + /* | |
1314 | + * Function: simbU | |
1315 | + * | |
1316 | + * Altera a leganda do tema para o tipo símbolo único | |
1317 | + * | |
1318 | + * Veja: | |
1319 | + * | |
1320 | + * <ALTERACLASSE> | |
1321 | + */ | |
1322 | + simbU : function() { | |
1323 | + try { | |
1324 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1325 | + return; | |
1326 | + } | |
1327 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1328 | + var ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten); | |
1329 | + var p = | |
1330 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1331 | + + i3GEO.configura.sid | |
1332 | + + "&funcao=alteraclasse&tema=" | |
1333 | + + i3GEOF.legenda.tema | |
1334 | + + "&opcao=simbolounico&ext=" | |
1335 | + + ext, cp = new cpaint(), fim = function() { | |
1336 | + i3GEOF.legenda.aposAlterarLegenda(); | |
1337 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1338 | + }; | |
1339 | + cp.set_response_type("JSON"); | |
1340 | + cp.call(p, "alteraclasse", fim); | |
1341 | + } catch (e) { | |
1342 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1343 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1344 | + } | |
1345 | + }, | |
1346 | + /* | |
1347 | + * Function: valorU | |
1348 | + * | |
1349 | + * Altera a leganda do tema para o tipo valor único | |
1350 | + * | |
1351 | + * Veja: | |
1352 | + * | |
1353 | + * <ALTERACLASSE> | |
1354 | + */ | |
1355 | + valorU : function() { | |
1356 | + try { | |
1357 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1358 | + return; | |
1359 | + } | |
1360 | + var item = $i("i3GEOlegendaitensValorUnico").getElementsByTagName("select")[0].value, itemNome = | |
1361 | + $i("i3GEOlegendaClassesValorUnico").getElementsByTagName("select")[0].value, p = | |
1362 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1363 | + + i3GEO.configura.sid | |
1364 | + + "&funcao=alteraclasse&tema=" | |
1365 | + + i3GEOF.legenda.tema | |
1366 | + + "&item=" | |
1367 | + + item | |
1368 | + + "&itemNome=" | |
1369 | + + itemNome | |
1370 | + + "&opcao=valorunico" | |
1371 | + + "&ignorar=" | |
1372 | + + $i("i3GEOlegendaignorar").value, cp = new cpaint(), fim = function() { | |
1373 | + i3GEOF.legenda.aposAlterarLegenda(); | |
1374 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1375 | + }; | |
1376 | + if ($i("i3GEOFlegendaaplicaextent").checked === true) { | |
1377 | + p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten); | |
1378 | + } else { | |
1379 | + p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal); | |
1380 | + } | |
1381 | + | |
1382 | + if (item == "") { | |
1383 | + i3GEO.janela.tempoMsg($trad('selecionaUmItem', i3GEOF.legenda.dicionario)); | |
1384 | + return; | |
1385 | + } | |
1386 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1387 | + cp.set_response_type("JSON"); | |
1388 | + cp.call(p, "alteraclasse", fim); | |
1389 | + } catch (e) { | |
1390 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1391 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1392 | + } | |
1393 | + }, | |
1394 | + /* | |
1395 | + * Function: valorC | |
1396 | + * | |
1397 | + * Altera a leganda do tema com um número específico de classes | |
1398 | + * | |
1399 | + * Veja: | |
1400 | + * | |
1401 | + * <ALTERACLASSE> | |
1402 | + */ | |
1403 | + valorC : function() { | |
1404 | + try { | |
1405 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1406 | + return; | |
1407 | + } | |
1408 | + var item = $i("i3GEOlegendaitensValorClass").getElementsByTagName("select")[0].value, nclasses = | |
1409 | + $i("i3GEOlegendanclasses").value, ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), p = | |
1410 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1411 | + + i3GEO.configura.sid | |
1412 | + + "&funcao=alteraclasse&nclasses=" | |
1413 | + + nclasses | |
1414 | + + "&tema=" | |
1415 | + + i3GEOF.legenda.tema | |
1416 | + + "&item=" | |
1417 | + + item | |
1418 | + + "&opcao=intervalosiguais&ignorar=" | |
1419 | + + $i("i3GEOlegendaignorar").value | |
1420 | + + "&ext=" | |
1421 | + + ext, cp = new cpaint(), fim = function() { | |
1422 | + i3GEOF.legenda.aposAlterarLegenda(); | |
1423 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1424 | + }; | |
1425 | + if (item == "") { | |
1426 | + i3GEO.janela.tempoMsg("Selecione um item!"); | |
1427 | + return; | |
1428 | + } | |
1429 | + if ($i("i3GEOFlegendaaplicaextent").checked === true) { | |
1430 | + p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten); | |
1431 | + } else { | |
1432 | + p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal); | |
1433 | + } | |
1434 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1435 | + cp.set_response_type("JSON"); | |
1436 | + cp.call(p, "alteraclasse", fim); | |
1437 | + } catch (e) { | |
1438 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1439 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1440 | + } | |
1441 | + }, | |
1442 | + /* | |
1443 | + * Function: metade | |
1444 | + * | |
1445 | + * Duas classes concentrando a soma das metades | |
1446 | + * | |
1447 | + * Veja: | |
1448 | + * | |
1449 | + * <ALTERACLASSE> | |
1450 | + */ | |
1451 | + metade : function() { | |
1452 | + try { | |
1453 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1454 | + return; | |
1455 | + } | |
1456 | + var item = $i("i3GEOlegendaitensMetade").getElementsByTagName("select")[0].value, | |
1457 | + itemid = $i("i3GEOlegendaitensMetadeId").getElementsByTagName("select")[0].value, | |
1458 | + p = i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1459 | + + i3GEO.configura.sid | |
1460 | + + "&funcao=alteraclasse" | |
1461 | + + "&tema=" | |
1462 | + + i3GEOF.legenda.tema | |
1463 | + + "&item=" | |
1464 | + + item | |
1465 | + + "&itemid=" | |
1466 | + + itemid | |
1467 | + + "&opcao=metade&ignorar=" | |
1468 | + + $i("i3GEOlegendaignorar").value, | |
1469 | + cp = new cpaint(), | |
1470 | + fim = function() { | |
1471 | + i3GEOF.legenda.aposAlterarLegenda(); | |
1472 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1473 | + }; | |
1474 | + if (item == "") { | |
1475 | + i3GEO.janela.tempoMsg("Selecione um item!"); | |
1476 | + return; | |
1477 | + } | |
1478 | + if (itemid == "") { | |
1479 | + i3GEO.janela.tempoMsg("Selecione um item!"); | |
1480 | + return; | |
1481 | + } | |
1482 | + if ($i("i3GEOFlegendaaplicaextent").checked === true) { | |
1483 | + p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten); | |
1484 | + } else { | |
1485 | + p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal); | |
1486 | + } | |
1487 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1488 | + cp.set_response_type("JSON"); | |
1489 | + cp.call(p, "alteraclasse", fim); | |
1490 | + } catch (e) { | |
1491 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1492 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1493 | + } | |
1494 | + }, | |
1495 | + /* | |
1496 | + * Function: media | |
1497 | + * | |
1498 | + * Duas classes considerando a media | |
1499 | + * | |
1500 | + * Veja: | |
1501 | + * | |
1502 | + * <ALTERACLASSE> | |
1503 | + */ | |
1504 | + media : function() { | |
1505 | + try { | |
1506 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1507 | + return; | |
1508 | + } | |
1509 | + var item = $i("i3GEOlegendaitensMedia").getElementsByTagName("select")[0].value, | |
1510 | + p = i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1511 | + + i3GEO.configura.sid | |
1512 | + + "&funcao=alteraclasse" | |
1513 | + + "&tema=" | |
1514 | + + i3GEOF.legenda.tema | |
1515 | + + "&item=" | |
1516 | + + item | |
1517 | + + "&opcao=media&ignorar=" | |
1518 | + + $i("i3GEOlegendaignorar").value, | |
1519 | + cp = new cpaint(), | |
1520 | + fim = function() { | |
1521 | + i3GEOF.legenda.aposAlterarLegenda(); | |
1522 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1523 | + }; | |
1524 | + if (item == "") { | |
1525 | + i3GEO.janela.tempoMsg("Selecione um item!"); | |
1526 | + return; | |
1527 | + } | |
1528 | + if ($i("i3GEOFlegendaaplicaextent").checked === true) { | |
1529 | + p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten); | |
1530 | + } else { | |
1531 | + p += "&ext=" + i3GEO.util.extOSM2Geo(i3GEO.parametros.extentTotal); | |
1532 | + } | |
1533 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1534 | + cp.set_response_type("JSON"); | |
1535 | + cp.call(p, "alteraclasse", fim); | |
1536 | + } catch (e) { | |
1537 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1538 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1539 | + } | |
1540 | + }, | |
1541 | + /* | |
1542 | + * Function: valorQ | |
1543 | + * | |
1544 | + * Altera a leganda do tema claculando as classes pelo método quartil | |
1545 | + * | |
1546 | + * Veja: | |
1547 | + * | |
1548 | + * <ALTERACLASSE> | |
1549 | + */ | |
1550 | + valorQ : function() { | |
1551 | + try { | |
1552 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1553 | + return; | |
1554 | + } | |
1555 | + var item = $i("i3GEOlegendaitensValorQuartil").getElementsByTagName("select")[0].value, ext = | |
1556 | + i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), p = | |
1557 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1558 | + + i3GEO.configura.sid | |
1559 | + + "&funcao=alteraclasse&tema=" | |
1560 | + + i3GEOF.legenda.tema | |
1561 | + + "&item=" | |
1562 | + + item | |
1563 | + + "&opcao=quartis&ignorar=" | |
1564 | + + $i("i3GEOlegendaignorar").value | |
1565 | + + "&ext=" | |
1566 | + + ext | |
1567 | + + "&tipoLegenda=" | |
1568 | + + $i("estiloClassesQuartis").value, cp = new cpaint(), fim = function() { | |
1569 | + i3GEOF.legenda.aposAlterarLegenda(); | |
1570 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1571 | + }; | |
1572 | + if (item == "") { | |
1573 | + i3GEO.janela.tempoMsg($trad('selecionaUmItem', i3GEOF.legenda.dicionario)); | |
1574 | + return; | |
1575 | + } | |
1576 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1577 | + cp.set_response_type("JSON"); | |
1578 | + cp.call(p, "alteraclasse", fim); | |
1579 | + } catch (e) { | |
1580 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1581 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1582 | + } | |
1583 | + }, | |
1584 | + /* | |
1585 | + * Function: valorQu | |
1586 | + * | |
1587 | + * Altera a leganda do tema por meio do calculo de quantis | |
1588 | + * | |
1589 | + * Veja: | |
1590 | + * | |
1591 | + * <ALTERACLASSE> | |
1592 | + */ | |
1593 | + valorQu : function() { | |
1594 | + try { | |
1595 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1596 | + return; | |
1597 | + } | |
1598 | + var item = $i("i3GEOlegendaitensValorClass").getElementsByTagName("select")[0].value, nclasses = | |
1599 | + $i("i3GEOlegendanclasses").value, ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), p = | |
1600 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1601 | + + i3GEO.configura.sid | |
1602 | + + "&funcao=alteraclasse&nclasses=" | |
1603 | + + nclasses | |
1604 | + + "&tema=" | |
1605 | + + i3GEOF.legenda.tema | |
1606 | + + "&item=" | |
1607 | + + item | |
1608 | + + "&opcao=quantil&ignorar=" | |
1609 | + + $i("i3GEOlegendaignorar").value | |
1610 | + + "&ext=" | |
1611 | + + ext, cp = new cpaint(), fim = function() { | |
1612 | + i3GEOF.legenda.aposAlterarLegenda(); | |
1613 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1614 | + }; | |
1615 | + if (item == "") { | |
1616 | + i3GEO.janela.tempoMsg($trad('selecionaUmItem', i3GEOF.legenda.dicionario)); | |
1617 | + return; | |
1618 | + } | |
1619 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1620 | + cp.set_response_type("JSON"); | |
1621 | + cp.call(p, "alteraclasse", fim); | |
1622 | + } catch (e) { | |
1623 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1624 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1625 | + } | |
1626 | + }, | |
1627 | + /* | |
1628 | + * Function: valorQN | |
1629 | + * | |
1630 | + * Altera a legenda do tema por meio do calculo de quebras naturais | |
1631 | + * | |
1632 | + * Veja: | |
1633 | + * | |
1634 | + * <ALTERACLASSE> | |
1635 | + */ | |
1636 | + valorQN : function() { | |
1637 | + try { | |
1638 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1639 | + return; | |
1640 | + } | |
1641 | + var item = $i("i3GEOlegendaitensValorClass").getElementsByTagName("select")[0].value, nclasses = | |
1642 | + $i("i3GEOlegendanclasses").value, ext = i3GEO.util.extOSM2Geo(i3GEO.parametros.mapexten), p = | |
1643 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1644 | + + i3GEO.configura.sid | |
1645 | + + "&funcao=alteraclasse&nclasses=" | |
1646 | + + nclasses | |
1647 | + + "&tema=" | |
1648 | + + i3GEOF.legenda.tema | |
1649 | + + "&item=" | |
1650 | + + item | |
1651 | + + "&opcao=quebrasnaturais&ignorar=" | |
1652 | + + $i("i3GEOlegendaignorar").value | |
1653 | + + "&ext=" | |
1654 | + + ext, cp = new cpaint(), fim = function() { | |
1655 | + i3GEOF.legenda.aposAlterarLegenda(); | |
1656 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1657 | + }; | |
1658 | + if (item == "") { | |
1659 | + i3GEO.janela.tempoMsg($trad('selecionaUmItem', i3GEOF.legenda.dicionario)); | |
1660 | + return; | |
1661 | + } | |
1662 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1663 | + cp.set_response_type("JSON"); | |
1664 | + cp.call(p, "alteraclasse", fim); | |
1665 | + } catch (e) { | |
1666 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1667 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1668 | + } | |
1669 | + }, | |
1670 | + | |
1671 | + /* | |
1672 | + * Function: representacao | |
1673 | + * | |
1674 | + * Altera o tipo de representação do tema (linear ou poligonoal) | |
1675 | + * | |
1676 | + * Veja: | |
1677 | + * | |
1678 | + * <ALTERAREPRESENTACAO> | |
1679 | + * | |
1680 | + */ | |
1681 | + representacao : function() { | |
1682 | + try { | |
1683 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1684 | + return; | |
1685 | + } | |
1686 | + var p = | |
1687 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1688 | + + i3GEO.configura.sid | |
1689 | + + "&funcao=alterarepresentacao&tema=" | |
1690 | + + i3GEOF.legenda.tema, cp = new cpaint(), fim = function() { | |
1691 | + i3GEOF.legenda.aposAlterarLegenda(); | |
1692 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1693 | + }; | |
1694 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1695 | + cp.set_response_type("JSON"); | |
1696 | + cp.call(p, "alteraRepresentacao", fim); | |
1697 | + } catch (e) { | |
1698 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1699 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1700 | + } | |
1701 | + }, | |
1702 | + /* | |
1703 | + * Function: montaEditor | |
1704 | + * | |
1705 | + * Monta o editor de símbolos quando o usuário clica em um símbolo na legenda | |
1706 | + */ | |
1707 | + montaEditor : function(retorno) { | |
1708 | + try { | |
1709 | + i3GEO.util.comboItens("i3GEOlegendaSelItemLabel", i3GEOF.legenda.tema, function(retorno) { | |
1710 | + if ($i("i3GEOlegendaitensLabel")) { | |
1711 | + $i("i3GEOlegendaitensLabel").innerHTML = retorno.dados; | |
1712 | + } | |
1713 | + }, "i3GEOlegendaitensLabel"); | |
1714 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1715 | + return; | |
1716 | + } | |
1717 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1718 | + if (retorno.data != undefined) { | |
1719 | + var b, l, i, sct, combo, n; | |
1720 | + retorno = retorno.data; | |
1721 | + i3GEOF.legenda.estilos = retorno.split("|"); | |
1722 | + combo = | |
1723 | + "<div class=styled-select style=width:100px ><select id='i3GEOlegendaestilos' onchange=i3GEOF.legenda.mostraEstilo(this.value)>"; | |
1724 | + n = i3GEOF.legenda.estilos.length; | |
1725 | + for (i = 0; i < n; i++) { | |
1726 | + l = i3GEOF.legenda.estilos[i].split("#"); | |
1727 | + sct = "<option value=" + l[1] + " />" + l[1] + "</option>"; | |
1728 | + combo += sct; | |
1729 | + } | |
1730 | + combo += "</select></div>"; | |
1731 | + $i("i3GEOlegendacomboestilos").innerHTML = | |
1732 | + "<table class='lista5'><tr><td><span class=paragrafo >" + $trad('estiloEdicao', i3GEOF.legenda.dicionario) | |
1733 | + + ":</span></td><td>" | |
1734 | + + combo | |
1735 | + + "</td><td></td></tr></table> (após adicionar ou excluir, aplique a alteração)<br>"; | |
1736 | + b = | |
1737 | + new YAHOO.widget.Button("i3GEOlegendabotao11", { | |
1738 | + onclick : { | |
1739 | + fn : function() { | |
1740 | + try { | |
1741 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1742 | + return; | |
1743 | + } | |
1744 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1745 | + var p = | |
1746 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1747 | + + i3GEO.configura.sid | |
1748 | + + "&funcao=editasimbolo&opcao=excluiestilo&tema=" | |
1749 | + + i3GEOF.legenda.tema | |
1750 | + + "&classe=" | |
1751 | + + i3GEOF.legenda.classe | |
1752 | + + "&estilo=" | |
1753 | + + i3GEOF.legenda.estilo, cp = new cpaint(); | |
1754 | + cp.set_response_type("JSON"); | |
1755 | + cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor); | |
1756 | + } catch (e) { | |
1757 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1758 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1759 | + } | |
1760 | + } | |
1761 | + } | |
1762 | + }); | |
1763 | + b.addClass("rodar100"); | |
1764 | + b = | |
1765 | + new YAHOO.widget.Button("i3GEOlegendabotao12", { | |
1766 | + onclick : { | |
1767 | + fn : function() { | |
1768 | + try { | |
1769 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1770 | + return; | |
1771 | + } | |
1772 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1773 | + var p = | |
1774 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1775 | + + i3GEO.configura.sid | |
1776 | + + "&funcao=editasimbolo&opcao=adicionaestilo&tema=" | |
1777 | + + i3GEOF.legenda.tema | |
1778 | + + "&classe=" | |
1779 | + + i3GEOF.legenda.classe | |
1780 | + + "&estilo=" | |
1781 | + + i3GEOF.legenda.estilo, cp = new cpaint(); | |
1782 | + cp.set_response_type("JSON"); | |
1783 | + cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor); | |
1784 | + } catch (e) { | |
1785 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1786 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1787 | + } | |
1788 | + } | |
1789 | + } | |
1790 | + }); | |
1791 | + b.addClass("rodar100"); | |
1792 | + b = | |
1793 | + new YAHOO.widget.Button("i3GEOlegendabotao13", { | |
1794 | + onclick : { | |
1795 | + fn : function() { | |
1796 | + try { | |
1797 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1798 | + return; | |
1799 | + } | |
1800 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1801 | + var p = | |
1802 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1803 | + + i3GEO.configura.sid | |
1804 | + + "&funcao=editasimbolo&opcao=sobeestilo&tema=" | |
1805 | + + i3GEOF.legenda.tema | |
1806 | + + "&classe=" | |
1807 | + + i3GEOF.legenda.classe | |
1808 | + + "&estilo=" | |
1809 | + + i3GEOF.legenda.estilo, cp = new cpaint(); | |
1810 | + cp.set_response_type("JSON"); | |
1811 | + cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor); | |
1812 | + } catch (e) { | |
1813 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1814 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1815 | + } | |
1816 | + } | |
1817 | + } | |
1818 | + }); | |
1819 | + b.addClass("rodar100"); | |
1820 | + b = | |
1821 | + new YAHOO.widget.Button("i3GEOlegendabotao14", { | |
1822 | + onclick : { | |
1823 | + fn : function() { | |
1824 | + try { | |
1825 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
1826 | + return; | |
1827 | + } | |
1828 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1829 | + var p = | |
1830 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
1831 | + + i3GEO.configura.sid | |
1832 | + + "&funcao=editasimbolo&opcao=desceestilo&tema=" | |
1833 | + + i3GEOF.legenda.tema | |
1834 | + + "&classe=" | |
1835 | + + i3GEOF.legenda.classe | |
1836 | + + "&estilo=" | |
1837 | + + i3GEOF.legenda.estilo, cp = new cpaint(); | |
1838 | + cp.set_response_type("JSON"); | |
1839 | + cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor); | |
1840 | + } catch (e) { | |
1841 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1842 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1843 | + } | |
1844 | + } | |
1845 | + } | |
1846 | + }); | |
1847 | + b.addClass("rodar100"); | |
1848 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1849 | + i3GEOF.legenda.mostraEstilo(0); | |
1850 | + } else { | |
1851 | + $i("i3GEOlegendacomboestilos").innerHTML = "<p style=color:red >Erro<br>"; | |
1852 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1853 | + } | |
1854 | + } catch (e) { | |
1855 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
1856 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
1857 | + } | |
1858 | + }, | |
1859 | + /* | |
1860 | + * Function: mostraEstilo | |
1861 | + * | |
1862 | + * Mostra as propriedades de um estilo de um símbolo | |
1863 | + */ | |
1864 | + mostraEstilo : function(e) { | |
1865 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
1866 | + try { | |
1867 | + var linha, tipoLayer, d, p, cp; | |
1868 | + i3GEOF.legenda.estilo = e; // esta e uma variavel global | |
1869 | + linha = i3GEOF.legenda.estilos[i3GEOF.legenda.estilo]; | |
1870 | + linha = linha.split("#"); | |
1871 | + tipoLayer = linha[0]; | |
1872 | + d = | |
1873 | + "<img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"outlinecolor\",\"i3GEOlegendaoutlinecolor\")' title='" + $trad( | |
1874 | + 'aplicatodos', | |
1875 | + i3GEOF.legenda.dicionario) | |
1876 | + + "' src='" | |
1877 | + + i3GEO.configura.locaplic | |
1878 | + + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
1879 | + + "<p class='paragrafo'>Cor do contorno:</p>" | |
1880 | + + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1881 | + + "<div class='i3geoForm i3geoFormIconeAquarela' >" | |
1882 | + + "<input type=text value='" | |
1883 | + + linha[2] | |
1884 | + + "' id='i3GEOlegendaoutlinecolor' />" | |
1885 | + + "</div></form>" | |
1886 | + | |
1887 | + + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"color\",\"i3GEOlegendacolor\")' title='" | |
1888 | + + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
1889 | + + "' src='" | |
1890 | + + i3GEO.configura.locaplic | |
1891 | + + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
1892 | + + "<p class='paragrafo'>" | |
1893 | + + $trad('corFrente', i3GEOF.legenda.dicionario) | |
1894 | + + ":</p>" | |
1895 | + + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1896 | + + "<div class='i3geoForm i3geoFormIconeAquarela' >" | |
1897 | + + "<input type=text value='" | |
1898 | + + linha[4] | |
1899 | + + "' id='i3GEOlegendacolor' />" | |
1900 | + + "</div></form>" | |
1901 | + | |
1902 | + + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"backgroundcolor\",\"i3GEOlegendabackgroundcolor\")' title='" | |
1903 | + + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
1904 | + + "' src='" | |
1905 | + + i3GEO.configura.locaplic | |
1906 | + + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
1907 | + + "<p class='paragrafo'>" | |
1908 | + + $trad('corFundo', i3GEOF.legenda.dicionario) | |
1909 | + + ":</p>" | |
1910 | + + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1911 | + + "<div class='i3geoForm i3geoFormIconeAquarela' >" | |
1912 | + + "<input type=text value='" | |
1913 | + + linha[3] | |
1914 | + + "' id='i3GEOlegendabackgroundcolor' />" | |
1915 | + + "</div></form>" | |
1916 | + | |
1917 | + + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"size\",\"i3GEOlegendasizes\")' title='" | |
1918 | + + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
1919 | + + "' src='" | |
1920 | + + i3GEO.configura.locaplic | |
1921 | + + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
1922 | + + "<p class='paragrafo'>" | |
1923 | + + $trad('tamanhoEspacamento', i3GEOF.legenda.dicionario) | |
1924 | + + ":</p>" | |
1925 | + + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
1926 | + + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1927 | + + "<input type=text value='" | |
1928 | + + linha[6] | |
1929 | + + "' id='i3GEOlegendasizes' />" | |
1930 | + + "</form></div>" | |
1931 | + + "<div class='styled-select' id='i3GEOlegendaComboSize'></div>" | |
1932 | + | |
1933 | + + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"width\",\"i3GEOlegendawidth\")' title='" | |
1934 | + + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
1935 | + + "' src='" | |
1936 | + + i3GEO.configura.locaplic | |
1937 | + + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
1938 | + + "<p class='paragrafo'>" | |
1939 | + + $trad('espessura', i3GEOF.legenda.dicionario) | |
1940 | + + ":<p>" | |
1941 | + + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
1942 | + + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1943 | + + "<input type=text value='" | |
1944 | + + linha[8] | |
1945 | + + "' id='i3GEOlegendawidth' />" | |
1946 | + + "</form></div>" | |
1947 | + | |
1948 | + + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"pattern\",\"i3GEOlegendapattern\")' title='" | |
1949 | + + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
1950 | + + "' src='" | |
1951 | + + i3GEO.configura.locaplic | |
1952 | + + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
1953 | + + "<p class='paragrafo'>" | |
1954 | + + $trad('padraoRepeticao', i3GEOF.legenda.dicionario) | |
1955 | + + ":</p>" | |
1956 | + + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
1957 | + + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1958 | + + "<input type=text value='" | |
1959 | + + linha[9] | |
1960 | + + "' id='i3GEOlegendapattern' />" | |
1961 | + + "</form></div>" | |
1962 | + | |
1963 | + + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"opacity\",\"i3GEOlegendaopacidade\")' title='" | |
1964 | + + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
1965 | + + "' src='" | |
1966 | + + i3GEO.configura.locaplic | |
1967 | + + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
1968 | + + "<p class='paragrafo'>" | |
1969 | + + $trad('opacidade', i3GEOF.legenda.dicionario) | |
1970 | + + ":</p>" | |
1971 | + + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
1972 | + + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1973 | + + "<input type=text value='" | |
1974 | + + linha[7] | |
1975 | + + "' id='i3GEOlegendaopacidade' />" | |
1976 | + + "</form></div>" | |
1977 | + | |
1978 | + + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"angle\",\"i3GEOlegendaangulo\")' title='" | |
1979 | + + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
1980 | + + "' src='" | |
1981 | + + i3GEO.configura.locaplic | |
1982 | + + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
1983 | + + "<p class='paragrafo'>" | |
1984 | + + $trad('angulo', i3GEOF.legenda.dicionario) | |
1985 | + + ":</p>" | |
1986 | + + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
1987 | + + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1988 | + + "<input type=text value='" | |
1989 | + + linha[10] | |
1990 | + + "' id='i3GEOlegendaangulo' />" | |
1991 | + + "</form></div>" | |
1992 | + | |
1993 | + + "<br>" | |
1994 | + + "<p class='paragrafo'>" | |
1995 | + + $trad('symbolscale', i3GEOF.legenda.dicionario) | |
1996 | + + ":</p>" | |
1997 | + + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
1998 | + + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
1999 | + + "<input type=text value='" | |
2000 | + + linha[11] | |
2001 | + + "' id='i3GEOlegendasymbolscale' />" | |
2002 | + + "</form></div>" | |
2003 | + | |
2004 | + + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"minsize\",\"i3GEOlegendaminsize\")' title='" | |
2005 | + + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
2006 | + + "' src='" | |
2007 | + + i3GEO.configura.locaplic | |
2008 | + + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
2009 | + + "<p class='paragrafo'>" | |
2010 | + + $trad('minsize', i3GEOF.legenda.dicionario) | |
2011 | + + ":</p>" | |
2012 | + + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
2013 | + + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
2014 | + + "<input type=text value='" | |
2015 | + + linha[12] | |
2016 | + + "' id='i3GEOlegendaminsize' />" | |
2017 | + + "</form></div>" | |
2018 | + | |
2019 | + + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"maxsize\",\"i3GEOlegendamaxsize\")' title='" | |
2020 | + + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
2021 | + + "' src='" | |
2022 | + + i3GEO.configura.locaplic | |
2023 | + + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
2024 | + + "<p class='paragrafo'>" | |
2025 | + + $trad('maxsize', i3GEOF.legenda.dicionario) | |
2026 | + + ":</p>" | |
2027 | + + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
2028 | + + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
2029 | + + "<input type=text value='" | |
2030 | + + linha[13] | |
2031 | + + "' id='i3GEOlegendamaxsize' />" | |
2032 | + + "</form></div>" | |
2033 | + | |
2034 | + + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"offsetx\",\"i3GEOlegendaoffsetx\")' title='" | |
2035 | + + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
2036 | + + "' src='" | |
2037 | + + i3GEO.configura.locaplic | |
2038 | + + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
2039 | + + "<p class='paragrafo'>" | |
2040 | + + $trad('offsetx', i3GEOF.legenda.dicionario) | |
2041 | + + ":</p>" | |
2042 | + + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
2043 | + + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
2044 | + + "<input type=text value='" | |
2045 | + + linha[14] | |
2046 | + + "' id='i3GEOlegendaoffsetx' />" | |
2047 | + + "</form></div>" | |
2048 | + | |
2049 | + + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"offsety\",\"i3GEOlegendaoffsety\")' title='" | |
2050 | + + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
2051 | + + "' src='" | |
2052 | + + i3GEO.configura.locaplic | |
2053 | + + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
2054 | + + "<p class='paragrafo'>" | |
2055 | + + $trad('offsety', i3GEOF.legenda.dicionario) | |
2056 | + + ":</p>" | |
2057 | + + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
2058 | + + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
2059 | + + "<input type=text value='" | |
2060 | + + linha[15] | |
2061 | + + "' id='i3GEOlegendaoffsety' />" | |
2062 | + + "</form></div>" | |
2063 | + | |
2064 | + + "<br><img style='float:left;' onclick='i3GEOF.legenda.aplicaTodasClasses(\"symbolname\",\"i3GEOlegendasymbolname\")' title='" | |
2065 | + + $trad('aplicatodos', i3GEOF.legenda.dicionario) | |
2066 | + + "' src='" | |
2067 | + + i3GEO.configura.locaplic | |
2068 | + + "/imagens/oxygen/16x16/tools-wizard.png' />" | |
2069 | + + "<p class='paragrafo'>" | |
2070 | + + $trad('simbolo', i3GEOF.legenda.dicionario) | |
2071 | + + ":</p>" | |
2072 | + + "<div class='i3geoForm i3geoFormIconeEdita' >" | |
2073 | + + "<form onsubmit='i3GEOF.legenda.aplicaEstilo();return false;'>" | |
2074 | + + "<input type=text value='" | |
2075 | + + linha[5] | |
2076 | + + "' id='i3GEOlegendasymbolname' />" | |
2077 | + + "</form></div>"; | |
2078 | + | |
2079 | + $i("i3GEOlegendaParametrosEstilos").innerHTML = d; | |
2080 | + //preenche as listas de itens | |
2081 | + i3GEO.util.comboItens("", i3GEOF.legenda.tema, function(retorno) { | |
2082 | + if ($i("i3GEOlegendaComboSize")) { | |
2083 | + $i("i3GEOlegendaComboSize").innerHTML = retorno.dados.replace("id=''"," onchange='$i(\"i3GEOlegendasizes\").value = this.value'"); | |
2084 | + } | |
2085 | + }); | |
2086 | + | |
2087 | + i3GEO.util.aplicaAquarela("i3GEOlegendaParametrosEstilos"); | |
2088 | + p = | |
2089 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
2090 | + + i3GEO.configura.sid | |
2091 | + + "&funcao=editasimbolo&tipo=" | |
2092 | + + tipoLayer | |
2093 | + + "&opcao=listaSimbolos&onclick=i3GEOF.legenda.aplicaSimbolo(this)"; | |
2094 | + cp = new cpaint(); | |
2095 | + cp.set_response_type("JSON"); | |
2096 | + cp.call(p, "editasimbolo", i3GEOF.legenda.listaSimbolos); | |
2097 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2098 | + } catch (e) { | |
2099 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
2100 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2101 | + } | |
2102 | + }, | |
2103 | + /* | |
2104 | + * Function: listaSimbolos | |
2105 | + * | |
2106 | + * Monta a lista de símbolos com imagem | |
2107 | + */ | |
2108 | + listaSimbolos : function(retorno) { | |
2109 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
2110 | + try { | |
2111 | + if (retorno.data != undefined) { | |
2112 | + retorno = retorno.data; | |
2113 | + $i("i3GEOlegendasimbolos").innerHTML = | |
2114 | + "<br>" + $trad('listaSimbolo', i3GEOF.legenda.dicionario) + ":<br><br>" + retorno; | |
2115 | + } else { | |
2116 | + $i("i3GEOlegendasimbolos").innerHTML = "<p style=color:red >Erro<br>"; | |
2117 | + } | |
2118 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2119 | + } catch (e) { | |
2120 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
2121 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2122 | + } | |
2123 | + }, | |
2124 | + /* | |
2125 | + * Function: aplicaSimbolo | |
2126 | + * | |
2127 | + * Muda o valor do campo com o código do símbolo escolhido | |
2128 | + */ | |
2129 | + aplicaSimbolo : function(s) { | |
2130 | + $i("i3GEOlegendasymbolname").value = s.title; | |
2131 | + }, | |
2132 | + /* | |
2133 | + * Function: aplicaEstilo | |
2134 | + * | |
2135 | + * Aplica ao estilo as propriedades definidas | |
2136 | + * | |
2137 | + * Veja: | |
2138 | + * | |
2139 | + * <EDITASIMBOLO> | |
2140 | + */ | |
2141 | + aplicaEstilo : function() { | |
2142 | + try { | |
2143 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
2144 | + return; | |
2145 | + } | |
2146 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
2147 | + var i, p, cp, fim, outlinecolor = $i("i3GEOlegendaoutlinecolor").value, backgroundcolor = | |
2148 | + $i("i3GEOlegendabackgroundcolor").value, color = $i("i3GEOlegendacolor").value, symbolname = | |
2149 | + $i("i3GEOlegendasymbolname").value, simbolos = $i("i3GEOlegendasimbolos").getElementsByTagName("img"), valido = "nao", n = | |
2150 | + simbolos.length, size = $i("i3GEOlegendasizes").value, width = $i("i3GEOlegendawidth").value, pattern = | |
2151 | + $i("i3GEOlegendapattern").value, opacidade = $i("i3GEOlegendaopacidade").value, angle = $i("i3GEOlegendaangulo").value, symbolscale = | |
2152 | + $i("i3GEOlegendasymbolscale").value, minsize = $i("i3GEOlegendaminsize").value, maxsize = | |
2153 | + $i("i3GEOlegendamaxsize").value, offsetx = $i("i3GEOlegendaoffsetx").value, offsety = $i("i3GEOlegendaoffsety").value; | |
2154 | + if (symbolscale != "") { | |
2155 | + symbolscale = parseInt(symbolscale, 10); | |
2156 | + } else { | |
2157 | + symbolscale = -1; | |
2158 | + } | |
2159 | + for (i = 0; i < n; i++) { | |
2160 | + if (simbolos[i].title == symbolname || symbolname == i) { | |
2161 | + valido = "sim"; | |
2162 | + } | |
2163 | + } | |
2164 | + if (valido === "nao") { | |
2165 | + // i3GEO.janela.tempoMsg("Nome do simbolo nao encontrado"); | |
2166 | + // i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2167 | + // return; | |
2168 | + } | |
2169 | + p = | |
2170 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
2171 | + + i3GEO.configura.sid | |
2172 | + + "&funcao=editasimbolo&opcao=aplica&tema=" | |
2173 | + + i3GEOF.legenda.tema | |
2174 | + + "&classe=" | |
2175 | + + i3GEOF.legenda.classe | |
2176 | + + "&estilo=" | |
2177 | + + i3GEOF.legenda.estilo | |
2178 | + + "&outlinecolor=" | |
2179 | + + outlinecolor | |
2180 | + + "&backgroundcolor=" | |
2181 | + + backgroundcolor | |
2182 | + + "&color=" | |
2183 | + + color | |
2184 | + + "&symbolname=" | |
2185 | + + symbolname | |
2186 | + + "&width=" | |
2187 | + + width | |
2188 | + + "&pattern=" | |
2189 | + + pattern | |
2190 | + + "&size=" | |
2191 | + + size | |
2192 | + + "&opacidade=" | |
2193 | + + opacidade | |
2194 | + + "&angle=" | |
2195 | + + angle | |
2196 | + + "&symbolscale=" | |
2197 | + + symbolscale | |
2198 | + + "&minsize=" | |
2199 | + + minsize | |
2200 | + + "&maxsize=" | |
2201 | + + maxsize | |
2202 | + + "&offsetx=" | |
2203 | + + offsetx | |
2204 | + + "&offsety=" | |
2205 | + + offsety; | |
2206 | + cp = new cpaint(); | |
2207 | + fim = function() { | |
2208 | + i3GEOF.legenda.aposAlterarLegenda(); | |
2209 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2210 | + i3GEOF.legenda.reMontaEditor(); | |
2211 | + }; | |
2212 | + // cp.set_debug(2) | |
2213 | + cp.set_response_type("JSON"); | |
2214 | + cp.call(p, "editasimbolo", fim); | |
2215 | + } catch (e) { | |
2216 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
2217 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2218 | + } | |
2219 | + }, | |
2220 | + /* | |
2221 | + * Function: reMontaEditor | |
2222 | + * | |
2223 | + * Gera novamente o editor de símbolo após ter sido feita alguma alteração nos estilos | |
2224 | + */ | |
2225 | + reMontaEditor : function() { | |
2226 | + var id = i3GEOF.legenda.tema + "-" + i3GEOF.legenda.classe; | |
2227 | + i3GEOF.legenda.editaSimbolo(id); | |
2228 | + }, | |
2229 | + /* | |
2230 | + * Function: mostraGrafico | |
2231 | + * | |
2232 | + * Mostra um gráfico com a contegem de elementos em caada classe | |
2233 | + * | |
2234 | + * Veja: | |
2235 | + * | |
2236 | + * <CONTAGEMCLASSE> | |
2237 | + */ | |
2238 | + mostraGrafico : function() { | |
2239 | + try { | |
2240 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
2241 | + return; | |
2242 | + } | |
2243 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
2244 | + var monta = | |
2245 | + function(retorno) { | |
2246 | + if (retorno.data && retorno.data[0].proc == "") { | |
2247 | + var b, ins = [], i, re, t; | |
2248 | + ins.push("<p class='paragrafo' ><input type=button value='" + $trad('graficoPizza', i3GEOF.legenda.dicionario) | |
2249 | + + "' id=i3GEOlegendaGraficoPizza /></p>"); | |
2250 | + ins.push("<p class='paragrafo' >" + $trad('numeroOcorrenciasClasses', i3GEOF.legenda.dicionario) + "</p>"); | |
2251 | + ins.push("<table width=100% >"); | |
2252 | + i3GEOF.legenda.dadosGrafico = [ | |
2253 | + "n;x" | |
2254 | + ]; | |
2255 | + if (retorno.data.length < 2) { | |
2256 | + i3GEO.janela.tempoMsg($trad('msgNumeroClasses', i3GEOF.legenda.dicionario)); | |
2257 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2258 | + return; | |
2259 | + } else { | |
2260 | + i3GEO.guias.mostraGuiaFerramenta("i3GEOlegendaguia4", "i3GEOlegendaguia"); | |
2261 | + } | |
2262 | + for (i = 0; i < retorno.data.length; i++) { | |
2263 | + id = retorno.data[i].tema + "-" + retorno.data[i].idclasse; // layer+indice da classe | |
2264 | + re = new RegExp("'", "g"); | |
2265 | + exp = (retorno.data[i].expressao).replace(re, '"'); | |
2266 | + ins.push("<tr><td style='text-align:left;border-bottom:0 none white' >" + retorno.data[i].nomeclasse | |
2267 | + + "</td></tr>"); | |
2268 | + t = (retorno.data[i].nreg * 100) / retorno.data[i].totalreg; | |
2269 | + ins.push("<tr><td style=text-align:left ><img height=15px width=" + t | |
2270 | + + "% src='" | |
2271 | + + retorno.data[i].imagem | |
2272 | + + "' /></td></tr>"); | |
2273 | + i3GEOF.legenda.dadosGrafico.push(retorno.data[i].nomeclasse + ";" + retorno.data[i].nreg); | |
2274 | + } | |
2275 | + ins.push("</table><br>"); | |
2276 | + $i("i3GEOlegendaguia4obj").innerHTML = ins.join(""); | |
2277 | + } else { | |
2278 | + $i("i3GEOlegendaguia4obj").innerHTML = "<p style=color:red >Erro<br>"; | |
2279 | + return; | |
2280 | + } | |
2281 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2282 | + | |
2283 | + b = new YAHOO.widget.Button("i3GEOlegendaGraficoPizza", { | |
2284 | + onclick : { | |
2285 | + fn : function() { | |
2286 | + var js = i3GEO.configura.locaplic + "/ferramentas/graficointerativo1/dependencias.php"; | |
2287 | + i3GEO.util.scriptTag(js, "i3GEOF.legenda.iniciaGraficoPizza()", "i3GEOF.graficointerativo1_script"); | |
2288 | + } | |
2289 | + } | |
2290 | + }); | |
2291 | + b.addClass("abrir"); | |
2292 | + }, p = | |
2293 | + i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" | |
2294 | + + i3GEO.configura.sid | |
2295 | + + "&funcao=contagemclasse&tema=" | |
2296 | + + i3GEOF.legenda.tema, cp = new cpaint(); | |
2297 | + // cp.set_debug(2) | |
2298 | + cp.set_response_type("JSON"); | |
2299 | + cp.call(p, "cocontagemclasse", monta); | |
2300 | + } catch (e) { | |
2301 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
2302 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2303 | + } | |
2304 | + }, | |
2305 | + iniciaGraficoPizza : function() { | |
2306 | + var dados = { | |
2307 | + "attributes" : { | |
2308 | + "id" : "" | |
2309 | + }, | |
2310 | + "data" : { | |
2311 | + "dados" : i3GEOF.legenda.dadosGrafico | |
2312 | + } | |
2313 | + }; | |
2314 | + i3GEOF.graficointerativo1.tipo = "pizza_1"; | |
2315 | + i3GEOF.graficointerativo1.iniciaJanelaFlutuante(dados); | |
2316 | + }, | |
2317 | + /* | |
2318 | + * Function: aplicaProcessos | |
2319 | + * | |
2320 | + * Aplica processos de ajuste em imagens de satélite | |
2321 | + * | |
2322 | + * Veja: | |
2323 | + * | |
2324 | + * <APLICAPROCESSOS> | |
2325 | + */ | |
2326 | + aplicaProcessos : function() { | |
2327 | + try { | |
2328 | + if (i3GEOF.legenda.aguarde.visibility === "visible") { | |
2329 | + return; | |
2330 | + } | |
2331 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
2332 | + var lista = [], ipt, i, p, cp, temp; | |
2333 | + if ($i("i3GEOlegendaprocessos").innerHTML != "") { | |
2334 | + ipt = $i("i3GEOlegendaprocessos").getElementsByTagName("input"); | |
2335 | + for (i = 0; i < ipt.length; i++) { | |
2336 | + if (ipt[i].value != "") { | |
2337 | + lista.push(ipt[i].value); | |
2338 | + } | |
2339 | + } | |
2340 | + } | |
2341 | + lista = lista.join("|"); | |
2342 | + temp = function() { | |
2343 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2344 | + i3GEOF.legenda.mostralegenda(); | |
2345 | + i3GEOF.legenda.aposAlterarLegenda(); | |
2346 | + }; | |
2347 | + p = | |
2348 | + i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" | |
2349 | + + i3GEO.configura.sid | |
2350 | + + "&funcao=aplicaProcessos&lista=" | |
2351 | + + lista | |
2352 | + + "&tema=" | |
2353 | + + i3GEOF.legenda.tema; | |
2354 | + cp = new cpaint(); | |
2355 | + cp.set_response_type("JSON"); | |
2356 | + cp.call(p, "aplicaProcessos", temp); | |
2357 | + } catch (e) { | |
2358 | + i3GEO.janela.tempoMsg("Erro: " + e); | |
2359 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2360 | + } | |
2361 | + }, | |
2362 | + /* | |
2363 | + * Function: adicionaProcesso | |
2364 | + * | |
2365 | + * Adiciona um novo processo na lista de processos | |
2366 | + */ | |
2367 | + adicionaProcesso : function(s) { | |
2368 | + $i("i3GEOlegendaprocessos").innerHTML += $inputText("", "", "", "", 50, s.value); | |
2369 | + }, | |
2370 | + aplicaTodasClasses : function(parametro, id) { | |
2371 | + var valor = $i(id).value; | |
2372 | + i3GEO.janela.confirma("Aplica " + parametro + " = " + valor + " ?", 300, $trad("x14"), "", function() { | |
2373 | + var temp = function() { | |
2374 | + // i3GEOF.legenda.mostralegenda(); | |
2375 | + i3GEOF.legenda.aposAlterarLegenda(); | |
2376 | + }, p, cp; | |
2377 | + p = | |
2378 | + i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" | |
2379 | + + i3GEO.configura.sid | |
2380 | + + "&funcao=aplicaTodasClasses" | |
2381 | + + "¶metro=" | |
2382 | + + parametro | |
2383 | + + "&valor=" | |
2384 | + + valor | |
2385 | + + "&tema=" | |
2386 | + + i3GEOF.legenda.tema; | |
2387 | + cp = new cpaint(); | |
2388 | + cp.set_response_type("JSON"); | |
2389 | + cp.call(p, "foo", temp); | |
2390 | + }); | |
2391 | + }, | |
2392 | + aplicarCluster : function(){ | |
2393 | + var temp = function() { | |
2394 | + i3GEOF.legenda.aposAlterarLegenda(); | |
2395 | + i3GEOF.legenda.montaCombosItens(); | |
2396 | + }, p, cp; | |
2397 | + p = | |
2398 | + i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" | |
2399 | + + i3GEO.configura.sid | |
2400 | + + "&funcao=aplicarCluster" | |
2401 | + + "&maxdistance=" | |
2402 | + + $i("i3GEOlegendaClusterMaxdistance").value | |
2403 | + + "&buffer=" | |
2404 | + + $i("i3GEOlegendaClusterBuffer").value | |
2405 | + + "&filter=" | |
2406 | + //+ i3GEO.util.base64encode($i("i3GEOlegendaClusterFilter").value) | |
2407 | + + $i("i3GEOlegendaClusterFilter").value | |
2408 | + + "®ion=" | |
2409 | + + $i("i3GEOlegendaClusterRegion").value | |
2410 | + + "&group=" | |
2411 | + + $i("i3GEOlegendaitensCluster").getElementsByTagName("select")[0].value | |
2412 | + + "&tema=" | |
2413 | + + i3GEOF.legenda.tema; | |
2414 | + cp = new cpaint(); | |
2415 | + cp.set_response_type("JSON"); | |
2416 | + cp.call(p, "foo", temp); | |
2417 | + }, | |
2418 | + removerCluster : function(){ | |
2419 | + var temp = function() { | |
2420 | + i3GEOF.legenda.montaCombosItens(); | |
2421 | + i3GEOF.legenda.aposAlterarLegenda(); | |
2422 | + }, p, cp; | |
2423 | + p = | |
2424 | + i3GEO.configura.locaplic + "/ferramentas/legenda/exec.php?g_sid=" | |
2425 | + + i3GEO.configura.sid | |
2426 | + + "&funcao=removerCluster" | |
2427 | + + "&tema=" | |
2428 | + + i3GEOF.legenda.tema; | |
2429 | + cp = new cpaint(); | |
2430 | + cp.set_response_type("JSON"); | |
2431 | + cp.call(p, "foo", temp); | |
2432 | + }, | |
2433 | + montaCombosItens : function(){ | |
2434 | + i3GEO.util.comboItens("", i3GEOF.legenda.tema, function(retorno) { | |
2435 | + if ($i("i3GEOlegendaitensValorUnico")) { | |
2436 | + $i("i3GEOlegendaitensValorUnico").innerHTML = retorno.dados; | |
2437 | + } | |
2438 | + if ($i("i3GEOlegendaClassesValorUnico")) { | |
2439 | + $i("i3GEOlegendaClassesValorUnico").innerHTML = retorno.dados; | |
2440 | + } | |
2441 | + if ($i("i3GEOlegendaitensMetade")) { | |
2442 | + $i("i3GEOlegendaitensMetade").innerHTML = retorno.dados; | |
2443 | + } | |
2444 | + if ($i("i3GEOlegendaitensMetadeId")) { | |
2445 | + $i("i3GEOlegendaitensMetadeId").innerHTML = retorno.dados; | |
2446 | + } | |
2447 | + if ($i("i3GEOlegendaitensMedia")) { | |
2448 | + $i("i3GEOlegendaitensMedia").innerHTML = retorno.dados; | |
2449 | + } | |
2450 | + if ($i("i3GEOlegendaitensValorClass")) { | |
2451 | + $i("i3GEOlegendaitensValorClass").innerHTML = retorno.dados; | |
2452 | + } | |
2453 | + if ($i("i3GEOlegendaitensCluster")) { | |
2454 | + $i("i3GEOlegendaitensCluster").innerHTML = retorno.dados; | |
2455 | + } | |
2456 | + if ($i("i3GEOlegendaitensValorQuartil")) { | |
2457 | + $i("i3GEOlegendaitensValorQuartil").innerHTML = retorno.dados; | |
2458 | + } | |
2459 | + }); | |
2460 | + }, | |
2461 | + parametrosAuto : function() { | |
2462 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
2463 | + var p = i3GEO.configura.locaplic+"/ferramentas/legenda/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=parametrosauto&tema=" + i3GEOF.legenda.tema, | |
2464 | + cp = new cpaint(), | |
2465 | + temp = function(retorno){ | |
2466 | + try{ | |
2467 | + if(retorno.data !== ""){ | |
2468 | + $i("i3GEOlegendaAutocolunas").innerHTML = retorno.data.colunas; | |
2469 | + $i("i3GEOlegendaAutoclassesitem").value = retorno.data.classesitem; | |
2470 | + $i("i3GEOlegendaAutoclassesnome").value = retorno.data.classesnome; | |
2471 | + $i("i3GEOlegendaAutoclassescor").value = retorno.data.classescor; | |
2472 | + $i("i3GEOlegendaAutoclassessimbolo").value = retorno.data.classessimbolo; | |
2473 | + $i("i3GEOlegendaAutoclassestamanho").value = retorno.data.classestamanho; | |
2474 | + $i("i3GEOlegendaAutopalletefile").value = retorno.data.palletefile; | |
2475 | + $i("i3GEOlegendaAutopalletestep").value = retorno.data.palletestep; | |
2476 | + } | |
2477 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2478 | + }catch(e){ | |
2479 | + i3GEO.janela.tempoMsg("Erro. "+e); | |
2480 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2481 | + } | |
2482 | + }; | |
2483 | + cp.set_response_type("JSON"); | |
2484 | + cp.call(p,"foo",temp); | |
2485 | + }, | |
2486 | + salvaParametrosAuto: function(){ | |
2487 | + if(i3GEOF.legenda.aguarde.visibility === "visible"){ | |
2488 | + return; | |
2489 | + } | |
2490 | + i3GEOF.legenda.aguarde.visibility = "visible"; | |
2491 | + var temp, | |
2492 | + p, | |
2493 | + cp; | |
2494 | + temp = function(){ | |
2495 | + i3GEOF.legenda.aguarde.visibility = "hidden"; | |
2496 | + i3GEOF.legenda.aposAlterarLegenda(); | |
2497 | + }; | |
2498 | + p = i3GEO.configura.locaplic+"/ferramentas/legenda/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=salvaparametrosauto&tema=" + i3GEOF.legenda.tema | |
2499 | + + "&classesitem=" + $i("i3GEOlegendaAutoclassesitem").value | |
2500 | + + "&classesnome=" + $i("i3GEOlegendaAutoclassesnome").value | |
2501 | + + "&classescor=" + $i("i3GEOlegendaAutoclassescor").value | |
2502 | + + "&classessimbolo=" + $i("i3GEOlegendaAutoclassessimbolo").value | |
2503 | + + "&classestamanho=" + $i("i3GEOlegendaAutoclassestamanho").value | |
2504 | + + "&palletefile=" + $i("i3GEOlegendaAutopalletefile").value | |
2505 | + + "&palletestep=" + $i("i3GEOlegendaAutopalletestep").value; | |
2506 | + | |
2507 | + cp = new cpaint(); | |
2508 | + cp.set_response_type("JSON"); | |
2509 | + cp.call(p,"foo",temp); | |
2510 | + } | |
2511 | + }; | |
0 | 2512 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,411 @@ |
1 | +<div class='yui-navset' style='top: 0px; cursor: pointer; left: 0px;'> | |
2 | + <ul class='yui-nav' style='border-width: 0pt 0pt 0px; border-color: rgb(240, 240, 240); border-bottom-color: white;'> | |
3 | + <li> | |
4 | + <div id='i3GEOlegendaguia6' style='text-align: center; left: 0px;'> | |
5 | + <a> | |
6 | + <em><img class='ticPropriedades2' style='height: 14px' title='{{{propriedades}}}' src='{{{locaplic}}}/imagens/branco.gif'> </em> | |
7 | + </a> | |
8 | + </div> | |
9 | + </li> | |
10 | + <li> | |
11 | + <div id='i3GEOlegendaguia1' style='text-align: center; left: 0px;'> | |
12 | + <a> | |
13 | + <em>{{{legenda}}}</em> | |
14 | + </a> | |
15 | + </div> | |
16 | + </li> | |
17 | + <li> | |
18 | + <div id='i3GEOlegendaguia2' style='text-align: center; left: 0px;'> | |
19 | + <a> | |
20 | + <em>{{{classes}}}</em> | |
21 | + </a> | |
22 | + </div> | |
23 | + | |
24 | + </li> | |
25 | + <li> | |
26 | + <div id='i3GEOlegendaguia3' style='text-align: center; left: 0px;'> | |
27 | + <a> | |
28 | + <em>{{{editor}}}</em> | |
29 | + </a> | |
30 | + </div> | |
31 | + </li> | |
32 | + <li> | |
33 | + <div id='i3GEOlegendaguia4' style='text-align: center; left: 0px;'> | |
34 | + <a> | |
35 | + <em>{{{graficos}}}</em> | |
36 | + </a> | |
37 | + </div> | |
38 | + </li> | |
39 | + <li> | |
40 | + <div id='i3GEOlegendaguia5' style='text-align: center; left: 0px;'> | |
41 | + <a> | |
42 | + <em>{{{importaExportaSLD}}}</em> | |
43 | + </a> | |
44 | + </div> | |
45 | + </li> | |
46 | + <li> | |
47 | + <div id='i3GEOlegendaguia7' style='text-align: center; left: 0px;'> | |
48 | + <a> | |
49 | + <em>{{{cluster}}}</em> | |
50 | + </a> | |
51 | + </div> | |
52 | + </li> | |
53 | + <li> | |
54 | + <div id='i3GEOlegendaguia8' style='text-align: center; left: 0px;'> | |
55 | + <a> | |
56 | + <em>Auto</em> | |
57 | + </a> | |
58 | + </div> | |
59 | + </li> | |
60 | + </ul> | |
61 | +</div> | |
62 | +<br> | |
63 | +<div id='i3GEOlegendaguia8obj' style='width: 99%; text-align: left;'> | |
64 | + <p class='paragrafo'>{{{colunasTxt}}}:</p> | |
65 | + <div id="i3GEOlegendaAutocolunas"> | |
66 | + </div> | |
67 | + <br> | |
68 | + <p class='paragrafo'>{{{autoClasses}}}</p> | |
69 | + <br> | |
70 | + <p class='paragrafo'>{{{classesitem}}}:</p> | |
71 | + <div class='styled-select'> | |
72 | + <input type='text' id='i3GEOlegendaAutoclassesitem' value='' /> | |
73 | + </div> | |
74 | + <br> | |
75 | + <p class='paragrafo'>{{{classesnome}}}:</p> | |
76 | + <div class='styled-select'> | |
77 | + <input type='text' id='i3GEOlegendaAutoclassesnome' value='' /> | |
78 | + </div> | |
79 | + <br> | |
80 | + <p class='paragrafo'>{{{classescor}}}:</p> | |
81 | + <div class='styled-select'> | |
82 | + <input type='text' id='i3GEOlegendaAutoclassescor' value='' /> | |
83 | + </div> | |
84 | + <br> | |
85 | + <p class='paragrafo'>{{{classessimbolo}}}:</p> | |
86 | + <div class='styled-select'> | |
87 | + <input type='text' id='i3GEOlegendaAutoclassessimbolo' value='' /> | |
88 | + </div> | |
89 | + <br> | |
90 | + <p class='paragrafo'>{{{classestamanho}}}:</p> | |
91 | + <div class='styled-select'> | |
92 | + <input type='text' id='i3GEOlegendaAutoclassestamanho' value='' /> | |
93 | + </div> | |
94 | + <br> | |
95 | + <p class='paragrafo'>{{{palletefile}}}:</p> | |
96 | + <div class='styled-select'> | |
97 | + <input type='text' id='i3GEOlegendaAutopalletefile' value='' /> | |
98 | + </div> | |
99 | + <br> | |
100 | + <p class='paragrafo'>{{{palletestep}}}:</p> | |
101 | + <div class='styled-select'> | |
102 | + <input type='text' id='i3GEOlegendaAutopalletestep' value='' /> | |
103 | + </div> | |
104 | + <br> | |
105 | + <p class='paragrafo'> | |
106 | + <input id='i3GEOlegendabotaoAplicarAuto' size='35' type='button' value='{{{aplicar}}}'> | |
107 | + </p> | |
108 | + <br> | |
109 | +</div> | |
110 | +<div id='i3GEOlegendaguia7obj' style='width: 99%; text-align: left;'> | |
111 | + <p class='paragrafo'>{{{ClusterMaxdistance}}}:</p> | |
112 | + <div class='i3geoForm i3geoFormIconeNumero'> | |
113 | + <input type='number' id='i3GEOlegendaClusterMaxdistance' value='5' /> | |
114 | + </div> | |
115 | + <br> | |
116 | + <p class='paragrafo'>{{{ClusterBuffer}}}:</p> | |
117 | + <div class='i3geoForm i3geoFormIconeNumero'> | |
118 | + <input type='number' id='i3GEOlegendaClusterBuffer' value='0' /> | |
119 | + </div> | |
120 | + <br> | |
121 | + <p class='paragrafo'>{{{ClusterFilter}}}:</p> | |
122 | + <div class='i3geoForm i3geoFormIconeNumero'> | |
123 | + <input type='text' id='i3GEOlegendaClusterFilter' value='' /> | |
124 | + </div> | |
125 | + <br> | |
126 | + <p class='paragrafo'>{{{ClusterRegion}}}</p> | |
127 | + <div class='styled-select'> | |
128 | + <select id='i3GEOlegendaClusterRegion'> | |
129 | + <option value='rectangle'>rectangle</option> | |
130 | + <option value='ellipse'>ellipse</option> | |
131 | + </select> | |
132 | + </div> | |
133 | + <br> | |
134 | + <p class='paragrafo'>{{{ClusterGroup}}}</p> | |
135 | + <div id='i3GEOlegendaitensCluster' class='styled-select'></div> | |
136 | + <br> | |
137 | + <p class='paragrafo'> | |
138 | + <input id='i3GEOlegendabotaoAplicarCluster' size='35' type='button' value='{{{aplicar}}}'> | |
139 | + </p> | |
140 | + <br> | |
141 | + <p class='paragrafo'> | |
142 | + <input id='i3GEOlegendabotaoRemoverCluster' size='35' type='button' value='{{{remover}}}'> | |
143 | + </p> | |
144 | +</div> | |
145 | +<div id='i3GEOlegendaguia6obj' style='width: 99%; text-align: left;'> | |
146 | + <p class='paragrafo'> | |
147 | + | |
148 | + <input type='checkbox' onclick='' checked id='i3GEOFlegendamostra' style='cursor: pointer; border: 0px solid white;' /> | |
149 | + <span style='cursor: pointer; position: relative; top: -2px;'>{{{mostraClassesLegenda}}}</span> | |
150 | + </p> | |
151 | + <br> | |
152 | + <p class='paragrafo'>{{{legendaImg}}}</p> | |
153 | + <table summary='' class='lista6'> | |
154 | + <tr> | |
155 | + <td> | |
156 | + <div class="styled-select"> | |
157 | + <input id="i3GEOlegendaImg" value="" type="text"> | |
158 | + </div> | |
159 | + </td> | |
160 | + <td> | |
161 | + <input id='i3GEOlegendabotaoImagemLegenda' type='button' size='15' value='{{{aplica}}}' /> | |
162 | + </td> | |
163 | + </tr> | |
164 | + </table> | |
165 | + <br> | |
166 | + <p class='paragrafo'>{{{offsite}}}</p> | |
167 | + <table summary='' class='lista6'> | |
168 | + <tr> | |
169 | + <td> | |
170 | + <div class='i3geoForm100 i3geoFormIconeAquarela'> | |
171 | + <input type='text' id='i3GEOoffsite' value='-1,-1,-1' /> | |
172 | + </div> | |
173 | + </td> | |
174 | + <td> | |
175 | + <input id='i3GEOlegendabotaoOffsite' type='button' size='15' value='{{{aplica}}}' /> | |
176 | + </td> | |
177 | + </tr> | |
178 | + </table> | |
179 | + <br> | |
180 | + <p class='paragrafo'> | |
181 | + <input id='i3GEOlegendabotao3' type='button' value='{{{incluiNumeroOcorrencia}}}' title='{{{incluiNumeroOcorrencia2}}}' /> | |
182 | + </p> | |
183 | + <p class='paragrafo'> | |
184 | + <input id='i3GEOlegendabotao15' type='button' value='{{{aplicaOpacidadeVariavel}}}' title='{{{aplicaOpacidade}}}' /> | |
185 | + </p> | |
186 | + <p class='paragrafo'> | |
187 | + <input id='i3GEOlegendabotaoRamp' type='button' size='15' value='{{{escolhePaletaCores}}}' title='{{{variaCoresExtremos}}}' /> | |
188 | + </p> | |
189 | + <div style='margin-left: 5px;'> | |
190 | + <p class='paragrafo'>{{{geraCores}}}</p> | |
191 | + <table summary='' class='lista6'> | |
192 | + <tr> | |
193 | + <td>{{{de}}}:</td> | |
194 | + <td> | |
195 | + <div class='i3geoForm100 i3geoFormIconeAquarela'> | |
196 | + <input type='text' id='i3GEOlegendaacori' value='0,0,0' /> | |
197 | + </div> | |
198 | + </td> | |
199 | + <td>{{{ate}}}:</td> | |
200 | + <td> | |
201 | + <div class='i3geoForm100 i3geoFormIconeAquarela'> | |
202 | + <input type='text' id='i3GEOlegendaacorf' value='255,255,255' /> | |
203 | + </div> | |
204 | + </td> | |
205 | + <td> | |
206 | + <input id='i3GEOlegendabotao4' type='button' size='15' value='{{{aplica}}}' title='{{{aplicaVariaCores}}}' /> | |
207 | + </td> | |
208 | + </tr> | |
209 | + </table> | |
210 | + </div> | |
211 | +</div> | |
212 | +<div id='i3GEOlegendaguia1obj' style='width: 99%; text-align: left;'> | |
213 | + <div style='margin-left: 5px;'> | |
214 | + <table summary='' class='lista5'> | |
215 | + <tr> | |
216 | + <td> | |
217 | + <p class='paragrafo'> | |
218 | + <input id='i3GEOlegendabotao1' size='22' type='button' value='{{{aplicaAlteracao}}}' /> | |
219 | + </p> | |
220 | + </td> | |
221 | + <td> | |
222 | + <p class='paragrafo'> | |
223 | + <input id='i3GEOlegendabotao2' size='22' type='button' value='{{{adicionaClasse}}}' title='{{{adicionaNovaClasse}}}' /> | |
224 | + </p> | |
225 | + </td> | |
226 | + </tr> | |
227 | + </table> | |
228 | + <br> | |
229 | + <p class='paragrafo'>{{{clicaSimbolo}}}</p> | |
230 | + <div id='i3GEOlegendaresultado' style='text-align: left; width: 100%; display: block; left: 0px'></div> | |
231 | + </div> | |
232 | +</div> | |
233 | +<div id='i3GEOlegendaguia2obj' style='width: 99%; text-align: left;'> | |
234 | + <div style='margin-left: 5px;'> | |
235 | + <div id='i3GEOFlegendaClassesOpcionais'> | |
236 | + <fieldset style='padding: 5px; margin: 2px;'> | |
237 | + <p class='paragrafo'> | |
238 | + | |
239 | + <input type='checkbox' onclick='' checked id='i3GEOFlegendaaplicaextent' style='cursor: pointer; border: 0px solid white;' /> | |
240 | + <span style='cursor: pointer; position: relative; top: -2px;left: 2px;'>{{{consideraElementosVisisveis}}}</span> | |
241 | + </p> | |
242 | + <p class='paragrafo'>{{{ignoraValores}}}:</p> | |
243 | + <div class='styled-select'> | |
244 | + <input type='text' id='i3GEOlegendaignorar' value='' /> | |
245 | + </div> | |
246 | + </fieldset> | |
247 | + <br> | |
248 | + <fieldset style='padding: 5px; margin: 2px;'> | |
249 | + <legend>{{{alteraGeom}}}</legend> | |
250 | + <p class='paragrafo'>{{{transformaGeom}}}</p> | |
251 | + <div class='styled-select'> | |
252 | + <select id='i3GEOlegentaTipoGeo'> | |
253 | + <option value=''>{{{semTransformacao}}}</option> | |
254 | + <option value='centroid'>{{{centroide}}}</option> | |
255 | + <option value='bbox'>box</option> | |
256 | + <option value='vertices'>{{{vertices}}}</option> | |
257 | + <option value='start'>{{{verticeInicial}}}</option> | |
258 | + <option value='end'>{{{verticeFinal}}}</option> | |
259 | + </select> | |
260 | + </div> | |
261 | + <br> | |
262 | + <p class='paragrafo'> | |
263 | + <input id='i3GEOlegendabotao17' size='35' type='button' value='{{{aplicar}}}'> | |
264 | + </p> | |
265 | + </fieldset> | |
266 | + <br> | |
267 | + <fieldset style='padding: 5px; margin: 2px;'> | |
268 | + <legend>{{{alteraTipo}}}</legend> | |
269 | + <p class='paragrafo'>{{{alteraTipoGeom}}}</p> | |
270 | + <p class='paragrafo'> | |
271 | + <input id='i3GEOlegendabotao7' size='25' type='button' value='{{{aplicar}}}' /> | |
272 | + </p> | |
273 | + </fieldset> | |
274 | + </div> | |
275 | + <br> | |
276 | + <fieldset style='padding: 5px; margin: 2px;'> | |
277 | + <legend>{{{simboloUnico}}}</legend> | |
278 | + <p class='paragrafo'>{{{todosElementosUnicoSimbolo}}}</p> | |
279 | + <p class='paragrafo'> | |
280 | + <input id='i3GEOlegendabotao5' size='25' type='button' value='{{{aplicar}}}' /> | |
281 | + </p> | |
282 | + </fieldset> | |
283 | + <br> | |
284 | + <fieldset style='padding: 5px; margin: 2px;'> | |
285 | + <legend>{{{valorUnico}}}</legend> | |
286 | + <p class='paragrafo'>{{{cadaOcorrenciaUnicoSimbolo}}}</p> | |
287 | + <div id='i3GEOlegendaitensValorUnico' class='styled-select'></div> | |
288 | + <br> | |
289 | + <p class='paragrafo'>{{{nomeClassesUnicoSimbolo}}}</p> | |
290 | + <div id='i3GEOlegendaClassesValorUnico' class='styled-select'></div> | |
291 | + <br> | |
292 | + <p class='paragrafo'> | |
293 | + <input id='i3GEOlegendabotao6' size='25' type='button' value='{{{aplicar}}}' /> | |
294 | + </p> | |
295 | + </fieldset> | |
296 | + <br> | |
297 | + <fieldset style='padding: 5px; margin: 2px;'> | |
298 | + <legend>{{{classes}}}</legend> | |
299 | + <p class='paragrafo'>{{{criaClassesItemNumerico}}}</p> | |
300 | + <div id='i3GEOlegendaitensValorClass' class='styled-select'></div> | |
301 | + <br> | |
302 | + <p class='paragrafo'>{{{numeroClasses}}}:</p> | |
303 | + <div class='i3geoForm i3geoFormIconeNumero'> | |
304 | + <input type='number' id='i3GEOlegendanclasses' value='5' /> | |
305 | + </div> | |
306 | + <br> | |
307 | + <p class='paragrafo'> | |
308 | + <input id='i3GEOlegendabotao8' type='button' value='{{{intervalosIguais}}}' /> | |
309 | + </p> | |
310 | + <p class='paragrafo'> | |
311 | + <input id='i3GEOlegendabotaoQN' type='button' value='{{{quebrasNaturais}}}' /> | |
312 | + </p> | |
313 | + <p class='paragrafo'> | |
314 | + <input id='i3GEOlegendabotaoQuantil' type='button' value='{{{calcularQuantil}}}' /> | |
315 | + </p> | |
316 | + </fieldset> | |
317 | + <br> | |
318 | + <fieldset style='padding: 5px; margin: 2px;'> | |
319 | + <legend>{{{metade}}}</legend> | |
320 | + <p class='paragrafo'>{{{duasmetades}}}</p> | |
321 | + <div id='i3GEOlegendaitensMetade' class='styled-select'></div> | |
322 | + <br> | |
323 | + <p class='paragrafo'>{{{iunico}}}</p> | |
324 | + <div id='i3GEOlegendaitensMetadeId' class='styled-select'></div> | |
325 | + <br> | |
326 | + <p class='paragrafo'> | |
327 | + <input id='i3GEOlegendabotaoMetade' size='25' type='button' value='{{{aplicar}}}' /> | |
328 | + </p> | |
329 | + </fieldset> | |
330 | + <br> | |
331 | + <fieldset style='padding: 5px; margin: 2px;'> | |
332 | + <legend>{{{media}}}</legend> | |
333 | + <p class='paragrafo'>{{{duasmedias}}}</p> | |
334 | + <div id='i3GEOlegendaitensMedia' class='styled-select'></div> | |
335 | + <br> | |
336 | + <p class='paragrafo'> | |
337 | + <input id='i3GEOlegendabotaoMedia' size='25' type='button' value='{{{aplicar}}}' /> | |
338 | + </p> | |
339 | + </fieldset> | |
340 | + <br> | |
341 | + <fieldset style='padding: 5px; margin: 2px;'> | |
342 | + <legend>{{{calcularQuartil}}}</legend> | |
343 | + <p class='paragrafo'>{{{criaQuartis}}}</p> | |
344 | + <div id='i3GEOlegendaitensValorQuartil' class='styled-select'></div> | |
345 | + <br> | |
346 | + <p class='paragrafo'> | |
347 | + <input id='i3GEOlegendabotao9' size='25' type='button' value='{{{aplicar}}}' /> | |
348 | + </p> | |
349 | + <p class='paragrafo'>{{{estiloNomeClasses}}}: | |
350 | + <div class='styled-select'> | |
351 | + <select id='estiloClassesQuartis'> | |
352 | + <option value='minimo'>{{{soValores}}}</option> | |
353 | + <option value='simples'>{{{quartilValores}}}</option> | |
354 | + <option value='completo'>{{{expressaoCompleta}}}</option> | |
355 | + </select> | |
356 | + </div> | |
357 | + </fieldset> | |
358 | + <br> | |
359 | + </div> | |
360 | +</div> | |
361 | +<div id='i3GEOlegendaguia3obj' style='width: 99%; text-align: left;'> | |
362 | + <fieldset style='padding: 5px; margin: 2px;'> | |
363 | + <legend>{{{etiquetasClasse}}}</legend> | |
364 | + <p class='paragrafo'>{{{itemComTexto}}}:</p> | |
365 | + <div class='styled-select' id='i3GEOlegendaitensLabel'></div> | |
366 | + <br> | |
367 | + <p class='paragrafo' style='font-size: 10px;'> | |
368 | + <input id='i3GEOlegendabotaoExcluirLabel' size='10' type='button' value='{{{exclui}}}' /> | |
369 | + <input id='i3GEOlegendabotaoIncluirLabel' size='10' type='button' value='{{{aplicar}}}' /> | |
370 | + <input id='i3GEOlegendabotaoPropriedadeLabel' size='10' type='button' value='{{{propriedades2}}}' /> | |
371 | + </p> | |
372 | + </fieldset> | |
373 | + <br> | |
374 | + <fieldset style='padding: 5px; margin: 2px;'> | |
375 | + <legend>{{{estilos}}}</legend> | |
376 | + <p class='paragrafo' style='font-size: 10px;'>{{{ajudaEstilo}}} | |
377 | + <div id='i3GEOlegendacomboestilos'></div> | |
378 | + <br> | |
379 | + <input id='i3GEOlegendabotao11' class='executar' size='10' type='button' value='{{{exclui}}}' /> | |
380 | + | |
381 | + <input id='i3GEOlegendabotao12' class='executar' size='14' type='button' value='{{{adiciona}}}' /> | |
382 | + | |
383 | + <input id='i3GEOlegendabotao13' class='executar' size='8' type='button' value='{{{sobe}}}' /> | |
384 | + | |
385 | + <input id='i3GEOlegendabotao14' class='executar' size='8' type='button' value='{{{desce}}}' /> | |
386 | + <div id='i3GEOlegendaParametrosEstilos' style='position: relative; top: 10px; left: 0px; text-align: left'></div> | |
387 | + <br> <br> | |
388 | + <!-- | |
389 | + <p class='paragrafo' style='font-size: 10px'> | |
390 | + <input id='i3GEOlegendabotao10' size='35' type='button' value='{{{aplicaAlteracoes}}}' /> | |
391 | + </p> | |
392 | + --> | |
393 | + <div style='position: relative; top: 0px; left: 0px; text-align: left;' id='i3GEOlegendamostraEstilo'></div> | |
394 | + <div style='position: relative; top: 0px; left: 0px; text-align: left;' id='i3GEOlegendasimbolos'></div> | |
395 | + </fieldset> | |
396 | +</div> | |
397 | +<div id='i3GEOlegendaguia4obj' style='width: 99%; text-align: left;'></div> | |
398 | +<div id='i3GEOlegendaguia5obj' style='width: 99%; text-align: left;'> | |
399 | + <p class='paragrafo'> | |
400 | + {{{geraSLD}}} | |
401 | + <a href='http://mapserver.org/ogc/sld.html#sld' target='_blank'> Mapserver SLD </a> | |
402 | + {{{ajudaSLD}}} | |
403 | + <p class='paragrafo'> | |
404 | + <input id='i3GEOlegendabotaoSLDe' size='25' type='button' value='{{{exportaSLD}}}' /> | |
405 | + </p> | |
406 | + <p class='paragrafo'>{{{msgAplicaSLD}}} | |
407 | + <p class='paragrafo'> | |
408 | + <input id='i3GEOlegendabotaoSLDi' size='25' type='button' value='{{{aplicaSLD}}}' /> | |
409 | + </p> | |
410 | +</div> | |
411 | +<input type='hidden' value='' id='listaColourRamp' onchange='javascript:i3GEOF.legenda.aplicaColourRamp()' /> | |
0 | 412 | \ No newline at end of file | ... | ... |
js/util.js
... | ... | @@ -1782,6 +1782,8 @@ i3GEO.util = |
1782 | 1782 | * {string} sim|nao indica se para os nomes dos itens sera usado o alias (default= sim) |
1783 | 1783 | * |
1784 | 1784 | * {string} - estilo CSS em linha |
1785 | + * | |
1786 | + * {string} - classe css | |
1785 | 1787 | */ |
1786 | 1788 | comboItens : function(id, tema, funcao, onde, nome, alias, estilo, classe) { |
1787 | 1789 | if (typeof (console) !== 'undefined') | ... | ... |