Commit ea92aa6b9a79f29e902d305a149f43afaab725e0
1 parent
3887ac4e
Exists in
master
and in
7 other branches
Inclusão de função que detecta automaticamente a localização (url) do i3Geo e de…
…fine a variável configura.locaplic
Showing
12 changed files
with
107 additions
and
25 deletions
Show diff stats
classesjs/classe_arvoredecamadas.js
| ... | ... | @@ -772,11 +772,7 @@ i3GEO.arvoreDeCamadas = { |
| 772 | 772 | iconesNode = new YAHOO.widget.HTMLNode(d, node, false,true); |
| 773 | 773 | iconesNode.enableHighlight = false; |
| 774 | 774 | iconesNode.isLeaf = true; |
| 775 | - | |
| 776 | 775 | } |
| 777 | - | |
| 778 | - | |
| 779 | - | |
| 780 | 776 | } |
| 781 | 777 | if(i3GEO.arvoreDeCamadas.OPCOESTEMAS === true){ |
| 782 | 778 | conteudo = $trad("t18a"); | ... | ... |
classesjs/classe_i3geo.js
| ... | ... | @@ -212,8 +212,9 @@ i3GEO = { |
| 212 | 212 | else |
| 213 | 213 | {i3GEO.configura.sid = "";} |
| 214 | 214 | // |
| 215 | - //para efeitos de compatibilidade | |
| 215 | + //para efeitos de compatibilidade (depreciado) | |
| 216 | 216 | // |
| 217 | + /* | |
| 217 | 218 | g_panM = "nao"; |
| 218 | 219 | g_sid = i3GEO.configura.sid; |
| 219 | 220 | try {i3GEO.configura.locaplic = g_locaplic;} |
| ... | ... | @@ -223,7 +224,14 @@ i3GEO = { |
| 223 | 224 | try{i3GEO.configura.diminuixM = g_diminuixM;}catch(e){} |
| 224 | 225 | try{i3GEO.configura.diminuixN = g_diminuixN;}catch(e){} |
| 225 | 226 | try{i3GEO.configura.diminuiyM = g_diminuiyM;}catch(e){} |
| 226 | - try{i3GEO.configura.diminuiyN = g_diminuiyN;}catch(e){} | |
| 227 | + try{i3GEO.configura.diminuiyN = g_diminuiyN;}catch(e){} | |
| 228 | + */ | |
| 229 | + // | |
| 230 | + //tenta definir automaticamente a variável que indica a localização do i3geo | |
| 231 | + // | |
| 232 | + if(!i3GEO.configura.locaplic){ | |
| 233 | + i3GEO.util.localizai3GEO(); | |
| 234 | + } | |
| 227 | 235 | // |
| 228 | 236 | //calcula o tamanho do mapa |
| 229 | 237 | // | ... | ... |
classesjs/classe_social.js
| ... | ... | @@ -94,5 +94,5 @@ i3GEO.social = { |
| 94 | 94 | ins += "<img src='"+i3GEO.configura.locaplic+"/imagens/facebook.gif' onclick='javascript:window.open(\"http://www.facebook.com/sharer.php?u="+link+"\")' title='Facebook'/> "; |
| 95 | 95 | ins += "<img src='"+i3GEO.configura.locaplic+"/imagens/stumbleupon.gif' onclick='javascript:window.open(\"http://www.stumbleupon.com/submit?url="+link+"\")' title='StumbleUpon'/>"; |
| 96 | 96 | return ins; |
| 97 | - }, | |
| 97 | + } | |
| 98 | 98 | }; | ... | ... |
classesjs/classe_util.js
| ... | ... | @@ -2100,11 +2100,48 @@ i3GEO.util = { |
| 2100 | 2100 | YAHOO.janelaCorRamp.xp.panel = new YAHOO.widget.ResizePanel(id, { height:"480px",zIndex:5000, modal:modal, width: "350px", fixedcenter: fix, constraintoviewport: false, visible: true, iframe:false} ); |
| 2101 | 2101 | YAHOO.janelaCorRamp.xp.panel.render(); |
| 2102 | 2102 | $i(id+'_cabecalho').className = classe; |
| 2103 | + }, | |
| 2104 | + /* | |
| 2105 | + Function: localizai3GEO | |
| 2106 | + | |
| 2107 | + Tenta identificar onde os JS do i3Geo estão localizados | |
| 2108 | + | |
| 2109 | + Aplica o resultado à variável i3GEO.configura.locaplic | |
| 2110 | + | |
| 2111 | + Return: | |
| 2112 | + | |
| 2113 | + {string} - url onde está instalado o i3geo | |
| 2114 | + */ | |
| 2115 | + localizai3GEO: function(){ | |
| 2116 | + var scriptLocation = "", | |
| 2117 | + scripts = document.getElementsByTagName('script'), | |
| 2118 | + i = 0, | |
| 2119 | + index, | |
| 2120 | + ns = scripts.length; | |
| 2121 | + for (i = 0; i < ns; i++) { | |
| 2122 | + var src = scripts[i].getAttribute('src'); | |
| 2123 | + if (src) { | |
| 2124 | + var index = src.lastIndexOf("classesjs/i3geo.js"); | |
| 2125 | + // is it found, at the end of the URL? | |
| 2126 | + if ((index > -1) && (index + "classesjs/i3geo.js".length == src.length)) { | |
| 2127 | + scriptLocation = src.slice(0, -"classesjs/i3geo.js".length); | |
| 2128 | + break; | |
| 2129 | + } | |
| 2130 | + var index = src.lastIndexOf("classesjs/i3geonaocompacto.js"); | |
| 2131 | + if ((index > -1) && (index + "classesjs/i3geonaocompacto.js".length == src.length)) { | |
| 2132 | + scriptLocation = src.slice(0, -"classesjs/i3geonaocompacto.js".length); | |
| 2133 | + break; | |
| 2134 | + } | |
| 2135 | + } | |
| 2136 | + } | |
| 2137 | + //i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo" | |
| 2138 | + if(i3GEO.configura) | |
| 2139 | + {i3GEO.configura.locaplic = scriptLocation;} | |
| 2140 | + else | |
| 2141 | + {i3GEO.push({configura: scriptLocation})} | |
| 2142 | + return scriptLocation; | |
| 2103 | 2143 | } |
| 2104 | 2144 | }; |
| 2105 | - | |
| 2106 | - | |
| 2107 | - | |
| 2108 | 2145 | //++++++++++++++++++++++++++++++++++++ |
| 2109 | 2146 | // YUI ACCORDION |
| 2110 | 2147 | // 1/22/2008 - Edwart Visser | ... | ... |
ferramentas/inserexy2/index.js.php
| ... | ... | @@ -154,12 +154,12 @@ i3GEOF.inserexy = { |
| 154 | 154 | ' </ul>' + |
| 155 | 155 | '</div><br>' + |
| 156 | 156 | '<div id=i3GEOinserexyprojecao style="text-align:left;left:0px;display:none">' + |
| 157 | - ' <p class=paragrafo >Projeção:</p>' + | |
| 157 | + ' <p class=paragrafo >Projeção das coordenadas inseridas:</p>' + | |
| 158 | 158 | ' <div id="i3GEOinserexylistaepsg" style="text-align:left;border:1px solid gray;width:300px;overflow:auto;height:60px;display:block;left:1px" >' + |
| 159 | 159 | ' </div>' + |
| 160 | 160 | '</div>' + |
| 161 | 161 | '<div class=guiaobj id="i3GEOinserexyguia1obj" style="left:1px;display:none;top:10px">' + |
| 162 | - ' <p class=paragrafo >Escolha o tema para inserir os pontos:</p>' + | |
| 162 | + ' <p class=paragrafo >Escolha o tema editável para inserir os pontos:</p>' + | |
| 163 | 163 | ' <div id=i3GEOinserexyshapefile style="left:0px;text-align:left;">' + |
| 164 | 164 | ' </div><br>' + |
| 165 | 165 | ' <p class=paragrafo ><input id=i3GEOinserexybotaocriatema type="button" size=18 value="Criar um tema editável" />' + | ... | ... |
interface/flamingo.htm
| ... | ... | @@ -77,7 +77,15 @@ Exemplo: |
| 77 | 77 | http://localhost/i3geo/ms_criamapa.php?interface=flamingo.htm |
| 78 | 78 | |
| 79 | 79 | */ |
| 80 | -g_locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | |
| 80 | +/* | |
| 81 | + Indica a localização correta do i3geo. | |
| 82 | + | |
| 83 | + É utilizada para identificar o local correto onde estão os programas em php que são utilizados. | |
| 84 | + | |
| 85 | + Se não for definida, o i3Geo tentará encontrar o local automaticamente | |
| 86 | +*/ | |
| 87 | +//i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | |
| 88 | + | |
| 81 | 89 | i3GEO.configura.mapaRefDisplay = "none"; |
| 82 | 90 | i3GEO.interface.ATUAL = "flamingo"; |
| 83 | 91 | i3GEO.interface.IDCORPO = "contemImg"; | ... | ... |
interface/geral.htm
| ... | ... | @@ -194,15 +194,14 @@ Para definir quais botões das barras de ferramentas serão incluídos no mapa, vej |
| 194 | 194 | |
| 195 | 195 | */ |
| 196 | 196 | /* |
| 197 | -i3GEO.configura.locaplic indica a localização correta do i3geo. | |
| 197 | + Indica a localização correta do i3geo. | |
| 198 | 198 | |
| 199 | -Se vc instalou o i3geo em um diretório diferente do normal, altere o valor da variável abaixo. | |
| 200 | - | |
| 201 | -Por exemplo, se vc instalou no diretório "i3geoteste", modifique para: | |
| 202 | - | |
| 203 | -i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geoteste"; | |
| 199 | + É utilizada para identificar o local correto onde estão os programas em php que são utilizados. | |
| 200 | + | |
| 201 | + Se não for definida, o i3Geo tentará encontrar o local automaticamente | |
| 204 | 202 | */ |
| 205 | -i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | |
| 203 | +//i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | |
| 204 | + | |
| 206 | 205 | |
| 207 | 206 | i3GEO.cria() |
| 208 | 207 | ... | ... |
interface/googleearth.phtml
| ... | ... | @@ -119,7 +119,15 @@ Exemplo: |
| 119 | 119 | http://localhost/i3geo/ms_criamapa.php?interface=googleearth.phtml |
| 120 | 120 | |
| 121 | 121 | */ |
| 122 | -i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | |
| 122 | +/* | |
| 123 | + Indica a localização correta do i3geo. | |
| 124 | + | |
| 125 | + É utilizada para identificar o local correto onde estão os programas em php que são utilizados. | |
| 126 | + | |
| 127 | + Se não for definida, o i3Geo tentará encontrar o local automaticamente | |
| 128 | +*/ | |
| 129 | +//i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | |
| 130 | + | |
| 123 | 131 | g_mapaRefDisplay = "none" |
| 124 | 132 | g_janelaMen = "nao"; |
| 125 | 133 | g_mostraRosa = "nao" | ... | ... |
interface/googlemaps.phtml
| ... | ... | @@ -119,7 +119,15 @@ Exemplo: |
| 119 | 119 | http://localhost/i3geo/interface/googlemaps.phtml |
| 120 | 120 | |
| 121 | 121 | */ |
| 122 | -i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | |
| 122 | +/* | |
| 123 | + Indica a localização correta do i3geo. | |
| 124 | + | |
| 125 | + É utilizada para identificar o local correto onde estão os programas em php que são utilizados. | |
| 126 | + | |
| 127 | + Se não for definida, o i3Geo tentará encontrar o local automaticamente | |
| 128 | +*/ | |
| 129 | +//i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | |
| 130 | + | |
| 123 | 131 | |
| 124 | 132 | i3GEO.Interface.ATUAL = "googlemaps"; |
| 125 | 133 | i3GEO.Interface.IDCORPO = "contemImg"; | ... | ... |
interface/openlayers.htm
| ... | ... | @@ -169,8 +169,10 @@ Para definir quais botões das barras de ferramentas serão incluídos no mapa, vej |
| 169 | 169 | Indica a localização correta do i3geo. |
| 170 | 170 | |
| 171 | 171 | É utilizada para identificar o local correto onde estão os programas em php que são utilizados. |
| 172 | + | |
| 173 | + Se não for definida, o i3Geo tentará encontrar o local automaticamente | |
| 172 | 174 | */ |
| 173 | -i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | |
| 175 | +//i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | |
| 174 | 176 | |
| 175 | 177 | i3GEO.Interface.ATUAL = "openlayers"; |
| 176 | 178 | i3GEO.Interface.IDCORPO = "contemImg"; | ... | ... |
interface/zerocal.htm
| ... | ... | @@ -107,7 +107,15 @@ Exemplo: |
| 107 | 107 | http://<host>/i3geo/interface/zerocal.htm |
| 108 | 108 | |
| 109 | 109 | */ |
| 110 | -i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | |
| 110 | +/* | |
| 111 | + Indica a localização correta do i3geo. | |
| 112 | + | |
| 113 | + É utilizada para identificar o local correto onde estão os programas em php que são utilizados. | |
| 114 | + | |
| 115 | + Se não for definida, o i3Geo tentará encontrar o local automaticamente | |
| 116 | +*/ | |
| 117 | +//i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | |
| 118 | + | |
| 111 | 119 | |
| 112 | 120 | i3GEO.cria() |
| 113 | 121 | ... | ... |
interface/zerocalol.htm
| ... | ... | @@ -110,7 +110,15 @@ Exemplo: |
| 110 | 110 | http://<host>/i3geo/interface/zerocal.htm |
| 111 | 111 | |
| 112 | 112 | */ |
| 113 | -i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | |
| 113 | +/* | |
| 114 | + Indica a localização correta do i3geo. | |
| 115 | + | |
| 116 | + É utilizada para identificar o local correto onde estão os programas em php que são utilizados. | |
| 117 | + | |
| 118 | + Se não for definida, o i3Geo tentará encontrar o local automaticamente | |
| 119 | +*/ | |
| 120 | +//i3GEO.configura.locaplic = i3GEO.util.protocolo()+"://"+window.location.host+"/i3geo"; | |
| 121 | + | |
| 114 | 122 | |
| 115 | 123 | i3GEO.Interface.ATUAL = "openlayers"; |
| 116 | 124 | i3GEO.Interface.IDCORPO = "contemImg"; | ... | ... |