Commit 66bfabcbb14888917c83533baefb89a459c68e82
1 parent
72deca6e
Exists in
master
and in
7 other branches
Inclusão de parâmetro para abrir links de uma camada
Showing
1 changed file
with
17 additions
and
1 deletions
Show diff stats
ogc.htm
| ... | ... | @@ -175,6 +175,8 @@ A:hover { |
| 175 | 175 | ins = "<H1>Endereço do web service:</H1>"; |
| 176 | 176 | var re = new RegExp(".htm", "g"); |
| 177 | 177 | var servico = window.location.href.replace(re, '.php?'); |
| 178 | + //remove variaveis adicionais, se houver | |
| 179 | + servico = servico.split("?")[0]+"?"; | |
| 178 | 180 | var s = ""; //"tema="+tema; |
| 179 | 181 | if (botao.name === "metaestat") { |
| 180 | 182 | s = "id_medida_variavel=" + tema.split("_")[1] + "&"; |
| ... | ... | @@ -185,7 +187,8 @@ A:hover { |
| 185 | 187 | } |
| 186 | 188 | |
| 187 | 189 | servico += s; |
| 188 | - ins += "<p>" + servico; | |
| 190 | + ins += "<p><a href='" + servico + "' target='_blank' >" + servico + "</a>"; | |
| 191 | + ins += "<p>Link para essa página: <a href='"+ window.location.href.split("?")[0] + "?temaOgc=" + tema + "'>"+ window.location.href.split("?")[0] + "?temaOgc=" + tema + "</a>"; | |
| 189 | 192 | ins += "<p>Bookmark: <span id=bm ></span>"; |
| 190 | 193 | ins += |
| 191 | 194 | "<p><iframe src='http://www.facebook.com/plugins/like.php?href=" + servico |
| ... | ... | @@ -259,6 +262,19 @@ A:hover { |
| 259 | 262 | i3GEO.arvoreDeTemas.INCLUIESTRELAS = false; |
| 260 | 263 | i3GEO.arvoreDeTemas.TIPOBOTAO = "radio"; |
| 261 | 264 | i3GEO.arvoreDeTemas.cria("", g_locaplic, "arvoreTemas", "ogc_endereco\(this\)"); |
| 265 | + //verifica se deve abrir de imediato a janela de links | |
| 266 | + temp = loc.split("temaOgc="); | |
| 267 | + if(temp[1]){ | |
| 268 | + temaOgc = temp[1]; | |
| 269 | + temaOgc = temaOgc.split("&"); | |
| 270 | + temaOgc = temaOgc[0]; | |
| 271 | + var botao = { | |
| 272 | + checked: false, | |
| 273 | + name: temaOgc, | |
| 274 | + value: temaOgc | |
| 275 | + }; | |
| 276 | + ogc_endereco(botao); | |
| 277 | + } | |
| 262 | 278 | </script> |
| 263 | 279 | </body> |
| 264 | 280 | </html> | ... | ... |