Commit 837ee68ee4c348df78f8c342f8e2f32b5f3b34e0
1 parent
672a1e6a
Exists in
master
and in
7 other branches
Inclusão de filtro por palavra na lista de mapfiles do editor de mapfiles
Showing
16 changed files
with
39 additions
and
109 deletions
Show diff stats
admin1/catalogo/mapfile/exec.php
... | ... | @@ -36,6 +36,8 @@ $codigo = str_replace ( ".", "", $codigo ); |
36 | 36 | $codigo = strip_tags ( $codigo ); |
37 | 37 | $codigo = htmlspecialchars ( $codigo, ENT_QUOTES ); |
38 | 38 | |
39 | +setcookie("palavraFiltro", strip_tags($_POST ["palavra"])); | |
40 | + | |
39 | 41 | $funcao = strtoupper ( $funcao ); |
40 | 42 | switch ($funcao) { |
41 | 43 | case "ADICIONAR" : | ... | ... |
admin1/catalogo/mapfile/index.js
... | ... | @@ -348,5 +348,9 @@ Obtém a lista |
348 | 348 | i3GEOadmin.core.mostraErro(data.status + " " +data.statusText); |
349 | 349 | } |
350 | 350 | ); |
351 | + }, | |
352 | + aplicaFiltroPalavra: function(){ | |
353 | + var palavra = $("#filtroPrefixo").val(); | |
354 | + i3GEOadmin.mapfile.lista(palavra); | |
351 | 355 | } |
352 | 356 | }; |
353 | 357 | \ No newline at end of file | ... | ... |
admin1/catalogo/mapfile/index.php
... | ... | @@ -40,7 +40,8 @@ include "../../head.php"; |
40 | 40 | <blockquote>{{{txtDesc}}}</blockquote> |
41 | 41 | <div class="col-md-6"> |
42 | 42 | <div class="form-group"> |
43 | - <label class="control-label">{{{validar}}}</label> <select title="{{{validar}}}" onchange="i3GEOadmin.mapfile.lista('',this.value);" id="" class="form-control input-lg"> | |
43 | + <label class="control-label">{{{validar}}}</label> | |
44 | + <select title="{{{validar}}}" onchange="i3GEOadmin.mapfile.lista('',this.value);" id="" class="form-control input-lg"> | |
44 | 45 | <option value=''></option> |
45 | 46 | <option value=1>Sem fonte</option> |
46 | 47 | <option value=12>Títulos diferentes no mapfile e no banco de dados</option> |
... | ... | @@ -58,6 +59,17 @@ include "../../head.php"; |
58 | 59 | </select> |
59 | 60 | </div> |
60 | 61 | </div> |
62 | + <div class="col-md-6"> | |
63 | + <div class="form-group"> | |
64 | + <div class="input-group "> | |
65 | + <label class="control-label" >{{{filtroPrefixo}}}</label> | |
66 | + <input class="form-control input-lg" type="text" value="<?php echo $_COOKIE["palavraFiltro"];?>" id="filtroPrefixo"> | |
67 | + <a onclick="i3GEOadmin.mapfile.aplicaFiltroPalavra();return false;" role="button" type="button" class="pull-right btn btn-danger btn-fab btn-fab-mini" href="javascript:void(0)"> | |
68 | + <i class="material-icons md-18">send</i> | |
69 | + </a> | |
70 | + </div> | |
71 | + </div> | |
72 | + </div> | |
61 | 73 | <div class="clearfix"></div> |
62 | 74 | <div id="ajudaPrincipal" class="modal fade" tabindex="-1"> |
63 | 75 | <div class="modal-dialog"> |
... | ... | @@ -135,7 +147,7 @@ include ("templates/templateClonarTema.php"); |
135 | 147 | $.material.init(); |
136 | 148 | i3GEOadmin.core.loginOn(); |
137 | 149 | $(".hidden").removeClass('hidden'); |
138 | - i3GEOadmin.mapfile.init($("#corpo"),""); | |
150 | + i3GEOadmin.mapfile.init($("#corpo"),"<?php echo $_COOKIE["palavraFiltro"];?>"); | |
139 | 151 | }); |
140 | 152 | </script> |
141 | 153 | </body> | ... | ... |
admin1/dicionario/editormapfile.js
... | ... | @@ -558,5 +558,10 @@ i3GEOadmin.mapfile.dicionario = { |
558 | 558 | pt : "Sobre os parâmetros utilizados, veja detalhes em ", |
559 | 559 | en : "", |
560 | 560 | es : "" |
561 | + } ], | |
562 | + 'filtroPrefixo' : [ { | |
563 | + pt : "Palavra para filtrar a lista de mapfiles", | |
564 | + en : "", | |
565 | + es : "" | |
561 | 566 | } ] |
562 | 567 | }; | ... | ... |
classesjs/classe_arvoredecamadas.js
classesjs/classe_coordenadas.js
... | ... | @@ -694,7 +694,7 @@ i3GEO.coordenadas = |
694 | 694 | * {string} - (opcional) id onde o resultado será mostrado (irá ignorar os ids definidos em coordenadas.config) |
695 | 695 | */ |
696 | 696 | mostraCoordenadas : function(ativaMovimento, onde, x, y) { |
697 | - //FIXME As coordenadas metricas nao funcionam em OSM | |
697 | + // As coordenadas metricas nao funcionam em OSM | |
698 | 698 | if(i3GEO.parametros.w < 700){ |
699 | 699 | return; |
700 | 700 | } | ... | ... |
classesjs/classe_editorgm.js
1 | -//TODO documentar | |
2 | -//TODO incluir balao de informacoes como um elemento grafico de desenho | |
3 | -//TODO incluir caixas de texto | |
4 | -//TODO incluir undo na edicao | |
1 | +// documentar | |
2 | +// incluir balao de informacoes como um elemento grafico de desenho | |
3 | +// incluir caixas de texto | |
4 | +// incluir undo na edicao | |
5 | 5 | |
6 | 6 | /* |
7 | 7 | Editor vetorial de limites para a interface google maps | ... | ... |
classesjs/classe_editorol.js
1 | -//TODO incluir balao de informacoes como um elemento grafico de desenho | |
2 | -//TODO incluir caixas de texto | |
3 | -//TODO incluir undo na edicao | |
1 | +// incluir balao de informacoes como um elemento grafico de desenho | |
2 | +// incluir caixas de texto | |
3 | +// incluir undo na edicao | |
4 | 4 | |
5 | 5 | /* |
6 | 6 | Title: Editor vetorial para OpenLayers | ... | ... |
classesjs/classe_maparef.js
... | ... | @@ -502,7 +502,7 @@ i3GEO.maparef = |
502 | 502 | click : function() { |
503 | 503 | if (typeof (console) !== 'undefined') |
504 | 504 | console.info("i3GEO.maparef.click()"); |
505 | - //FIXME nao funciona no OSM | |
505 | + // nao funciona no OSM | |
506 | 506 | if (i3GEO.Interface.ATUAL === "openlayers" || i3GEO.Interface.ATUAL === "googlemaps") { |
507 | 507 | i3GEO.Interface[i3GEO.Interface.ATUAL].pan2ponto(objposicaocursor.ddx, objposicaocursor.ddy); |
508 | 508 | } | ... | ... |
classesjs/classe_navega.js
... | ... | @@ -70,7 +70,7 @@ i3GEO.navega = |
70 | 70 | posicao : 0, |
71 | 71 | emAcao : false |
72 | 72 | }, |
73 | - //TODO remover temponavegar | |
73 | + // remover temponavegar | |
74 | 74 | /** |
75 | 75 | * Tempo em milisegundos que será esperado para executar uma operação de navegação sobre o mapa. |
76 | 76 | * | ... | ... |
classesjs/classe_tema.js
classesjs/geradordelinks.js
... | ... | @@ -51,7 +51,7 @@ Veja |
51 | 51 | //carrega as dependências |
52 | 52 | // |
53 | 53 | |
54 | -//TODO aplicar o padrao de css nos inputs (ver HTML) | |
54 | +// aplicar o padrao de css nos inputs (ver HTML) | |
55 | 55 | (function(){ |
56 | 56 | var scriptLocation = ""; |
57 | 57 | var scripts = document.getElementsByTagName('script'); | ... | ... |
js/arvoredecamadas.js
... | ... | @@ -423,100 +423,6 @@ i3GEO.arvoreDeCamadas = |
423 | 423 | console.info("oops i3GEO.arvoreDeCamadas.ligaDesligaTemas()"); |
424 | 424 | }, |
425 | 425 | /** |
426 | - * Monta os nós filhos do nó "legenda" | |
427 | - * | |
428 | - * Parametro: | |
429 | - * | |
430 | - * {YAHOO.widget.HTMLNode} | |
431 | - */ | |
432 | - mostraLegenda : function(node) { | |
433 | - if (typeof (console) !== 'undefined') | |
434 | - console.info("i3GEO.arvoreDeCamadas.mostraLegenda()"); | |
435 | - | |
436 | - var retorna, idtema = node.data.id; | |
437 | - retorna = | |
438 | - function(retorno) { | |
439 | - var original = { | |
440 | - data : "" | |
441 | - }, i, re, tabela = "", linhas, linha, colunas, incluir, elementos, nelementos, inputs, desativar, nindices; | |
442 | - if (retorno.data && retorno.data.legenda) { | |
443 | - original = retorno; | |
444 | - retorno = retorno.data.legenda; | |
445 | - if (retorno[0]) { | |
446 | - if ((navn) && (!retorno[0].imagem)) { | |
447 | - tabela = retorno; | |
448 | - } else { | |
449 | - i = retorno[0].imagem; | |
450 | - re = new RegExp("tiff", "g"); | |
451 | - i = i.replace(re, 'png'); | |
452 | - tabela = "<img src='" + i + "' />"; | |
453 | - } | |
454 | - retorno = ""; | |
455 | - } else { | |
456 | - linhas = retorno.split("#"); | |
457 | - if (linhas.length > 1) { | |
458 | - linhas = retorno.split("|"); | |
459 | - tabela = "<table>"; | |
460 | - linha = linhas.length - 1; | |
461 | - if (linha >= 0) { | |
462 | - do { | |
463 | - colunas = linhas[linha].split("#"); | |
464 | - re = new RegExp("'", "g"); | |
465 | - tabela += | |
466 | - "<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='" + colunas[4] | |
467 | - + "' </td><td style='text-align:left'>" + colunas[2] + "</td></tr>"; | |
468 | - } while (linha--); | |
469 | - } | |
470 | - tabela += "</table><br>"; | |
471 | - } else if (retorno) { | |
472 | - tabela = retorno; | |
473 | - } | |
474 | - } | |
475 | - } else if(retorno && retorno.data){ | |
476 | - tabela = "<img src='" + retorno.data[0].imagem + "' />"; | |
477 | - } // o tema é um wms | |
478 | - incluir = "<div style='text-align:left' id='" + idtema + "verdiv" + "'>" + tabela + "</div>"; | |
479 | - new YAHOO.widget.HTMLNode({ | |
480 | - html : incluir, | |
481 | - enableHighlight : false, | |
482 | - expanded : false | |
483 | - }, node); | |
484 | - node.loadComplete(); | |
485 | - // | |
486 | - // desliga os checkbox que foram desativados | |
487 | - // pega os objetos input | |
488 | - // | |
489 | - elementos = document.getElementById(idtema + "verdiv").getElementsByTagName("input"); | |
490 | - nelementos = elementos.length; | |
491 | - inputs = []; | |
492 | - i = 0; | |
493 | - if (nelementos > 0) { | |
494 | - do { | |
495 | - if (elementos[i].type === "checkbox") { | |
496 | - inputs.push(elementos[i]); | |
497 | - } | |
498 | - i++; | |
499 | - } while (i < nelementos); | |
500 | - } | |
501 | - if (original && original.data && original.data.desativar && original.data.desativar[idtema]) { | |
502 | - desativar = original.data.desativar[idtema]; | |
503 | - nindices = desativar.length; | |
504 | - i = 0; | |
505 | - if (nindices > 0) { | |
506 | - do { | |
507 | - inputs[desativar[i]].checked = false; | |
508 | - i++; | |
509 | - } while (i < nindices); | |
510 | - } | |
511 | - } | |
512 | - }; | |
513 | - if (i3GEO.arvoreDeCamadas.TEMPLATELEGENDA !== "") { | |
514 | - i3GEO.php.criaLegendaHTML(retorna, idtema, i3GEO.arvoreDeCamadas.TEMPLATELEGENDA); | |
515 | - } else { | |
516 | - i3GEO.php.criaLegendaHTML(retorna, idtema); | |
517 | - } | |
518 | - }, | |
519 | - /** | |
520 | 426 | * Function: atualizaLegenda |
521 | 427 | * |
522 | 428 | * Atualiza a legenda de um tema. |
... | ... | @@ -532,6 +438,7 @@ i3GEO.arvoreDeCamadas = |
532 | 438 | console.info("oops i3GEO.arvoreDeCamadas.atualizaLegenda()"); |
533 | 439 | |
534 | 440 | }, |
441 | + //TODO implementar isso na legenda | |
535 | 442 | /** |
536 | 443 | * Abre uma janela para escolher uma nova cor para o símbolo da classe. |
537 | 444 | * | ... | ... |