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,8 +4,8 @@ | ||
| 4 | [if name=TEMA oper=neq value=NAO] | 4 | [if name=TEMA oper=neq value=NAO] |
| 5 | <table [if name=CLASSE oper=eq value=NAO] style=display:none; [/if] > | 5 | <table [if name=CLASSE oper=eq value=NAO] style=display:none; [/if] > |
| 6 | <tr><td style=text-align:left > | 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 | </tr> | 9 | </tr> |
| 10 | [if name=legendawms oper=isset ] | 10 | [if name=legendawms oper=isset ] |
| 11 | <tr><td style=text-align:left ><img src='[metadata name=legendawms]' /></td></tr> | 11 | <tr><td style=text-align:left ><img src='[metadata name=legendawms]' /></td></tr> |
| @@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
| 18 | [/leg_layer_html] | 18 | [/leg_layer_html] |
| 19 | 19 | ||
| 20 | [leg_class_html] | 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 | [if name=CLASSE oper=neq value=NAO] | 22 | [if name=CLASSE oper=neq value=NAO] |
| 23 | <tr> | 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)' /> | 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 @@ | @@ -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 | \ No newline at end of file | 47 | \ No newline at end of file |
classesjs/classe_barradebotoes.js
| @@ -1748,7 +1748,7 @@ i3GEO.barraDeBotoes = | @@ -1748,7 +1748,7 @@ i3GEO.barraDeBotoes = | ||
| 1748 | $i("i3GEOjanelaEditor_corpo").style.backgroundColor = "white"; | 1748 | $i("i3GEOjanelaEditor_corpo").style.backgroundColor = "white"; |
| 1749 | i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo"); | 1749 | i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo"); |
| 1750 | fecha = function() { | 1750 | fecha = function() { |
| 1751 | - var temp = window.confirm("Remove a edicao?"); | 1751 | + var temp = window.confirm($trad("x94")); |
| 1752 | if (i3GEO.eventos) { | 1752 | if (i3GEO.eventos) { |
| 1753 | i3GEO.eventos.cliquePerm.ativa(); | 1753 | i3GEO.eventos.cliquePerm.ativa(); |
| 1754 | } | 1754 | } |
classesjs/classe_configura.js
classesjs/classe_editorgm.js
| 1 | //TODO documentar | 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 | Editor vetorial de limites para a interface google maps | 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,6 +35,7 @@ GNU junto com este programa; se nao, escreva para a | ||
| 31 | Free Software Foundation, Inc., no endereco | 35 | Free Software Foundation, Inc., no endereco |
| 32 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | 36 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
| 33 | */ | 37 | */ |
| 38 | +// | ||
| 34 | 39 | ||
| 35 | if(typeof(i3GEO) === 'undefined'){ | 40 | if(typeof(i3GEO) === 'undefined'){ |
| 36 | var i3GEO = {}; | 41 | var i3GEO = {}; |
classesjs/classe_editorol.js
| 1 | //TODO documentar | 1 | //TODO documentar |
| 2 | +//XODO permitir a edicao de atributos | ||
| 3 | + | ||
| 2 | /* | 4 | /* |
| 3 | Title: Editor vetorial para OpenLayers | 5 | Title: Editor vetorial para OpenLayers |
| 4 | 6 | ||
| @@ -1414,7 +1416,7 @@ i3GEO.editorOL = { | @@ -1414,7 +1416,7 @@ i3GEO.editorOL = { | ||
| 1414 | button = new OpenLayers.Control.Button({ | 1416 | button = new OpenLayers.Control.Button({ |
| 1415 | displayClass: "editorOLfecha", | 1417 | displayClass: "editorOLfecha", |
| 1416 | trigger: function(){ | 1418 | trigger: function(){ |
| 1417 | - var temp = window.confirm("Remove a edicao?"); | 1419 | + var temp = window.confirm($trad("x94")); |
| 1418 | if(i3GEO.eventos){ | 1420 | if(i3GEO.eventos){ |
| 1419 | i3GEO.eventos.cliquePerm.ativa(); | 1421 | i3GEO.eventos.cliquePerm.ativa(); |
| 1420 | } | 1422 | } |
classesjs/classe_mapa.js
| @@ -485,10 +485,7 @@ i3GEO.mapa = | @@ -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 | * Section: i3GEO.mapa.legendaHTML | 490 | * Section: i3GEO.mapa.legendaHTML |
| 494 | * | 491 | * |
| @@ -555,7 +552,7 @@ i3GEO.mapa = | @@ -555,7 +552,7 @@ i3GEO.mapa = | ||
| 555 | atualiza : function() { | 552 | atualiza : function() { |
| 556 | var idleg = $i("wlegenda_corpo"), temp = | 553 | var idleg = $i("wlegenda_corpo"), temp = |
| 557 | function(retorno) { | 554 | function(retorno) { |
| 558 | - var legenda = "", ins, re, desativar, tema = "", classe = ""; | 555 | + var legenda = "", ins, re, desativar, tema = "", classe = "",b; |
| 559 | re = new RegExp(); | 556 | re = new RegExp(); |
| 560 | if (retorno.data !== "erro" && retorno.data !== undefined) { | 557 | if (retorno.data !== "erro" && retorno.data !== undefined) { |
| 561 | // troca os ids pois podem ja existir na arvore de | 558 | // troca os ids pois podem ja existir na arvore de |
| @@ -563,11 +560,15 @@ i3GEO.mapa = | @@ -563,11 +560,15 @@ i3GEO.mapa = | ||
| 563 | re = new RegExp("legendack_", "g"); | 560 | re = new RegExp("legendack_", "g"); |
| 564 | retorno.data.legenda = retorno.data.legenda.replace(re, "liblegendack_"); | 561 | retorno.data.legenda = retorno.data.legenda.replace(re, "liblegendack_"); |
| 565 | legenda = | 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 | if (legenda != "" && idleg) { | 569 | if (legenda != "" && idleg) { |
| 570 | ins = ""; | 570 | ins = ""; |
| 571 | + //mostra o icone que permite liberar a legenda (usado quando nao esta em uma janela flutuante) | ||
| 571 | if (i3GEO.mapa.legendaHTML.incluiBotaoLibera === true) { | 572 | if (i3GEO.mapa.legendaHTML.incluiBotaoLibera === true) { |
| 572 | ins += | 573 | ins += |
| 573 | '<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;">' | 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,6 +579,34 @@ i3GEO.mapa = | ||
| 578 | ins += "<div id='corpoLegi' >" + legenda + "</div>"; | 579 | ins += "<div id='corpoLegi' >" + legenda + "</div>"; |
| 579 | 580 | ||
| 580 | idleg.innerHTML = "<div style='padding:5px;' >" + ins + "</div>"; | 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 | i3GEO.mapa.legendaHTML.escondeTemasMarcados(); | 611 | i3GEO.mapa.legendaHTML.escondeTemasMarcados(); |
| 583 | // desmarca as classes desligadas | 612 | // desmarca as classes desligadas |
classesjs/classe_util.js
| @@ -2529,7 +2529,7 @@ i3GEO.util = | @@ -2529,7 +2529,7 @@ i3GEO.util = | ||
| 2529 | */ | 2529 | */ |
| 2530 | defineValor : function(id, prop, valor) { | 2530 | defineValor : function(id, prop, valor) { |
| 2531 | try { | 2531 | try { |
| 2532 | - eval("$i('" + id + "')." + prop + "='" + valor + "';"); | 2532 | + $i(id)[prop] = valor; |
| 2533 | } catch (e) { | 2533 | } catch (e) { |
| 2534 | } | 2534 | } |
| 2535 | }, | 2535 | }, |
classesjs/dicionario.js
| @@ -2318,6 +2318,18 @@ g_traducao = { | @@ -2318,6 +2318,18 @@ g_traducao = { | ||
| 2318 | pt: "Dependência da escala", | 2318 | pt: "Dependência da escala", |
| 2319 | en:"", | 2319 | en:"", |
| 2320 | es:"" | 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 | //YAHOO.log("carregou dicionario", "Classes i3geo"); | 2335 | //YAHOO.log("carregou dicionario", "Classes i3geo"); |
css/geral.css
| @@ -8,6 +8,18 @@ | @@ -8,6 +8,18 @@ | ||
| 8 | margin-top: -5px; | 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 | .olPopupCloseBox { | 23 | .olPopupCloseBox { |
| 12 | margin-top: -2px; | 24 | margin-top: -2px; |
| 13 | } | 25 | } |
783 Bytes
838 Bytes
init/dicionario.js
temas/_lbairros.map
| @@ -4,15 +4,14 @@ MAP | @@ -4,15 +4,14 @@ MAP | ||
| 4 | LAYER | 4 | LAYER |
| 5 | CONNECTION "user=postgres password=postgres dbname=i3geosaude host=localhost port=5432 options='-c client_encoding=LATIN1'" | 5 | CONNECTION "user=postgres password=postgres dbname=i3geosaude host=localhost port=5432 options='-c client_encoding=LATIN1'" |
| 6 | CONNECTIONTYPE POSTGIS | 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 | METADATA | 8 | METADATA |
| 9 | "TIP" "no_bairro" | 9 | "TIP" "no_bairro" |
| 10 | "cache" "" | 10 | "cache" "" |
| 11 | "CLASSE" "SIM" | 11 | "CLASSE" "SIM" |
| 12 | "ITENSDESC" "Código bairro,Nome,Distrito,Município" | 12 | "ITENSDESC" "Código bairro,Nome,Distrito,Município" |
| 13 | "EDITAVEL" "SIM" | 13 | "EDITAVEL" "SIM" |
| 14 | - "METAESTAT_CODIGO_TIPO_REGIAO" "1" | ||
| 15 | - "ESQUEMATABELAEDITAVEL" "i3geo_metaestat" | 14 | + "ESQUEMATABELAEDITAVEL" "ibge" |
| 16 | "ITENS" "co_bairro,no_bairro,no_distr,no_municip" | 15 | "ITENS" "co_bairro,no_bairro,no_distr,no_municip" |
| 17 | "TEMA" "Bairro (IBGE)" | 16 | "TEMA" "Bairro (IBGE)" |
| 18 | "COLUNAIDUNICO" "gid" | 17 | "COLUNAIDUNICO" "gid" |