Commit 5ba7e71a208e53f6df62e6ac795273221e8be2a1
1 parent
04557b86
Exists in
master
and in
7 other branches
Novas opções na janela flutunte que apresenta a legenda
Showing
15 changed files
with
123 additions
and
18 deletions
Show diff stats
admin/admin.db
No preview for this file type
aplicmap/legenda6.htm
| ... | ... | @@ -4,8 +4,8 @@ |
| 4 | 4 | [if name=TEMA oper=neq value=NAO] |
| 5 | 5 | <table [if name=CLASSE oper=eq value=NAO] style=display:none; [/if] > |
| 6 | 6 | <tr><td style=text-align:left > |
| 7 | - <img onclick='i3GEO.mapa.legendaHTML.escondeTema("[leg_layer_name]")' title="Esconde" src="../imagens/branco.gif" class="x" > | |
| 8 | - <b><span class=legendaTema ><input value="[leg_layer_name]" name="layer" onclick="i3GEO.mapa.legendaHTML.ativaDesativaTema(this)" type=checkbox checked class=inputsb style=opacity:0.3;cursor:pointer;position:relative;top:2px;left:2px; > [metadata name=TEMA]</span></b><br> </td> | |
| 7 | + <img style='position:relative;top:3px;' onclick='i3GEO.mapa.legendaHTML.escondeTema("[leg_layer_name]")' title="Esconde" src="../imagens/oxygen/16x16/edit-delete.png" > | |
| 8 | + <b><span class=legendaTema ><input value="[leg_layer_name]" name="layer" onclick="i3GEO.mapa.legendaHTML.ativaDesativaTema(this)" type=checkbox checked class=inputsb style=opacity:0.3;cursor:pointer;position:relative;top:2px;left:2px; > [metadata name=TEMA]</span></b><br> </td> | |
| 9 | 9 | </tr> |
| 10 | 10 | [if name=legendawms oper=isset ] |
| 11 | 11 | <tr><td style=text-align:left ><img src='[metadata name=legendawms]' /></td></tr> |
| ... | ... | @@ -18,7 +18,7 @@ |
| 18 | 18 | [/leg_layer_html] |
| 19 | 19 | |
| 20 | 20 | [leg_class_html] |
| 21 | -<table style=margin-top:5px;position:relative;left:15px; > | |
| 21 | +<table style=margin-top:5px;position:relative;left:22px; > | |
| 22 | 22 | [if name=CLASSE oper=neq value=NAO] |
| 23 | 23 | <tr> |
| 24 | 24 | <td style=width:20px;text-align:left; ><input type=checkbox CHECKED title=liga/desliga class=inputsb style='border: 0px solid red;cursor:pointer;opacity:0.3;' value=[leg_class_index] name=[leg_layer_name] id='legendack_[leg_layer_name]_[leg_class_index]' onclick='i3GEO.arvoreDeCamadas.inverteStatusClasse(this)' /> | ... | ... |
| ... | ... | @@ -0,0 +1,46 @@ |
| 1 | +<!-- | |
| 2 | +[leg_layer_html opt_flag=1] | |
| 3 | + </div><div style='display:block;float:left;padding: 5px;' id='legendaLayer_[leg_layer_name]' > | |
| 4 | + [if name=TEMA oper=neq value=NAO] | |
| 5 | + <table [if name=CLASSE oper=eq value=NAO] style=display:none; [/if] > | |
| 6 | + <tr><td style=text-align:left > | |
| 7 | + <img style='position:relative;top:3px;' class='i3GEOLegendaExcluiTema' onclick='i3GEO.mapa.legendaHTML.escondeTema("[leg_layer_name]")' title="Esconde" src="../imagens/oxygen/16x16/edit-delete.png" > | |
| 8 | + <b><span class=legendaTema ><input value="[leg_layer_name]" name="layer" onclick="i3GEO.mapa.legendaHTML.ativaDesativaTema(this)" type=checkbox checked class=inputsb style=opacity:0.3;cursor:pointer;position:relative;top:2px;left:2px; > [metadata name=TEMA]</span></b><br> </td> | |
| 9 | + </tr> | |
| 10 | + [if name=legendawms oper=isset ] | |
| 11 | + <tr><td style=text-align:left ><img src='[metadata name=legendawms]' /></td></tr> | |
| 12 | + [/if] | |
| 13 | + [if name=legendaimg oper=isset ] | |
| 14 | + <tr><td style=text-align:left ><img src='[metadata name=legendaimg]' /></td></tr> | |
| 15 | + [/if] | |
| 16 | + </table> | |
| 17 | + [/if] | |
| 18 | +[/leg_layer_html] | |
| 19 | + | |
| 20 | +[leg_class_html] | |
| 21 | +<table style=margin-top:5px;position:relative;left:22px; > | |
| 22 | + [if name=CLASSE oper=neq value=NAO] | |
| 23 | + <tr> | |
| 24 | + <td style=width:20px;text-align:left; ><input type=checkbox CHECKED title=liga/desliga class=inputsb style='border: 0px solid red;cursor:pointer;opacity:0.3;' value=[leg_class_index] name=[leg_layer_name] id='legendack_[leg_layer_name]_[leg_class_index]' onclick='i3GEO.arvoreDeCamadas.inverteStatusClasse(this)' /> | |
| 25 | + </td> | |
| 26 | + <td style=text-align:left > | |
| 27 | + [if name=layer_type oper=eq value=0] | |
| 28 | + <img src=[leg_icon width=30 height=30 ] /> | |
| 29 | + [/if] | |
| 30 | + [if name=layer_type oper=eq value=1] | |
| 31 | + <img src=[leg_icon width=30 height=16 ] /> | |
| 32 | + [/if] | |
| 33 | + [if name=layer_type oper=eq value=2] | |
| 34 | + <img src=[leg_icon width=30 height=16 ] /> | |
| 35 | + [/if] | |
| 36 | + [if name=layer_type oper=eq value=3] | |
| 37 | + <img src=[leg_icon width=30 height=16 ] /> | |
| 38 | + [/if] | |
| 39 | + </td> | |
| 40 | + <td style="text-align:left;width:195px" ><span style="font-size:11px;position:relative;left:2px;" >[leg_class_name]</span></td> | |
| 41 | + </tr> | |
| 42 | + [/if] | |
| 43 | +</table> | |
| 44 | + | |
| 45 | +[/leg_class_html] | |
| 46 | +--> | |
| 0 | 47 | \ No newline at end of file | ... | ... |
classesjs/classe_barradebotoes.js
| ... | ... | @@ -1748,7 +1748,7 @@ i3GEO.barraDeBotoes = |
| 1748 | 1748 | $i("i3GEOjanelaEditor_corpo").style.backgroundColor = "white"; |
| 1749 | 1749 | i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo"); |
| 1750 | 1750 | fecha = function() { |
| 1751 | - var temp = window.confirm("Remove a edicao?"); | |
| 1751 | + var temp = window.confirm($trad("x94")); | |
| 1752 | 1752 | if (i3GEO.eventos) { |
| 1753 | 1753 | i3GEO.eventos.cliquePerm.ativa(); |
| 1754 | 1754 | } | ... | ... |
classesjs/classe_configura.js
classesjs/classe_editorgm.js
| 1 | 1 | //TODO documentar |
| 2 | +//XODO permitir edicao de temas editaveis, nao apenas de regioes cadastradas | |
| 3 | +//XODO permitir a edicao de dados fora do esquema metaestat | |
| 4 | + | |
| 5 | + | |
| 2 | 6 | /* |
| 3 | 7 | Editor vetorial de limites para a interface google maps |
| 4 | 8 | |
| ... | ... | @@ -31,6 +35,7 @@ GNU junto com este programa; se nao, escreva para a |
| 31 | 35 | Free Software Foundation, Inc., no endereco |
| 32 | 36 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
| 33 | 37 | */ |
| 38 | +// | |
| 34 | 39 | |
| 35 | 40 | if(typeof(i3GEO) === 'undefined'){ |
| 36 | 41 | var i3GEO = {}; | ... | ... |
classesjs/classe_editorol.js
| 1 | 1 | //TODO documentar |
| 2 | +//XODO permitir a edicao de atributos | |
| 3 | + | |
| 2 | 4 | /* |
| 3 | 5 | Title: Editor vetorial para OpenLayers |
| 4 | 6 | |
| ... | ... | @@ -1414,7 +1416,7 @@ i3GEO.editorOL = { |
| 1414 | 1416 | button = new OpenLayers.Control.Button({ |
| 1415 | 1417 | displayClass: "editorOLfecha", |
| 1416 | 1418 | trigger: function(){ |
| 1417 | - var temp = window.confirm("Remove a edicao?"); | |
| 1419 | + var temp = window.confirm($trad("x94")); | |
| 1418 | 1420 | if(i3GEO.eventos){ |
| 1419 | 1421 | i3GEO.eventos.cliquePerm.ativa(); |
| 1420 | 1422 | } | ... | ... |
classesjs/classe_mapa.js
| ... | ... | @@ -485,10 +485,7 @@ i3GEO.mapa = |
| 485 | 485 | } |
| 486 | 486 | } |
| 487 | 487 | }, |
| 488 | - //XODO quando aberta em janela flutuante, remover opcao de ligar/desligar camada e esconder a opcao de 'mostrar tudo' | |
| 489 | - //XODO incluir icone olho | |
| 490 | - //XODO quando em janela flutuante, incluir opcao para gerar imagem via canvas | |
| 491 | - //XODO quando em janela flutuante, incluir opcao para abrir em nova janela | |
| 488 | + //XODO quando em janela flutuante, incluir opcao para gerar imagem via canvas https://github.com/cburgmer/rasterizeHTML.js/wiki/Examples | |
| 492 | 489 | /** |
| 493 | 490 | * Section: i3GEO.mapa.legendaHTML |
| 494 | 491 | * |
| ... | ... | @@ -555,7 +552,7 @@ i3GEO.mapa = |
| 555 | 552 | atualiza : function() { |
| 556 | 553 | var idleg = $i("wlegenda_corpo"), temp = |
| 557 | 554 | function(retorno) { |
| 558 | - var legenda = "", ins, re, desativar, tema = "", classe = ""; | |
| 555 | + var legenda = "", ins, re, desativar, tema = "", classe = "",b; | |
| 559 | 556 | re = new RegExp(); |
| 560 | 557 | if (retorno.data !== "erro" && retorno.data !== undefined) { |
| 561 | 558 | // troca os ids pois podem ja existir na arvore de |
| ... | ... | @@ -563,11 +560,15 @@ i3GEO.mapa = |
| 563 | 560 | re = new RegExp("legendack_", "g"); |
| 564 | 561 | retorno.data.legenda = retorno.data.legenda.replace(re, "liblegendack_"); |
| 565 | 562 | legenda = |
| 566 | - "<div class=legendaMostraTodosTemas onclick='i3GEO.mapa.legendaHTML.mostraTodosOsTemas()' style=cursor:pointer;font-size:10px;text-align:left; >Mostra tudo</div><br>" | |
| 567 | - + retorno.data.legenda; | |
| 563 | + "<div class='botoesLegendaFlutuante'>" | |
| 564 | + + "<input type='button' value='" + $trad("mostraTodosLegenda") + "' id='legendaMostraTodos' />" | |
| 565 | + + "<input type='button' value='" + $trad("mostraSoLegenda") + "' id='legendaMostraSo' />" | |
| 566 | + + "</div>" | |
| 567 | + + retorno.data.legenda; | |
| 568 | 568 | } |
| 569 | 569 | if (legenda != "" && idleg) { |
| 570 | 570 | ins = ""; |
| 571 | + //mostra o icone que permite liberar a legenda (usado quando nao esta em uma janela flutuante) | |
| 571 | 572 | if (i3GEO.mapa.legendaHTML.incluiBotaoLibera === true) { |
| 572 | 573 | ins += |
| 573 | 574 | '<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -35px; top: -22px;">' |
| ... | ... | @@ -578,6 +579,34 @@ i3GEO.mapa = |
| 578 | 579 | ins += "<div id='corpoLegi' >" + legenda + "</div>"; |
| 579 | 580 | |
| 580 | 581 | idleg.innerHTML = "<div style='padding:5px;' >" + ins + "</div>"; |
| 582 | + //botao para mostrar todos | |
| 583 | + if($i("legendaMostraTodos")){ | |
| 584 | + b = new YAHOO.widget.Button( | |
| 585 | + "legendaMostraTodos", | |
| 586 | + {onclick:{fn: function(){ | |
| 587 | + i3GEO.mapa.legendaHTML.mostraTodosOsTemas(); | |
| 588 | + }}} | |
| 589 | + ); | |
| 590 | + b.addClass("legendaMostraTodosTemas"); | |
| 591 | + b = new YAHOO.widget.Button( | |
| 592 | + "legendaMostraSo", | |
| 593 | + {onclick:{fn: function(){ | |
| 594 | + var n,i,temp, | |
| 595 | + raiz = $i("corpoLegi").parentNode; | |
| 596 | + temp = raiz.getElementsByClassName("i3GEOLegendaExcluiTema"); | |
| 597 | + n = temp.length; | |
| 598 | + for(i = 0;i < n; i++){ | |
| 599 | + temp[i].style.display = "none"; | |
| 600 | + } | |
| 601 | + temp = raiz.getElementsByTagName("input"); | |
| 602 | + n = temp.length; | |
| 603 | + for(i = 0;i < n; i++){ | |
| 604 | + temp[i].style.display = "none"; | |
| 605 | + } | |
| 606 | + }}} | |
| 607 | + ); | |
| 608 | + b.addClass("legendaMostraSoTemas"); | |
| 609 | + } | |
| 581 | 610 | } |
| 582 | 611 | i3GEO.mapa.legendaHTML.escondeTemasMarcados(); |
| 583 | 612 | // desmarca as classes desligadas | ... | ... |
classesjs/classe_util.js
classesjs/dicionario.js
| ... | ... | @@ -2318,6 +2318,18 @@ g_traducao = { |
| 2318 | 2318 | pt: "Dependência da escala", |
| 2319 | 2319 | en:"", |
| 2320 | 2320 | es:"" |
| 2321 | +}], | |
| 2322 | +"mostraTodosLegenda": [ | |
| 2323 | +{ | |
| 2324 | + pt: "mostra todos", | |
| 2325 | + en:"", | |
| 2326 | + es:"" | |
| 2327 | +}], | |
| 2328 | +"mostraSoLegenda": [ | |
| 2329 | +{ | |
| 2330 | + pt: "só legenda", | |
| 2331 | + en:"", | |
| 2332 | + es:"" | |
| 2321 | 2333 | }] |
| 2322 | 2334 | }; |
| 2323 | 2335 | //YAHOO.log("carregou dicionario", "Classes i3geo"); | ... | ... |
css/geral.css
| ... | ... | @@ -8,6 +8,18 @@ |
| 8 | 8 | margin-top: -5px; |
| 9 | 9 | } |
| 10 | 10 | */ |
| 11 | +.botoesLegendaFlutuante { | |
| 12 | + font-size: 10px; | |
| 13 | +} | |
| 14 | +.legendaMostraTodosTemas .first-child button { | |
| 15 | + background: url(../imagens/oxygen/16x16/layer-visible-on.png) 5% 50% no-repeat; | |
| 16 | + width: 100px; | |
| 17 | +} | |
| 18 | +.legendaMostraSoTemas .first-child button { | |
| 19 | + background: url(../imagens/oxygen/16x16/layer-visible-off.png) 5% 50% no-repeat; | |
| 20 | + width: 100px; | |
| 21 | +} | |
| 22 | + | |
| 11 | 23 | .olPopupCloseBox { |
| 12 | 24 | margin-top: -2px; |
| 13 | 25 | } | ... | ... |
783 Bytes
838 Bytes
init/dicionario.js
temas/_lbairros.map
| ... | ... | @@ -4,15 +4,14 @@ MAP |
| 4 | 4 | LAYER |
| 5 | 5 | CONNECTION "user=postgres password=postgres dbname=i3geosaude host=localhost port=5432 options='-c client_encoding=LATIN1'" |
| 6 | 6 | CONNECTIONTYPE POSTGIS |
| 7 | - DATA "the_geom from (select st_setsrid(the_geom,4326) as the_geom,co_bairro,no_bairro,no_distr,no_municip from i3geo_metaestat.bairros /*FW*//*FW*/) as foo using unique co_bairro using srid=4326" | |
| 7 | + DATA "the_geom from (select st_setsrid(the_geom,4326) as the_geom,co_bairro,no_bairro,no_distr,no_municip from ibge.bairros /*FW*//*FW*/) as foo using unique co_bairro using srid=4326" | |
| 8 | 8 | METADATA |
| 9 | 9 | "TIP" "no_bairro" |
| 10 | 10 | "cache" "" |
| 11 | 11 | "CLASSE" "SIM" |
| 12 | 12 | "ITENSDESC" "Código bairro,Nome,Distrito,Município" |
| 13 | 13 | "EDITAVEL" "SIM" |
| 14 | - "METAESTAT_CODIGO_TIPO_REGIAO" "1" | |
| 15 | - "ESQUEMATABELAEDITAVEL" "i3geo_metaestat" | |
| 14 | + "ESQUEMATABELAEDITAVEL" "ibge" | |
| 16 | 15 | "ITENS" "co_bairro,no_bairro,no_distr,no_municip" |
| 17 | 16 | "TEMA" "Bairro (IBGE)" |
| 18 | 17 | "COLUNAIDUNICO" "gid" | ... | ... |