From 5ba7e71a208e53f6df62e6ac795273221e8be2a1 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Sun, 1 Mar 2015 03:27:48 +0000 Subject: [PATCH] Novas opções na janela flutunte que apresenta a legenda --- admin/admin.db | Bin 278528 -> 0 bytes aplicmap/legenda6.htm | 6 +++--- aplicmap/legenda8.htm | 46 ++++++++++++++++++++++++++++++++++++++++++++++ classesjs/classe_barradebotoes.js | 2 +- classesjs/classe_configura.js | 2 +- classesjs/classe_editorgm.js | 5 +++++ classesjs/classe_editorol.js | 4 +++- classesjs/classe_mapa.js | 43 ++++++++++++++++++++++++++++++++++++------- classesjs/classe_util.js | 2 +- classesjs/dicionario.js | 12 ++++++++++++ css/geral.css | 12 ++++++++++++ imagens/oxygen/16x16/layer-visible-off.png | Bin 0 -> 783 bytes imagens/oxygen/16x16/layer-visible-on.png | Bin 0 -> 838 bytes init/dicionario.js | 2 +- temas/_lbairros.map | 5 ++--- 15 files changed, 123 insertions(+), 18 deletions(-) create mode 100755 aplicmap/legenda8.htm create mode 100644 imagens/oxygen/16x16/layer-visible-off.png create mode 100644 imagens/oxygen/16x16/layer-visible-on.png diff --git a/admin/admin.db b/admin/admin.db index 988d527..35f2586 100644 Binary files a/admin/admin.db and b/admin/admin.db differ diff --git a/aplicmap/legenda6.htm b/aplicmap/legenda6.htm index eca1c24..7653fd6 100755 --- a/aplicmap/legenda6.htm +++ b/aplicmap/legenda6.htm @@ -4,8 +4,8 @@ [if name=TEMA oper=neq value=NAO] + +   [metadata name=TEMA]
[if name=legendawms oper=isset ] @@ -18,7 +18,7 @@ [/leg_layer_html] [leg_class_html] -
- -  [metadata name=TEMA]
+
[if name=CLASSE oper=neq value=NAO]
diff --git a/aplicmap/legenda8.htm b/aplicmap/legenda8.htm new file mode 100755 index 0000000..382b329 --- /dev/null +++ b/aplicmap/legenda8.htm @@ -0,0 +1,46 @@ + \ No newline at end of file diff --git a/classesjs/classe_barradebotoes.js b/classesjs/classe_barradebotoes.js index f35dcda..55782c0 100644 --- a/classesjs/classe_barradebotoes.js +++ b/classesjs/classe_barradebotoes.js @@ -1748,7 +1748,7 @@ i3GEO.barraDeBotoes = $i("i3GEOjanelaEditor_corpo").style.backgroundColor = "white"; i3GEO.editorGM.inicia("i3GEOjanelaEditor_corpo"); fecha = function() { - var temp = window.confirm("Remove a edicao?"); + var temp = window.confirm($trad("x94")); if (i3GEO.eventos) { i3GEO.eventos.cliquePerm.ativa(); } diff --git a/classesjs/classe_configura.js b/classesjs/classe_configura.js index 50af26f..00822b2 100644 --- a/classesjs/classe_configura.js +++ b/classesjs/classe_configura.js @@ -894,7 +894,7 @@ i3GEO.configura = * * "" */ - templateLegenda : "legenda6.htm", + templateLegenda : "legenda8.htm", /** * Propriedade: mashuppar * diff --git a/classesjs/classe_editorgm.js b/classesjs/classe_editorgm.js index 6123979..9d0efdc 100644 --- a/classesjs/classe_editorgm.js +++ b/classesjs/classe_editorgm.js @@ -1,4 +1,8 @@ //TODO documentar +//XODO permitir edicao de temas editaveis, nao apenas de regioes cadastradas +//XODO permitir a edicao de dados fora do esquema metaestat + + /* Editor vetorial de limites para a interface google maps @@ -31,6 +35,7 @@ GNU junto com este programa; se nao, escreva para a Free Software Foundation, Inc., no endereco 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. */ +// if(typeof(i3GEO) === 'undefined'){ var i3GEO = {}; diff --git a/classesjs/classe_editorol.js b/classesjs/classe_editorol.js index 4ab9806..218133f 100644 --- a/classesjs/classe_editorol.js +++ b/classesjs/classe_editorol.js @@ -1,4 +1,6 @@ //TODO documentar +//XODO permitir a edicao de atributos + /* Title: Editor vetorial para OpenLayers @@ -1414,7 +1416,7 @@ i3GEO.editorOL = { button = new OpenLayers.Control.Button({ displayClass: "editorOLfecha", trigger: function(){ - var temp = window.confirm("Remove a edicao?"); + var temp = window.confirm($trad("x94")); if(i3GEO.eventos){ i3GEO.eventos.cliquePerm.ativa(); } diff --git a/classesjs/classe_mapa.js b/classesjs/classe_mapa.js index 216237f..bb4b754 100644 --- a/classesjs/classe_mapa.js +++ b/classesjs/classe_mapa.js @@ -485,10 +485,7 @@ i3GEO.mapa = } } }, - //XODO quando aberta em janela flutuante, remover opcao de ligar/desligar camada e esconder a opcao de 'mostrar tudo' - //XODO incluir icone olho - //XODO quando em janela flutuante, incluir opcao para gerar imagem via canvas - //XODO quando em janela flutuante, incluir opcao para abrir em nova janela + //XODO quando em janela flutuante, incluir opcao para gerar imagem via canvas https://github.com/cburgmer/rasterizeHTML.js/wiki/Examples /** * Section: i3GEO.mapa.legendaHTML * @@ -555,7 +552,7 @@ i3GEO.mapa = atualiza : function() { var idleg = $i("wlegenda_corpo"), temp = function(retorno) { - var legenda = "", ins, re, desativar, tema = "", classe = ""; + var legenda = "", ins, re, desativar, tema = "", classe = "",b; re = new RegExp(); if (retorno.data !== "erro" && retorno.data !== undefined) { // troca os ids pois podem ja existir na arvore de @@ -563,11 +560,15 @@ i3GEO.mapa = re = new RegExp("legendack_", "g"); retorno.data.legenda = retorno.data.legenda.replace(re, "liblegendack_"); legenda = - "
Mostra tudo

" - + retorno.data.legenda; + "
" + + "" + + "" + + "
" + + retorno.data.legenda; } if (legenda != "" && idleg) { ins = ""; + //mostra o icone que permite liberar a legenda (usado quando nao esta em uma janela flutuante) if (i3GEO.mapa.legendaHTML.incluiBotaoLibera === true) { ins += '

' @@ -578,6 +579,34 @@ i3GEO.mapa = ins += "

" + legenda + "
"; idleg.innerHTML = "
" + ins + "
"; + //botao para mostrar todos + if($i("legendaMostraTodos")){ + b = new YAHOO.widget.Button( + "legendaMostraTodos", + {onclick:{fn: function(){ + i3GEO.mapa.legendaHTML.mostraTodosOsTemas(); + }}} + ); + b.addClass("legendaMostraTodosTemas"); + b = new YAHOO.widget.Button( + "legendaMostraSo", + {onclick:{fn: function(){ + var n,i,temp, + raiz = $i("corpoLegi").parentNode; + temp = raiz.getElementsByClassName("i3GEOLegendaExcluiTema"); + n = temp.length; + for(i = 0;i < n; i++){ + temp[i].style.display = "none"; + } + temp = raiz.getElementsByTagName("input"); + n = temp.length; + for(i = 0;i < n; i++){ + temp[i].style.display = "none"; + } + }}} + ); + b.addClass("legendaMostraSoTemas"); + } } i3GEO.mapa.legendaHTML.escondeTemasMarcados(); // desmarca as classes desligadas diff --git a/classesjs/classe_util.js b/classesjs/classe_util.js index 2f2e886..78e6f52 100644 --- a/classesjs/classe_util.js +++ b/classesjs/classe_util.js @@ -2529,7 +2529,7 @@ i3GEO.util = */ defineValor : function(id, prop, valor) { try { - eval("$i('" + id + "')." + prop + "='" + valor + "';"); + $i(id)[prop] = valor; } catch (e) { } }, diff --git a/classesjs/dicionario.js b/classesjs/dicionario.js index e64ccd0..6d2118a 100644 --- a/classesjs/dicionario.js +++ b/classesjs/dicionario.js @@ -2318,6 +2318,18 @@ g_traducao = { pt: "Dependência da escala", en:"", es:"" +}], +"mostraTodosLegenda": [ +{ + pt: "mostra todos", + en:"", + es:"" +}], +"mostraSoLegenda": [ +{ + pt: "só legenda", + en:"", + es:"" }] }; //YAHOO.log("carregou dicionario", "Classes i3geo"); diff --git a/css/geral.css b/css/geral.css index 018cba8..563e1d6 100644 --- a/css/geral.css +++ b/css/geral.css @@ -8,6 +8,18 @@ margin-top: -5px; } */ +.botoesLegendaFlutuante { + font-size: 10px; +} +.legendaMostraTodosTemas .first-child button { + background: url(../imagens/oxygen/16x16/layer-visible-on.png) 5% 50% no-repeat; + width: 100px; +} +.legendaMostraSoTemas .first-child button { + background: url(../imagens/oxygen/16x16/layer-visible-off.png) 5% 50% no-repeat; + width: 100px; +} + .olPopupCloseBox { margin-top: -2px; } diff --git a/imagens/oxygen/16x16/layer-visible-off.png b/imagens/oxygen/16x16/layer-visible-off.png new file mode 100644 index 0000000..24277f6 Binary files /dev/null and b/imagens/oxygen/16x16/layer-visible-off.png differ diff --git a/imagens/oxygen/16x16/layer-visible-on.png b/imagens/oxygen/16x16/layer-visible-on.png new file mode 100644 index 0000000..ea53bd1 Binary files /dev/null and b/imagens/oxygen/16x16/layer-visible-on.png differ diff --git a/init/dicionario.js b/init/dicionario.js index 5d94d8d..e588abc 100644 --- a/init/dicionario.js +++ b/init/dicionario.js @@ -170,7 +170,7 @@ g_traducao_init = ], 25 : [ { - pt : "SAIKU - análise de dados estatísticos", + pt : "SAIKU - análise tabular", en : "", es : "" } diff --git a/temas/_lbairros.map b/temas/_lbairros.map index 5351c2b..1005bce 100644 --- a/temas/_lbairros.map +++ b/temas/_lbairros.map @@ -4,15 +4,14 @@ MAP LAYER CONNECTION "user=postgres password=postgres dbname=i3geosaude host=localhost port=5432 options='-c client_encoding=LATIN1'" CONNECTIONTYPE POSTGIS - 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" + 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" METADATA "TIP" "no_bairro" "cache" "" "CLASSE" "SIM" "ITENSDESC" "Código bairro,Nome,Distrito,Município" "EDITAVEL" "SIM" - "METAESTAT_CODIGO_TIPO_REGIAO" "1" - "ESQUEMATABELAEDITAVEL" "i3geo_metaestat" + "ESQUEMATABELAEDITAVEL" "ibge" "ITENS" "co_bairro,no_bairro,no_distr,no_municip" "TEMA" "Bairro (IBGE)" "COLUNAIDUNICO" "gid" -- libgit2 0.21.2