Commit 0b78d7d9e139e93a7a55550ab2bb6858160b617f
1 parent
8a66e228
Exists in
master
and in
7 other branches
--no commit message
Showing
7 changed files
with
76 additions
and
26 deletions
Show diff stats
classesjs/classe_barradebotoes.js
| ... | ... | @@ -505,6 +505,7 @@ i3GEO.barraDeBotoes = { |
| 505 | 505 | {eval(l[b].constroiconteudo);} |
| 506 | 506 | } |
| 507 | 507 | YAHOO.util.Event.addListener($i(l[b].iddiv), "click", YAHOO.util.Event.preventDefault); |
| 508 | + YAHOO.util.Event.addListener($i(l[b].iddiv), "click", YAHOO.util.Event.stopPropagation); | |
| 508 | 509 | YAHOO.util.Event.addFocusListener($i(l[b].iddiv), YAHOO.util.Event.preventDefault); |
| 509 | 510 | //$i("i3geo_barra2").onclick = function(){alert("oi");} |
| 510 | 511 | } |
| ... | ... | @@ -632,7 +633,7 @@ i3GEO.barraDeBotoes = { |
| 632 | 633 | if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){ |
| 633 | 634 | YAHOO.util.Dom.setStyle(novoel,"opacity",1); |
| 634 | 635 | } |
| 635 | - if(i3GEO.guias.TIPO === "tablet"){ | |
| 636 | + if(i3GEO.Interface.TABLET === true){ | |
| 636 | 637 | //i3GEO.barraDeBotoes.BARRAS[0].cfg.setProperty("height", ""); |
| 637 | 638 | //$i(i3GEO.barraDeBotoes.BARRAS[0].id+"_").style.top = "0px"; |
| 638 | 639 | } |
| ... | ... | @@ -641,7 +642,7 @@ i3GEO.barraDeBotoes = { |
| 641 | 642 | if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){ |
| 642 | 643 | YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE / 100); |
| 643 | 644 | } |
| 644 | - if(i3GEO.guias.TIPO === "tablet"){ | |
| 645 | + if(i3GEO.Interface.TABLET === true){ | |
| 645 | 646 | //i3GEO.barraDeBotoes.BARRAS[0].cfg.setProperty("height", "10px"); |
| 646 | 647 | //$i(i3GEO.barraDeBotoes.BARRAS[0].id+"_").style.top = "-200px"; |
| 647 | 648 | } |
| ... | ... | @@ -788,7 +789,7 @@ i3GEO.barraDeBotoes = { |
| 788 | 789 | } |
| 789 | 790 | this.BARRAS.push(YAHOO.janelaBotoes.xp.panel); |
| 790 | 791 | YAHOO.janelaBotoes.xp.panel.show(); |
| 791 | - if(i3GEO.guias.TIPO === "tablet"){ | |
| 792 | + if(i3GEO.Interface.TABLET === true){ | |
| 792 | 793 | YAHOO.janelaBotoes.xp.panel.moveTo((i3GEO.parametros.w / 2) - 150,""); |
| 793 | 794 | } |
| 794 | 795 | // | ... | ... |
classesjs/classe_guias.js
| ... | ... | @@ -375,6 +375,7 @@ i3GEO.guias = { |
| 375 | 375 | else |
| 376 | 376 | {guiaconteudo.onclick = guia.click;} |
| 377 | 377 | YAHOO.util.Event.addListener($i(id), "click", YAHOO.util.Event.preventDefault); |
| 378 | + YAHOO.util.Event.addListener($i(id), "click", YAHOO.util.Event.stopPropagation); | |
| 378 | 379 | YAHOO.util.Event.addFocusListener($i(id), YAHOO.util.Event.preventDefault); |
| 379 | 380 | guiaconteudo.onmouseover = onf; |
| 380 | 381 | guiaconteudo.onmouseout = outf; |
| ... | ... | @@ -399,6 +400,12 @@ i3GEO.guias = { |
| 399 | 400 | if(i3GEO.guias.TIPO !== "tablet"){ |
| 400 | 401 | i3GEO.guias.mostra(i3GEO.guias.ATUAL); |
| 401 | 402 | i3GEO.guias.ativa(i3GEO.guias.ATUAL); |
| 403 | + temp = $i("i3GEOguiaEsconde"); | |
| 404 | + YAHOO.util.Event.addListener(temp, "click", YAHOO.util.Event.preventDefault); | |
| 405 | + YAHOO.util.Event.addListener(temp, "click", YAHOO.util.Event.stopPropagation); | |
| 406 | + YAHOO.util.Event.addFocusListener(temp, YAHOO.util.Event.preventDefault); | |
| 407 | + temp.onmouseover = onf; | |
| 408 | + temp.onmouseout = outf; | |
| 402 | 409 | } |
| 403 | 410 | else |
| 404 | 411 | {i3GEO.guias.escondeGuias();} | ... | ... |
classesjs/classe_i3geo.js
| ... | ... | @@ -350,6 +350,8 @@ i3GEO = { |
| 350 | 350 | } |
| 351 | 351 | if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()") < 0) |
| 352 | 352 | {i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()");} |
| 353 | + if(i3GEO.mapa.AUTORESIZE === true) | |
| 354 | + {i3GEO.mapa.ativaAutoResize();} | |
| 353 | 355 | eval(i3GEO.finaliza); |
| 354 | 356 | }, |
| 355 | 357 | /* |
| ... | ... | @@ -614,8 +616,19 @@ i3GEO = { |
| 614 | 616 | } |
| 615 | 617 | i3GEO.parametros.w = w; |
| 616 | 618 | i3GEO.parametros.h = h; |
| 617 | - //i3GEO.Interface.atualizaMapa(); | |
| 618 | - i3GEO.navega.zoomExt("","","",i3GEO.parametros.mapexten); | |
| 619 | + i3GEO.php.mudatamanho(i3GEO.atualiza,h,w); | |
| 620 | + switch(i3GEO.Interface.ATUAL) | |
| 621 | + { | |
| 622 | + case "googlemaps": | |
| 623 | + i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten); | |
| 624 | + break; | |
| 625 | + case "googleearth": | |
| 626 | + i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten); | |
| 627 | + break; | |
| 628 | + case "openlayers": | |
| 629 | + i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten); | |
| 630 | + break; | |
| 631 | + } | |
| 619 | 632 | return [w,h]; |
| 620 | 633 | }, |
| 621 | 634 | /* | ... | ... |
classesjs/classe_interface.js
| ... | ... | @@ -47,6 +47,18 @@ O HTML deve conter as definições da interface criada e deve estar armazenado em |
| 47 | 47 | */ |
| 48 | 48 | i3GEO.Interface = { |
| 49 | 49 | /* |
| 50 | + Propriedade: TABLET | |
| 51 | + | |
| 52 | + A interface a ser utilizada deve ser adaptada para uso em tablets | |
| 53 | + | |
| 54 | + Type: | |
| 55 | + {boolean} | |
| 56 | + | |
| 57 | + Default: | |
| 58 | + {false} | |
| 59 | + */ | |
| 60 | + TABLET: false, | |
| 61 | + /* | |
| 50 | 62 | Propriedade: OUTPUTFORMAT |
| 51 | 63 | |
| 52 | 64 | Formato de geração da imagem. | ... | ... |
classesjs/classe_mapa.js
| ... | ... | @@ -41,6 +41,18 @@ como cor de fundo, tipo de imagem, legenda etc. |
| 41 | 41 | */ |
| 42 | 42 | i3GEO.mapa = { |
| 43 | 43 | /* |
| 44 | + Propriedade: AUTORESIZE | |
| 45 | + | |
| 46 | + Indica se o tamanho do mapa será ajustado toda vez que o navegador for redimensionado | |
| 47 | + | |
| 48 | + Type: | |
| 49 | + {boolean} | |
| 50 | + | |
| 51 | + Default: | |
| 52 | + {false} | |
| 53 | + */ | |
| 54 | + AUTORESIZE: false, | |
| 55 | + /* | |
| 44 | 56 | Variavel: GEOXML |
| 45 | 57 | Armazena o nome dos objetos geoXml adicionados ao mapa pela API do google maps |
| 46 | 58 | |
| ... | ... | @@ -49,6 +61,22 @@ i3GEO.mapa = { |
| 49 | 61 | */ |
| 50 | 62 | GEOXML: [], |
| 51 | 63 | /* |
| 64 | + Function: ativaAutoResize | |
| 65 | + | |
| 66 | + Ativa o redimensionamento automático do mapa sempre que o navegador for redimensionado | |
| 67 | + | |
| 68 | + É definido como um evento do elemento window | |
| 69 | + */ | |
| 70 | + ativaAutoResize: function(){ | |
| 71 | + window.onresize = function(){ | |
| 72 | + var temp = setTimeout(function(){ | |
| 73 | + i3GEO.reCalculaTamanho(); | |
| 74 | + i3GEO.barraDeBotoes.recria("i3geo_barra2"); | |
| 75 | + i3GEO.guias.escondeGuias(); | |
| 76 | + },2000); | |
| 77 | + }; | |
| 78 | + }, | |
| 79 | + /* | |
| 52 | 80 | Function: ajustaPosicao |
| 53 | 81 | |
| 54 | 82 | Ajusta o posicionamento do corpo do mapa | ... | ... |
classesjs/classe_php.js
interface/openlayers_t.htm
| ... | ... | @@ -180,7 +180,6 @@ i3GEO.cria(); |
| 180 | 180 | /* |
| 181 | 181 | Inicializa o mapa |
| 182 | 182 | */ |
| 183 | -i3GEO.guias.TIPO = "tablet"; | |
| 184 | 183 | i3GEO.barraDeBotoes.AUTOALTURA = true; |
| 185 | 184 | i3GEO.barraDeBotoes.ATIVAMENUCONTEXTO = false; |
| 186 | 185 | i3GEO.barraDeBotoes.PERMITEFECHAR = false; |
| ... | ... | @@ -190,18 +189,22 @@ i3GEO.barraDeBotoes.COMPORTAMENTO = "laranja"; |
| 190 | 189 | i3GEO.barraDeBotoes.ORIENTACAO = "horizontal"; |
| 191 | 190 | i3GEO.barraDeBotoes.AJUDA = false; |
| 192 | 191 | |
| 192 | +i3GEO.Interface.TABLET = true; | |
| 193 | 193 | i3GEO.Interface.BARRABOTOESLEFT = 5; |
| 194 | 194 | i3GEO.Interface.BARRABOTOESTOP = 0; |
| 195 | 195 | i3GEO.Interface.BARRADEZOOMTOP = 2; |
| 196 | 196 | i3GEO.Interface.BARRADEZOOMLEFT = 5; |
| 197 | - | |
| 198 | -i3GEO.idioma.IDSELETOR = "seletorIdiomas"; | |
| 199 | 197 | i3GEO.Interface.ATIVAMENUCONTEXTO = false; |
| 198 | + | |
| 200 | 199 | i3GEO.arvoreDeTemas.TIPOBOTAO = "radio"; |
| 201 | 200 | i3GEO.arvoreDeTemas.ATIVATEMAIMEDIATO = true; |
| 202 | 201 | i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios = true; |
| 203 | 202 | i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS = true; |
| 203 | + | |
| 204 | +i3GEO.guias.TIPO = "tablet"; | |
| 205 | +i3GEO.idioma.IDSELETOR = "seletorIdiomas"; | |
| 204 | 206 | i3GEO.configura.mapaRefDisplay = "none"; |
| 207 | +i3GEO.mapa.AUTORESIZE = true; | |
| 205 | 208 | // |
| 206 | 209 | //esta é uma variável interna do OpenLayers que define o endereço do diretório onde estão as imagens usadas nos ícones |
| 207 | 210 | // |
| ... | ... | @@ -244,24 +247,9 @@ OpenLayers.ImgPath = "../pacotes/openlayers/img/"; |
| 244 | 247 | //inicia o mapa |
| 245 | 248 | // |
| 246 | 249 | i3GEO.inicia(); |
| 247 | -(function(){ | |
| 248 | - i3GEOmapaResize = true; | |
| 249 | - window.onresize = function(){ | |
| 250 | - timeResize = setTimeout(function(){ | |
| 251 | - if(i3GEOmapaResize === true){ | |
| 252 | - try{ | |
| 253 | - i3GEO.reCalculaTamanho(); | |
| 254 | - i3GEO.barraDeBotoes.recria("i3geo_barra2"); | |
| 255 | - clearTimeOut(timeResize); | |
| 256 | - } | |
| 257 | - catch(e){i3GEOmapaResize = false;} | |
| 258 | - } | |
| 259 | - i3GEOmapaResize = false; | |
| 260 | - },2000); | |
| 261 | - }; | |
| 262 | -})(); | |
| 263 | - YAHOO.util.Event.addListener(document.body, "click", YAHOO.util.Event.preventDefault); | |
| 264 | - YAHOO.util.Event.addFocusListener(document.body, YAHOO.util.Event.stopEvent); | |
| 250 | + | |
| 251 | +YAHOO.util.Event.addListener(document.body, "click", YAHOO.util.Event.preventDefault); | |
| 252 | +YAHOO.util.Event.addFocusListener(document.body, YAHOO.util.Event.preventDefault); | |
| 265 | 253 | </script> |
| 266 | 254 | </body> |
| 267 | 255 | </html> |
| 268 | 256 | \ No newline at end of file | ... | ... |