Commit 2551275f4fe6b7085fccb7e75a958474778c0302
1 parent
bc41e0c9
Exists in
master
and in
7 other branches
Inclusão de opção para escolher coluna para o busca rápida no editor de etiquetas
Showing
9 changed files
with
63 additions
and
46 deletions
Show diff stats
classesphp/classe_mapa.php
classesphp/classe_toponimia.php
... | ... | @@ -325,7 +325,8 @@ $item Lista de Itens separados por vírgula que serão utilizados. |
325 | 325 | "itens"=>$itens, |
326 | 326 | "itensdesc"=>array_combine($itens,$itensdesc), |
327 | 327 | "itenslink"=>array_combine($itens,$itenslink), |
328 | - "tips"=>explode(",",$tips) | |
328 | + "tips"=>explode(",",$tips), | |
329 | + "itembuscarapida"=>$this->layer->getmetadata("itembuscarapida") | |
329 | 330 | ); |
330 | 331 | return($res); |
331 | 332 | } | ... | ... |
ferramentas/atalhosedicao/dicionario.js
ferramentas/etiqueta/dicionario.js
... | ... | @@ -6,7 +6,7 @@ i3GEOF.etiqueta.dicionario = { |
6 | 6 | es : "" |
7 | 7 | } ], |
8 | 8 | 'selecionaItem' : [{ |
9 | - pt : "Escolha o item que será utilizado como fonte de dados para mostrar na etiqueta", | |
9 | + pt : "Ative ou desative os itens que serão mostrados na ferramenta tabela. Dos itens ativos, escolha quais serão usados na ferramenta de identificação simples (tip). Opcionalmente, indique os apelidos dos itens ativos e qual o item que será utilizado na ferramenta de busca rápida. Links são opcionais e podem receber outros itens como parâmetros de substituição, nesse caso, indique o item com [nomedoitem].", | |
10 | 10 | en : "", |
11 | 11 | es : "" |
12 | 12 | } ], | ... | ... |
ferramentas/etiqueta/exec.php
... | ... | @@ -22,6 +22,7 @@ Ativa as etiquetas de um tema. |
22 | 22 | $m->layer->setmetadata("ITENS",$itens); |
23 | 23 | $m->layer->setmetadata("ITENSDESC",base64_decode($itensdesc)); |
24 | 24 | $m->layer->setmetadata("ITENSLINK",base64_decode($itenslink)); |
25 | + $m->layer->setmetadata("itembuscarapida",$itembuscarapida); | |
25 | 26 | $m->salva(); |
26 | 27 | $_SESSION["contadorsalva"]++; |
27 | 28 | $retorno = "ok"; | ... | ... |
ferramentas/etiqueta/index.js
... | ... | @@ -67,25 +67,6 @@ i3GEOF.etiqueta = { |
67 | 67 | return dicionario; |
68 | 68 | }, |
69 | 69 | /* |
70 | - Function: iniciaDicionario | |
71 | - | |
72 | - Carrega o dicionário e chama a função que inicia a ferramenta | |
73 | - | |
74 | - O Javascript é carregado com o id i3GEOF.nomedaferramenta.dicionario_script | |
75 | - */ | |
76 | - iniciaDicionario: function(){ | |
77 | - if(typeof(i3GEOF.etiqueta.dicionario) === 'undefined'){ | |
78 | - i3GEO.util.scriptTag( | |
79 | - i3GEO.configura.locaplic+"/ferramentas/etiqueta/dicionario.js", | |
80 | - "i3GEOF.etiqueta.iniciaJanelaFlutuante()", | |
81 | - "i3GEOF.etiqueta.dicionario_script" | |
82 | - ); | |
83 | - } | |
84 | - else{ | |
85 | - i3GEOF.etiqueta.iniciaJanelaFlutuante(); | |
86 | - } | |
87 | - }, | |
88 | - /* | |
89 | 70 | Function: inicia |
90 | 71 | |
91 | 72 | Inicia a ferramenta. É chamado por criaJanelaFlutuante |
... | ... | @@ -149,8 +130,8 @@ i3GEOF.etiqueta = { |
149 | 130 | //cria a janela flutuante |
150 | 131 | titulo = "<div id='i3GEOFetiquetaComboCabeca' class='comboTemasCabecalho'> ------</div><span style=margin-left:60px>"+$trad("d7at")+"</span><a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=5&idajuda=37' > </a>"; |
151 | 132 | janela = i3GEO.janela.cria( |
152 | - "500px", | |
153 | - "230px", | |
133 | + "510px", | |
134 | + "300px", | |
154 | 135 | "", |
155 | 136 | "", |
156 | 137 | "", |
... | ... | @@ -209,34 +190,45 @@ i3GEOF.etiqueta = { |
209 | 190 | itensatuais = itensatuais.etiquetas.split(","); |
210 | 191 | ins = []; |
211 | 192 | ins.push("<table class='lista8' >"); |
212 | - ins.push("<tr><td>Coluna</td><td>Tip</td><td>Identifica</td><td>Alias</td><td>Link</td>"); | |
193 | + ins.push("<tr><td>Coluna</td><td>Identifica</td><td>Tip</td><td>Busca</td><td>Alias</td><td>Link</td>"); | |
213 | 194 | n = retorno.data.valores.length; |
214 | 195 | for (i=0;i<n; i++){ |
215 | - //etiquetas tip | |
196 | + | |
197 | + ins.push("<tr>"); | |
198 | + //nome da coluna | |
216 | 199 | item = retorno.data.valores[i].item; |
200 | + ins.push("<td> "+item+"</td>"); | |
201 | + //itens | |
202 | + if(i3GEO.util.in_array(item,lista.itens) || i3GEO.util.in_array(item,itensatuais) || lista.itembuscarapida[item]){ | |
203 | + ck = "checked"; | |
204 | + } | |
205 | + else{ | |
206 | + ck = ""; | |
207 | + } | |
208 | + ins.push("<td><input onclick='i3GEOF.etiqueta.ativaLinha(this)' style='cursor:pointer' id='etiqueta_"+item+"' "+ck+" type='checkbox' value='"+item+"' name='identifica' /></td>"); | |
209 | + | |
210 | + //etiquetas tip | |
217 | 211 | if(i3GEO.util.in_array(item,itensatuais)){ |
218 | 212 | ck = "checked"; |
219 | 213 | } |
220 | 214 | else{ |
221 | 215 | ck = ""; |
222 | 216 | } |
223 | - ins.push("<tr>"); | |
224 | - ins.push("<td> "+item+"</td>"); | |
225 | 217 | ins.push("<td><input disabled style='cursor:pointer' "+ck+" type='checkbox' value='"+item+"' name='etiquetaTip' /></td>"); |
226 | - //itens | |
227 | - if(i3GEO.util.in_array(item,lista.itens)){ | |
218 | + //buscarapida | |
219 | + if(lista.itembuscarapida === item){ | |
228 | 220 | ck = "checked"; |
229 | 221 | } |
230 | 222 | else{ |
231 | 223 | ck = ""; |
232 | 224 | } |
233 | - ins.push("<td><input onclick='i3GEOF.etiqueta.ativaLinha(this)' style='cursor:pointer' id='etiqueta_"+item+"' "+ck+" type='checkbox' value='"+item+"' name='identifica' /></td>"); | |
225 | + ins.push("<td><input style='cursor:pointer' value='"+item+"' type='radio' "+ck+" name='itembuscarapida' /></td>"); | |
234 | 226 | //alias dos itens |
235 | 227 | if(lista.itensdesc[item]){ |
236 | 228 | ck = lista.itensdesc[item]; |
237 | 229 | } |
238 | 230 | else{ |
239 | - ck = ""; | |
231 | + ck = item; | |
240 | 232 | } |
241 | 233 | ins.push("<td><div class='i3geoForm150 i3geoFormIconeEdita' ><input disabled type='text' value='"+ck+"' name='itensdesc' /></div></td>"); |
242 | 234 | //links |
... | ... | @@ -248,6 +240,7 @@ i3GEOF.etiqueta = { |
248 | 240 | } |
249 | 241 | ins.push("<td><div class='i3geoForm150 i3geoFormIconeEdita' ><input disabled type='text' value='"+ck+"' name='itenslink' /></div></td>"); |
250 | 242 | |
243 | + | |
251 | 244 | ins.push("</tr>"); |
252 | 245 | } |
253 | 246 | ins.push("</table>"); |
... | ... | @@ -287,6 +280,7 @@ i3GEOF.etiqueta = { |
287 | 280 | itens = [], |
288 | 281 | itensdesc = [], |
289 | 282 | itenslink = [], |
283 | + itembuscarapida = "", | |
290 | 284 | inputs = $i("i3GEOetiquetalistai").getElementsByTagName("input"), |
291 | 285 | i, |
292 | 286 | it, |
... | ... | @@ -305,8 +299,11 @@ i3GEOF.etiqueta = { |
305 | 299 | if (it.disabled === false && it.name === "itenslink"){ |
306 | 300 | itenslink.push(it.value); |
307 | 301 | } |
302 | + if (it.checked === true && it.name === "itembuscarapida"){ | |
303 | + itembuscarapida = it.value; | |
304 | + } | |
308 | 305 | } |
309 | - return([tips,itens,itensdesc,itenslink]); | |
306 | + return([tips,itens,itensdesc,itenslink,itembuscarapida]); | |
310 | 307 | }, |
311 | 308 | /* |
312 | 309 | Function: ativa |
... | ... | @@ -339,7 +336,8 @@ i3GEOF.etiqueta = { |
339 | 336 | + "&tips="+lista[0].toString(",") |
340 | 337 | + "&itens="+lista[1].toString(",") |
341 | 338 | + "&itensdesc="+i3GEO.util.base64encode(lista[2].toString(",")) |
342 | - + "&itenslink="+i3GEO.util.base64encode(lista[3].toString(",")); | |
339 | + + "&itenslink="+i3GEO.util.base64encode(lista[3].toString(",")) | |
340 | + + "&itembuscarapida="+lista[4]; | |
343 | 341 | cp.set_response_type("JSON"); |
344 | 342 | cp.set_transfer_mode('POST'); |
345 | 343 | cp.call(p,"etiqueta",temp); | ... | ... |
ferramentas/etiqueta/template_mst.html
1 | -<p class='paragrafo'> | |
2 | - {{{selecionaItem}}}:<br> | |
3 | -<div id='i3GEOetiquetalistai' class='digitar' style='text-align: left; left: 0px; top: 0px; width:95%; height: 80px; overflow: auto; display: block;'></div> | |
1 | +<div id='i3GEOetiquetalistai' class='digitar' style='text-align: left; left: 0px; top: 0px; width: 95%; height: 120px; overflow: auto; display: block;'></div> | |
4 | 2 | <br> |
5 | 3 | <p class='paragrafo'> |
6 | 4 | <input id='i3GEOetiquetabotao1' size='35' type='button' value='{{{aplica}}}' /> |
7 | - <input id='i3GEOetiquetabotao2' size='35' type='button' value='{{{desativaEtiquetas}}}' /> | |
8 | 5 | \ No newline at end of file |
6 | + <input id='i3GEOetiquetabotao2' size='35' type='button' value='{{{desativaEtiquetas}}}' /> | |
7 | +<p class='paragrafo'> | |
8 | + {{{selecionaItem}}}<br> | |
9 | 9 | \ No newline at end of file | ... | ... |
ferramentas/identifica/template_mst.html
... | ... | @@ -38,7 +38,7 @@ |
38 | 38 | <div class='guiaobj' id='{{{idjanelaA}}}i3GEOidentificaguia3obj' style='left: 1px; top: 10px; display: none; font-size: 12px; overflow: hidden'> |
39 | 39 | {{{resolucaoBusca}}}:<br> <br> |
40 | 40 | <div class='i3geoForm i3geoFormIconeEdita'> |
41 | - <input type='text' value='5' id='{{{idjanelaA}}}i3GEOidentificaresolucao' /> | |
41 | + <input type='text' value='10' id='{{{idjanelaA}}}i3GEOidentificaresolucao' /> | |
42 | 42 | </div> |
43 | 43 | <br> <br> |
44 | 44 | </div> | ... | ... |
temas/_llocali.map
... | ... | @@ -6,22 +6,30 @@ MAP |
6 | 6 | DATA "/var/www/i3geo/aplicmap/dados/locali.shp" |
7 | 7 | METADATA |
8 | 8 | "METAESTAT_ID_MEDIDA_VARIAVEL" "" |
9 | - "TIP" "TIPO,ANOCRIA,NOMELOC" | |
9 | + "TIP" "TIPO,NOMELOC,ANOCRIA" | |
10 | 10 | "LTEMPOITEMIMAGEM" "" |
11 | - | |
11 | + "cache" "" | |
12 | 12 | "CLASSE" "SIM" |
13 | 13 | "LTEMPOITEMDESCRICAO" "TIPO" |
14 | + "olopacity" "" | |
14 | 15 | "LTEMPOITEMINICIO" "ANOCRIA" |
15 | 16 | "palletestep" "" |
16 | 17 | "permitekmz" "sim" |
17 | 18 | "LTEMPOITEMTIP" "ANOCRIA" |
18 | 19 | "temporizador" "" |
20 | + "gmopacity" "" | |
21 | + "gmstatus" "" | |
22 | + "ITENSDESC" "Município,TIPO,Localidade,ANOCRIA" | |
19 | 23 | "iconetema" "" |
20 | 24 | "LTEMPOITEMTITULO" "NOMELOC" |
21 | 25 | "description_template" "" |
26 | + "ITENSLINK" ",,," | |
22 | 27 | "LTEMPOITEMLINK" "" |
23 | 28 | "METAESTAT_CODIGO_TIPO_REGIAO" "" |
29 | + "arquivotemaoriginal" "" | |
24 | 30 | "palletefile" "" |
31 | + "nomeoriginal" "" | |
32 | + "olstatus" "" | |
25 | 33 | "permitedownload" "sim" |
26 | 34 | "LTEMPOFORMATODATA" "iso8601" |
27 | 35 | "permitecomentario" "SIM" |
... | ... | @@ -29,6 +37,7 @@ MAP |
29 | 37 | "metaestat" "" |
30 | 38 | "download" "SIM" |
31 | 39 | "itembuscarapida" "NOMELOC" |
40 | + "ITENS" "NOMEMUN,TIPO,NOMELOC,ANOCRIA" | |
32 | 41 | "arquivodownload" "" |
33 | 42 | "arquivokmz" "" |
34 | 43 | "permitekml" "sim" |
... | ... | @@ -37,15 +46,21 @@ MAP |
37 | 46 | "TEMA" "Localidades (usar com timeline)" |
38 | 47 | "convcaracter" "" |
39 | 48 | "cortepixels" "40" |
40 | - #"cache" "SIM" | |
41 | 49 | "editorsql" "" |
42 | 50 | "LTEMPOCONVENCODE" "SIM" |
43 | 51 | "LTEMPOITEMFIM" "" |
44 | 52 | "legendaimg" "" |
45 | 53 | END # METADATA |
46 | 54 | NAME "_llocali" |
47 | - STATUS OFF | |
55 | + PROCESSING "LABEL_NO_CLIP=True" | |
56 | + PROCESSING "POLYLINE_NO_CLIP=True" | |
57 | + PROCESSING "LABEL_NO_CLIP=True" | |
58 | + PROCESSING "POLYLINE_NO_CLIP=True" | |
59 | + PROCESSING "LABEL_NO_CLIP=True" | |
60 | + PROCESSING "POLYLINE_NO_CLIP=True" | |
61 | + STATUS DEFAULT | |
48 | 62 | TEMPLATE "none.htm" |
63 | + TILEITEM "location" | |
49 | 64 | TYPE POINT |
50 | 65 | UNITS METERS |
51 | 66 | CLASS |
... | ... | @@ -56,16 +71,18 @@ MAP |
56 | 71 | SIZE 20 |
57 | 72 | SYMBOL "/var/www/i3geo/imagens/google/condominium.png" |
58 | 73 | END # STYLE |
74 | + TITLE "" | |
59 | 75 | END # CLASS |
60 | 76 | CLASS |
61 | 77 | NAME "Cidade" |
62 | 78 | EXPRESSION ('[TIPO]'eq'Cidade') |
63 | 79 | STYLE |
64 | 80 | COLOR 62 9 41 |
65 | - SIZE 20 | |
66 | 81 | OFFSET 0 -10 |
82 | + SIZE 20 | |
67 | 83 | SYMBOL "/var/www/i3geo/imagens/google/condominium1.png" |
68 | 84 | END # STYLE |
85 | + TITLE "" | |
69 | 86 | END # CLASS |
70 | 87 | CLASS |
71 | 88 | NAME "Capital" |
... | ... | @@ -75,6 +92,7 @@ MAP |
75 | 92 | SIZE 6 |
76 | 93 | SYMBOL "vila" |
77 | 94 | END # STYLE |
95 | + TITLE "" | |
78 | 96 | END # CLASS |
79 | 97 | END # LAYER |
80 | 98 | ... | ... |