From fe00c6f606304bb3dbc498b0757da4b3a56ce93d Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Sun, 13 Apr 2008 21:27:54 +0000 Subject: [PATCH] reformulação do layout da página e inclusão do prefixo i3geo_gl nos nomas das funções --- geradordelinks.htm | 171 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------ 1 file changed, 99 insertions(+), 72 deletions(-) diff --git a/geradordelinks.htm b/geradordelinks.htm index a82426b..d923bbc 100644 --- a/geradordelinks.htm +++ b/geradordelinks.htm @@ -13,29 +13,32 @@ P + + -
@@ -82,10 +91,22 @@ dos pontos em décimos de grau (exemplo: -54 -12 -54 1 -51 -15) (opcional):
Coordenadas geográficas em décimos de grau:

- Longitude mínima:

- Longitude máxima:

- Latitude mínima:

- Latitude máxima:


+ Longitude mínima:
+
+ +

+ Longitude máxima:
+
+ +

+ Latitude mínima:
+
+ +

+ Latitude máxima:
+
+ +

@@ -119,35 +140,41 @@ Free Software Foundation, Inc., no endereço File: i3geo/geradordelinks.htm -Include: - -classesjs/cpaint/cpaint2.inc.compressed.js -pacotes/openlayers/OpenLayers.js */ navm = false navn = false var app = navigator.appName.substring(0,1); if (app=='N') navn=true; else navm=true; + +$inputText("paiPontos","","pontos","","","") +$inputText("paiNometemapontos","","nometemapontos","","","") +$inputText("paiPerfil","","perfil","","","") +$inputText("paiXmin","","xmin","","","") +$inputText("paiXmax","","xmax","","","") +$inputText("paiYmin","","ymin","","","") +$inputText("paiYmax","","ymax","","","") + /* Variable: g_locaplic Localização da instalação do i3geo. */ g_locaplic = "http://"+window.location.host+"/i3geo"; -seltema("estadosl") -crialink() -pegagrupos() -initOL() +i3geo_gl_seltema("estadosl") +i3geo_gl_crialink() +i3geo_gl_pegagrupos() +i3geo_gl_init() + /* -Function: crialink +Function: i3geo_gl_crialink Cria o link e mostra na tela. */ -function crialink() +function i3geo_gl_crialink() { var ins = g_locaplic+"/ms_criamapa.php?"; - var iguias = document.getElementById("temasa").getElementsByTagName("input"); + var iguias = $i("temasa").getElementsByTagName("input"); var tsl = new Array(); //temas ligados var tsd = new Array(); //temas for (i=0;i 0) {ins += "&layers="+tsl.join(" ")} - if(document.getElementById("pontos").value != "") + if($i("pontos").value != "") { - ins += "&pontos="+document.getElementById("pontos").value - ins += "&nometemapontos="+document.getElementById("nometemapontos").value + ins += "&pontos="+$i("pontos").value + ins += "&nometemapontos="+$i("nometemapontos").value } - if(document.getElementById("perfil").value != "") + if($i("perfil").value != "") { - ins += "&perfil="+document.getElementById("perfil").value + ins += "&perfil="+$i("perfil").value } - if(document.getElementById("interface").value != "") + if($i("interface").value != "") { - ins += "&interface="+document.getElementById("interface").value + ins += "&interface="+$i("interface").value } - if(document.getElementById("xmin").value != "") + if($i("xmin").value != "") { - ins += "&mapext="+document.getElementById("xmin").value+" " - ins += document.getElementById("ymin").value+" " - ins += document.getElementById("xmax").value+" " - ins += document.getElementById("ymax").value + ins += "&mapext="+$i("xmin").value+" " + ins += $i("ymin").value+" " + ins += $i("xmax").value+" " + ins += $i("ymax").value } - document.getElementById("link").href = ins - document.getElementById("link").innerHTML = ins + $i("link").href = ins + $i("link").innerHTML = ins } /* -Function: pegagrupos +Function: i3geo_gl_pegagrupos Pega a lista de grupos existentes no menu de temas do i3geo. */ -function pegagrupos() +function i3geo_gl_pegagrupos() { var p = "classesphp/mapa_controle.php?funcao=pegalistadegrupos&map_file=''"; var cp = new cpaint(); @@ -207,13 +234,13 @@ Monta um combo com a lista de grupos. function combogrupos(retorno) { obGrupos = retorno.data - var ins = "" for (ig=0;ig"+obGrupos.grupos[ig].nome+"" } - document.getElementById("grupos").innerHTML = ins+"" + $i("grupos").innerHTML = ins+"" combosubgrupos(-1) } /* @@ -229,7 +256,7 @@ i - id que identifica o grupo escolhido. */ function combosubgrupos(i) { - var ins = "" if (obGrupos.grupos[i]) { for (ig=0;ig"+obGrupos.grupos[i].subgrupos[ig].nome+"" } } - document.getElementById("subgrupos").innerHTML = ins+"" + $i("subgrupos").innerHTML = ins+"" combotemasgrupo(i) } /* @@ -253,7 +280,7 @@ i - id que identifica o grupo escolhido. */ function combotemasgrupo(i) { - var ins = "" if (obGrupos.grupos[i]) { for (ig=0;ig"+obGrupos.grupos[i].temasgrupo[ig].nome+"" } } - document.getElementById("temas").innerHTML = ins+"" + $i("temas").innerHTML = ins+"" } /* Function: combotemas @@ -278,12 +305,12 @@ function combotemas(grupo,sub) { var monta = function(retorno) { - var ins = "" for (ig=0;ig"+retorno.data.temas[ig].nome+"" } - document.getElementById("temas").innerHTML = ins+"" + $i("temas").innerHTML = ins+"" } var p = "classesphp/mapa_controle.php?funcao=pegalistadetemas&map_file=''&grupo="+grupo+"&subgrupo="+sub; var cp = new cpaint(); @@ -292,7 +319,7 @@ function combotemas(grupo,sub) cp.call(p,"pegalistadetemas",monta); } /* -Function seletma +Function i3geo_gl_seltema Acrescenta um tema no link. @@ -302,12 +329,12 @@ Parameters: idtema - codigo do tema que será crescentado */ -function seltema(idtema) +function i3geo_gl_seltema(idtema) { var novodiv = document.createElement("div"); novodiv.style.textAlign="left" novodiv.id = idtema - document.getElementById("temasa").appendChild(novodiv); + $i("temasa").appendChild(novodiv); var novoel = document.createElement("img"); novoel.title = "excluir" novoel.onclick = excluir @@ -324,7 +351,7 @@ function seltema(idtema) novoel.onclick = descer novodiv.appendChild(novoel); var novoel = document.createElement("input"); - novoel.onclick = crialink + novoel.onclick = i3geo_gl_crialink novoel.title = "visível/não visível" novoel.type = "checkbox" novoel.style.cursor="pointer" @@ -337,7 +364,7 @@ function seltema(idtema) novoel.innerHTML = idtema novodiv.appendChild(novoel); novodiv.appendChild(document.createElement("br")); - crialink() + i3geo_gl_crialink() } /* Function: descer @@ -354,7 +381,7 @@ function descer(e) divpai = pai.parentNode if(pai.nextSibling) divpai.insertBefore(pai,pai.nextSibling.nextSibling) - crialink() + i3geo_gl_crialink() } /* Function: subir @@ -370,7 +397,7 @@ function subir(e) var pai = pegaElementoPai(e) divpai = pai.parentNode divpai.insertBefore(pai,pai.previousSibling) - crialink() + i3geo_gl_crialink() } /* Function: excluir @@ -385,7 +412,7 @@ function excluir(e) { var pai = pegaElementoPai(e) pai.parentNode.removeChild(pai) - crialink() + i3geo_gl_crialink() } /* Function: pegaElementoPai @@ -409,13 +436,13 @@ function pegaElementoPai(e) return(tparent) } /* -Function: initOL +Function: i3geo_gl_init Inicialliza o OpenLayers para permitir ao usuário escolher a abrangência espacial do link. */ -function initOL() +function i3geo_gl_init() { - document.getElementById("mapa1").style.display = "block"; + $i("mapa1").style.display = "block"; OL = new OpenLayers.Map('mapa1',{controls:[],numZoomLevels: 13}); // //layers @@ -434,7 +461,7 @@ function initOL() // var ls = new OpenLayers.Control.LayerSwitcher() OL.addControl(ls); - document.getElementById(ls.id).style.zIndex=2000; + $i(ls.id).style.zIndex=2000; OL.setCenter(new OpenLayers.LonLat(-55,-14), 2); var panel = new OpenLayers.Control.NavToolbar(); OL.addControl(panel); @@ -442,10 +469,10 @@ function initOL() panel.div.style.top="-298px"; var zb = new OpenLayers.Control.PanZoomBar(); OL.addControl(zb); - document.getElementById("OpenLayers_Control_PanZoom_pandown").style.display="none" - document.getElementById("OpenLayers_Control_PanZoom_panup").style.display="none" - document.getElementById("OpenLayers_Control_PanZoom_panleft").style.display="none" - document.getElementById("OpenLayers_Control_PanZoom_panright").style.display="none" + $i("OpenLayers_Control_PanZoom_pandown").style.display="none" + $i("OpenLayers_Control_PanZoom_panup").style.display="none" + $i("OpenLayers_Control_PanZoom_panleft").style.display="none" + $i("OpenLayers_Control_PanZoom_panright").style.display="none" zb.div.style.left="-8px" } /* @@ -456,11 +483,11 @@ Pega as coordenadas geográficas da extensão definida no OpenLayers. function capturageo() { var b = OL.getExtent(); - document.getElementById("xmin").value = b.left - document.getElementById("xmax").value = b.right - document.getElementById("ymin").value = b.bottom - document.getElementById("ymax").value = b.top - crialink() + $i("xmin").value = b.left + $i("xmax").value = b.right + $i("ymin").value = b.bottom + $i("ymax").value = b.top + i3geo_gl_crialink() } -- libgit2 0.21.2