Commit 7f7c72489fcfeb20409606a340bfa655282def23
1 parent
ab2102a1
Exists in
master
and in
7 other branches
Ajustes nos layouts das janelas de conexão com serviços
Showing
10 changed files
with
233 additions
and
183 deletions
Show diff stats
admin/admin.db
No preview for this file type
classesjs/classe_guias.js
... | ... | @@ -156,8 +156,12 @@ i3GEO.guias = |
156 | 156 | function(retorno) { |
157 | 157 | var ins, mapa, ig1lt, ig1, nome, lkd, link, temp, combo, urlinterface; |
158 | 158 | ins = |
159 | - "<br><div id='banners' style='overflow:auto;text-align:center'>" + "<a class='linkMapasEditor' href='" + i3GEO.configura.locaplic | |
160 | - + "/admin/html/mapas.html' target=_blank >" + $trad("x89") + "</a><br><br>"; | |
159 | + "<br><div id='banners' style='overflow:auto;text-align:center'>"; | |
160 | + if(i3GEO.configura.verificaCookieLogin === true){ | |
161 | + ins += "<a class='linkMapasEditor' href='" + i3GEO.configura.locaplic | |
162 | + + "/admin/html/mapas.html' target=_blank >" + $trad("x89") + "</a><br>"; | |
163 | + } | |
164 | + ins += "<br>"; | |
161 | 165 | mapa = retorno.data.mapas; |
162 | 166 | ig1lt = mapa.length; |
163 | 167 | ig1 = 0; |
... | ... | @@ -183,21 +187,22 @@ i3GEO.guias = |
183 | 187 | link = lkd; |
184 | 188 | } |
185 | 189 | ins += |
186 | - "<div style='float: left;width:170px;background-color:white;padding:5px;margin:5px;border: 1px solid #F0F0F0;border-radius: 5px;box-shadow: 1px 1px 1px 1px #D3D3D3;' >"; | |
190 | + "<div style='cursor:pointer; height: 120px;float: left;width:45%;background-color:white;padding:5px;margin:5px;border: 1px solid #F0F0F0;border-radius: 5px;box-shadow: 1px 1px 1px 1px #D3D3D3;' >"; | |
187 | 191 | |
188 | 192 | if (temp.IMAGEM && temp.IMAGEM != "") { |
189 | 193 | ins += |
190 | - "<div style='text-align:center;' ><a href='" + link | |
194 | + "<div style='float:left;margin:2px' ><a href='" + link | |
191 | 195 | + "' style=text-align:center;text-decoration:none; >" + "<img src='" + temp.IMAGEM |
192 | 196 | + "'></a></div>"; |
193 | 197 | } |
194 | 198 | // verifica se o mapfile esta salvo no banco |
195 | 199 | // diretamente |
200 | + nome += " (" + temp.ID_MAPA + ")"; | |
196 | 201 | if (temp.CONTEMMAPFILE == "nao") { |
197 | 202 | ins += |
198 | - "<div><p class=paragrafo style=text-align:center;cursor:pointer >" + "<a href='" + link | |
199 | - + "' style=text-align:center;text-decoration:none; >" + nome + " (" + temp.ID_MAPA | |
200 | - + ")</a></p></div>"; | |
203 | + "<div class=paragrafo style='text-align:left;'>" + "<a href='" + link | |
204 | + + "' style=text-align:left;text-decoration:none; >" + nome | |
205 | + + "</a></div>"; | |
201 | 206 | } else { |
202 | 207 | // combo de opcoes para abrir os mapas |
203 | 208 | // salvos |
... | ... | @@ -244,17 +249,13 @@ i3GEO.guias = |
244 | 249 | + "&botoes=legenda pan zoombox zoomtot zoomin zoomout'>Botoes de navegacao</option>" |
245 | 250 | + "</select>"; |
246 | 251 | ins += |
247 | - "<div>" + "<p class=paragrafo style=text-align:center;cursor:pointer >" | |
248 | - + "<img style=text-align:center src='" + i3GEO.configura.locaplic | |
252 | + "<div style='float:left;margin:2px'>" | |
253 | + + "<img src='" + i3GEO.configura.locaplic | |
249 | 254 | + "/ferramentas/salvamapa/geraminiatura.php?w=100&h=67&restauramapa=" + temp.ID_MAPA |
250 | - + "'><br><br>" + "<a href='" + link + "' style=text-align:center;text-decoration:none; >" | |
251 | - + nome + " (" + temp.ID_MAPA + ")</a>" + | |
252 | - // "<br><a target=_blank | |
253 | - // href='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?"+temp.OUTROS+"&fundo=e_wsm' | |
254 | - // style=text-align:center;text-decoration:none;color:gray; | |
255 | - // >Preview</a>" + | |
256 | - "<br>" + combo + "<br><div style='cursor:pointer;' id='i3geoMapasLink_" + ig1 + "' ></div>" | |
257 | - + "</p></div>"; | |
255 | + + "'></div><div class=paragrafo style='text-align:left;'><a href='" + link + "' style=text-align:center;text-decoration:none; >" | |
256 | + + nome + "</a></div>" | |
257 | + + combo + "<br><div style='cursor:pointer;' id='i3geoMapasLink_" + ig1 + "' ></div>"; | |
258 | + | |
258 | 259 | } |
259 | 260 | ins += "</div>"; |
260 | 261 | ig1++; | ... | ... |
classesphp/funcoes_gerais.php
... | ... | @@ -1269,8 +1269,7 @@ function georssCanais($servico,$map_file,$dir_tmp,$locaplic) |
1269 | 1269 | { |
1270 | 1270 | $xml = simplexml_load_file($servico); |
1271 | 1271 | //var_dump($xml); |
1272 | - foreach($xml->channel as $c) | |
1273 | - { | |
1272 | + foreach($xml->channel as $c){ | |
1274 | 1273 | $resultado[] = array("title"=>(ixml($c,"title")),"link"=>(ixml($c,"link")),"description"=>(ixml($c,"description")),"category"=>(ixml($c,"category"))); |
1275 | 1274 | } |
1276 | 1275 | //var_dump($resultado); | ... | ... |
ferramentas/conectargeojson/index.js
... | ... | @@ -56,7 +56,6 @@ i3GEOF.conectargeojson = { |
56 | 56 | */ |
57 | 57 | mustacheHash : function() { |
58 | 58 | var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.conectargeojson.dicionario); |
59 | - dicionario["conectaGeoJson"] = $inputText('','','i3GEOconectargeojsonurl','',45,''); | |
60 | 59 | dicionario["aguarde"] = $trad("o1"); |
61 | 60 | dicionario["locaplic"] = i3GEO.configura.locaplic; |
62 | 61 | dicionario["aplica"] = $trad("p14"); | ... | ... |
ferramentas/conectargeojson/template_mst.html
1 | -<p class="paragrafo"> | |
2 | - {{{insereEndereco}}}<br> <br> {{{conectaGeoJson}}} <br> <br> | |
3 | -<div id='i3GEOconectargeojsonCombo' style='left: 1px; display: block; width: 315px; text-align: left;'>{{{aguarde}}}</div> | |
1 | +<p class="paragrafo">{{{insereEndereco}}}</p> | |
2 | +<div class="i3geoForm i3geoFormIconeEdita" style="width:350px;"> | |
3 | + <input id=i3GEOconectargeojsonurl type="text" value="" /> | |
4 | +</div> | |
5 | +<p class=paragrafo > | |
6 | +<div id='i3GEOconectargeojsonCombo' style='left: 1px; display: block; width: 350px; text-align: left;'>{{{aguarde}}}</div> | |
4 | 7 | <br> |
5 | 8 | <br> |
6 | 9 | <input id='i3GEOconectargeojsonbotao1' type='button' value='{{{aplica}}}' /> |
7 | 10 | \ No newline at end of file | ... | ... |
ferramentas/conectargeorss/index.htm
1 | 1 | <html> |
2 | 2 | <head> |
3 | 3 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
4 | -<link rel="stylesheet" type="text/css" href="../../css/i3geo_ferramentas6.css"> | |
4 | +<script type="text/javascript" src="../../classesjs/i3geo.js"></script> | |
5 | +<link rel="stylesheet" type="text/css" href="../../css/black.css"> | |
5 | 6 | <title></title> |
6 | -<style type="text/css" >button{background:url(../../imagens/tic.png) 98% 50% no-repeat;}</style> | |
7 | -<link rel="stylesheet" type="text/css" href="../../pacotes/yui290/build/button/assets/skins/sam/button.css"/> | |
7 | + | |
8 | +<style type="text/css"> | |
9 | +button { | |
10 | + background: url(../../imagens/tic.png) 98% 50% no-repeat; | |
11 | +} | |
12 | +</style> | |
8 | 13 | <style type="text/css"> |
9 | 14 | body { |
10 | - margin:0; | |
11 | - padding:0;border:0px; | |
15 | + margin: 0; | |
16 | + padding: 0; | |
17 | + border: 0px; | |
18 | + background-color: white; | |
19 | +} | |
20 | +.guiaobj { | |
21 | + background-color: white; | |
22 | + display: block; | |
23 | + height: 90%; | |
24 | + left: 0; | |
25 | + overflow: auto; | |
26 | + text-align: left; | |
27 | + top: 0; | |
28 | + width: 97%; | |
12 | 29 | } |
13 | 30 | </style> |
14 | 31 | </head> |
15 | -<body class="yui-skin-sam" > | |
32 | +<body class="yui-skin-sam" style="background-color: white;" id="i3geo"> | |
16 | 33 | <div id=guiasYUI class="yui-navset" style="top:0px;cursor:pointer;left:0px;"> |
17 | 34 | <ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;"> |
18 | - <li><div id="guia1" style="text-align:center;font-size:10px;left:0px;" ><a href="#ancora"><em>Serviços</em></a></div></li> | |
19 | - <li><div id="guia2" style="text-align:center;font-size:10px;left:0px;" ><a href="#ancora"><em>Canais</em></a></div></li> | |
35 | + <li> | |
36 | + <div id="guia1" style="text-align:center;font-size:10px;left:0px;" > | |
37 | + <a><em>Serviços</em></a> | |
38 | + </div> | |
39 | + </li> | |
40 | + <li> | |
41 | + <div id="guia2" style="text-align:center;font-size:10px;left:0px;" ><a href="#ancora"><em>Canais</em></a></div> | |
42 | + </li> | |
20 | 43 | </ul> |
21 | 44 | </div> |
22 | - <div id=geral style="left:0px;top:0px;"> | |
23 | - <div class=guiaobj id="guia1obj" style="text-align:left;top:0px;left:0px"> | |
24 | - <div id=opc1 style="text-align:left;top:0px;left:0px"> | |
25 | - Digite o endereço do serviço ou clique da lista abaixo. Utilize as guias acima para ver o resultado do acesso.<br> | |
26 | - <input class=digitar id=servico value="" size=45 /> | |
27 | - </div> | |
28 | - <div id=RSS style="text-align:left;color:navy;cursor:pointer;width:95%;top:5px;left:5px"></div> | |
45 | + <div class=guiaobj id="guia1obj" style="text-align:left;top:0px;left:0px"> | |
46 | + <p class=paragrafo> | |
47 | + Digite o endereço do serviço ou clique da lista abaixo. Utilize as guias acima para ver o resultado da conexão.<br> | |
48 | + </p> | |
49 | + <div class="i3geoForm i3geoFormIconeEdita" style="width:350px;"> | |
50 | + <input id=servico type="text" value="" /> | |
29 | 51 | </div> |
30 | - <div class=guiaobj id="guia2obj" style="display:none;text-align:left;top:0px;left:0px"> | |
31 | - <div id=resultadoget style="text-align:left;top:0px;left:0px"> | |
32 | - </div> | |
52 | + <p class=paragrafo > | |
53 | + <div id=RSSgeo style="width: 350px;" class=paragrafo ></div> | |
54 | + <br> | |
55 | + <div id=RSS style="text-align:left;"></div> | |
56 | + <div id=opc1 style="text-align:left;"></div> | |
57 | + </div> | |
58 | + <div class=guiaobj id="guia2obj" style="display:none;text-align:left;top:0px;left:0px"> | |
59 | + <div id=resultadoget class="paragrafo" style="text-align:left;top:0px;left:0px"> | |
33 | 60 | </div> |
34 | 61 | </div> |
35 | 62 | |
36 | -<script src="../i3geo_tudo_compacto.js.php" type="text/javascript"></script> | |
37 | -<script type="text/javascript" src="index.js"></script> | |
63 | + <div id="aguarde"> | |
64 | + <img alt="" src="../../imagens/aguarde.gif" /> | |
65 | + Aguarde... | |
66 | + </div> | |
67 | + | |
68 | + | |
69 | + <script type="text/javascript" src="index.js"></script> | |
70 | + <script type="text/javascript" src="dicionario.js"></script> | |
38 | 71 | |
39 | 72 | <script type="text/javascript" > |
40 | -//TODO remover i3geo_tudo_compacto.js.php | |
41 | -if(window.parent.i3GEO.parametros.editor.toLowerCase() == "sim"){ | |
42 | - var temp = "<p><a href='#' style='color:red' onclick='abrejanelaIframe()' title='Opção visível apenas para usuários editores'>Editar a lista de endereços dos serviços</a></p>"; | |
43 | - document.getElementById("opc1").innerHTML += temp; | |
44 | -} | |
73 | + | |
45 | 74 | aguarde("block"); |
46 | 75 | g_RSS = new Array(""); |
47 | -iniciaListaGEORSS() | |
76 | +iniciaListaGEORSS(); | |
77 | +g_locaplic = "../.."; | |
48 | 78 | function iniciaListaGEORSS(){ |
49 | 79 | if (document.getElementById("RSS")) |
50 | 80 | { |
51 | 81 | if (g_RSS.length > 0) |
52 | 82 | { |
83 | + aguarde("block"); | |
53 | 84 | var p = "../../classesphp/wscliente.php?funcao=listaRSSwsARRAY&rss="+g_RSS.join("|")+"&tipo=GEORSS"; |
54 | 85 | var cp = new cpaint(); |
55 | 86 | //cp.set_debug(2) |
... | ... | @@ -69,18 +100,17 @@ function mostraRetornoRSS(retorno) |
69 | 100 | } |
70 | 101 | var canais = retorno.data.canais |
71 | 102 | var ncanais = canais.length |
72 | - var ins = "<br>"+retorno.data.rss | |
73 | - for (i=0;i<ncanais; i++) | |
74 | - { | |
75 | - var caso = canais[i] | |
76 | - ins += "\<p class=clique onclick=\"registraws('"+caso.link+"','"+caso.id_ws+"')\" \>\<b\>"+caso.title+"\<\/b\> "+caso.description+" ("+caso.author+")" | |
77 | - if(caso.nacessos > 0) | |
78 | - { | |
79 | - var pc = (parseInt(caso.nacessosok) * 100) / parseInt(caso.nacessos) | |
80 | - ins += " \<span style=color:gray \>(disponibilidade: "+pc+"%, acessos considerados: "+caso.nacessos+")\<\/span>\<\/p\>"; | |
81 | - } | |
103 | + | |
104 | + $i("RSS").innerHTML = retorno.data.rss; | |
105 | + var i, ins = ""; | |
106 | + ins += "<select size='5' onchange='registraws(this.value)' style='width:100%;' >"; | |
107 | + for (i = 0; i < ncanais; i++) { | |
108 | + var caso = canais[i]; | |
109 | + var valor = "'" + caso.link + "','" + caso.id_ws + "'"; | |
110 | + ins += "<option value=" + valor + " >"+caso.title+"</option>"; | |
82 | 111 | } |
83 | - document.getElementById("RSS").innerHTML = ins+"<br><br>" | |
112 | + ins += "</select>"; | |
113 | + document.getElementById("RSSgeo").innerHTML = ins; | |
84 | 114 | } |
85 | 115 | |
86 | 116 | </script> | ... | ... |
ferramentas/conectargeorss/index.js
... | ... | @@ -39,20 +39,26 @@ Free Software Foundation, Inc., no endere&ccedil;o |
39 | 39 | */ |
40 | 40 | |
41 | 41 | //parametrosURL(); |
42 | -ativaGuias(""); | |
43 | -mostraGuia("guia1"); | |
42 | + | |
43 | + | |
44 | 44 | //variaveis globais |
45 | +i3GEOF = {conectargeorss: {}}; | |
46 | + | |
45 | 47 | g_tipo = ""; //tipo de tema |
46 | 48 | g_tema = ""; //tema selecionado do ws |
47 | 49 | g_legenda = ""; //legenda do tema |
48 | 50 | g_nometema = ""; //nome do tema |
51 | +g_sid = window.parent.i3GEO.configura.sid; | |
49 | 52 | |
50 | -$i("guia1").onclick = function() | |
51 | -{ | |
52 | - mostraGuia("guia1"); | |
53 | +i3GEO.guias.mostraGuiaFerramenta("guia1"); | |
54 | + | |
55 | +$i("guia1").onclick = function(){ | |
56 | + i3GEO.guias.mostraGuiaFerramenta("guia1"); | |
53 | 57 | $i("resultadoget").innerHTML = ""; |
54 | 58 | }; |
55 | -$i("guia2").onclick = function(){clickGuia2();}; | |
59 | +$i("guia2").onclick = function(){ | |
60 | + clickGuia2(); | |
61 | +}; | |
56 | 62 | |
57 | 63 | /* |
58 | 64 | Function: clickGuia2 |
... | ... | @@ -65,11 +71,10 @@ Veja: |
65 | 71 | */ |
66 | 72 | function clickGuia2() |
67 | 73 | { |
68 | - mostraGuia("guia2"); | |
74 | + i3GEO.guias.mostraGuiaFerramenta("guia2"); | |
69 | 75 | $i("resultadoget").innerHTML = ""; |
70 | 76 | if ($i("servico").value == ""){i3GEO.janela.tempoMsg($trad('msgServico',i3GEOF.conectargeorss.dicionario));} |
71 | - else | |
72 | - { | |
77 | + else{ | |
73 | 78 | $i("guia2obj").style.display="block"; |
74 | 79 | aguarde("block"); |
75 | 80 | var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=georssCanais&servico="+$i("servico").value; |
... | ... | @@ -99,14 +104,14 @@ retorno {JSON} - retorno da fun&ccedil;&atilde;o clickGuia2 |
99 | 104 | */ |
100 | 105 | function listaCanais(retorno) |
101 | 106 | { |
102 | - var i,ins = $trad('selecionaItem',i3GEOF.conectargeorss.dicionario)+"<br>"; | |
107 | + var i,ins = "<p class='paragrafo'>"+ $trad('selecionaItem',i3GEOF.conectargeorss.dicionario)+"</p>"; | |
103 | 108 | if (retorno.data != undefined) |
104 | 109 | { |
105 | 110 | retorno = retorno.data; |
106 | 111 | for (i=0;i<retorno.length; i++) |
107 | 112 | { |
108 | - ins += "<p style=cursor:pointer onclick=adicionatema('"+i+"') ><input type=radio name=cn value=mapa > <b>"+retorno[i].title+ "</b></p>"; | |
109 | - ins += "<br><a href="+retorno[i].link+" target=blank >"+retorno[i].link+"</a>"; | |
113 | + ins += "<p class='paragrafo'><input style='cursor:pointer;' onclick=adicionatema('"+i+"') type=radio name=cn value=mapa > <b>"+retorno[i].title+ "</b></p>"; | |
114 | + ins += "<a href="+retorno[i].link+" target=blank >"+retorno[i].link+"</a>"; | |
110 | 115 | ins += "<br><i>"+$trad('descricao',i3GEOF.conectargeorss.dicionario)+"</i> "+retorno[i].description; |
111 | 116 | ins += "<br><i>"+$trad('categoria',i3GEOF.conectargeorss.dicionario)+" </i>"+retorno[i].category; |
112 | 117 | } |
... | ... | @@ -177,4 +182,8 @@ function abrejanelaIframe(){ |
177 | 182 | g_locaplic+"/imagens/oxygen/16x16/application-x-smb-workgroup.png" |
178 | 183 | ); |
179 | 184 | YAHOO.util.Event.addListener(janelaeditor[0].close, "click", iniciaListaGEORSS,janelaeditor[0].panel,{id:janelaeditor[0].id},true); |
185 | +} | |
186 | +function aguarde(valor){ | |
187 | + if(document.getElementById("aguarde")) | |
188 | + document.getElementById("aguarde").style.display = valor; | |
180 | 189 | } |
181 | 190 | \ No newline at end of file | ... | ... |
ferramentas/conectarservicos/index.js
... | ... | @@ -84,7 +84,7 @@ i3GEOF.conectarservicos = |
84 | 84 | "", |
85 | 85 | "", |
86 | 86 | $trad("x46") |
87 | - + "<a class=ajuda_usuario target=_blank href='" | |
87 | + + " <a class=ajuda_usuario target=_blank href='" | |
88 | 88 | + i3GEO.configura.locaplic |
89 | 89 | + "/ajuda_usuario.php?idcategoria=4&idajuda=76' ><b> </b></a>", |
90 | 90 | "i3GEO.conectarwmst", |
... | ... | @@ -110,7 +110,7 @@ i3GEOF.conectarservicos = |
110 | 110 | "", |
111 | 111 | "", |
112 | 112 | $trad("x47") |
113 | - + "<a class=ajuda_usuario target=_blank href='" | |
113 | + + " <a class=ajuda_usuario target=_blank href='" | |
114 | 114 | + i3GEO.configura.locaplic |
115 | 115 | + "/ajuda_usuario.php?idcategoria=4&idajuda=29' ><b> </b></a>", |
116 | 116 | "i3GEO.conectargeorss", | ... | ... |
ferramentas/conectarwms/index.htm
... | ... | @@ -9,6 +9,7 @@ button { |
9 | 9 | } |
10 | 10 | </style> |
11 | 11 | <link rel="stylesheet" type="text/css" href="../../pacotes/yui290/build/button/assets/skins/sam/button.css" /> |
12 | + | |
12 | 13 | <style type="text/css"> |
13 | 14 | body { |
14 | 15 | margin: 0; |
... | ... | @@ -26,6 +27,13 @@ body { |
26 | 27 | top: 0; |
27 | 28 | width: 97%; |
28 | 29 | } |
30 | +input[type=text]{ | |
31 | + -webkit-user-select: text; | |
32 | + -khtml-user-select: text; | |
33 | + -moz-user-select: text; | |
34 | + -o-user-select: text; | |
35 | + user-select: text; | |
36 | +} | |
29 | 37 | </style> |
30 | 38 | </head> |
31 | 39 | <body class="yui-skin-sam" style="background-color: white;"> |
... | ... | @@ -63,10 +71,10 @@ body { |
63 | 71 | <br> |
64 | 72 | </p> |
65 | 73 | <p class=paragrafo> |
66 | - Digite o endereço do serviço ou escolha da lista abaixo. Utilize as guias acima para ver o resultado do acesso. Por padrão, utiliza-se a versão 1.1.0 do GetCapabilities. Você pode adicionar um outro, bastando incluir no endereço do serviço "&version=1.3.0" por exemplo.<br> | |
74 | + Digite o endereço do serviço ou escolha da lista abaixo. Utilize as guias acima para ver o resultado da conexão. Por padrão, utiliza-se a versão 1.1.0 do GetCapabilities. Você pode adicionar um outro, bastando incluir no endereço do serviço "&version=1.3.0" por exemplo.<br> | |
67 | 75 | </p> |
68 | - <div class="styled-select" style="width: 350px; margin-top: 15px;"> | |
69 | - <input tabindex='0' id=servico value="" size=45 /> | |
76 | + <div class="i3geoForm i3geoFormIconeEdita" style="width: 350px; margin-top: 15px;"> | |
77 | + <input tabindex='0' id=servico value="" type="text" /> | |
70 | 78 | </div> |
71 | 79 | <p class=paragrafo > |
72 | 80 | <div id=RSSwms style="width: 350px;" class=paragrafo ></div> |
... | ... | @@ -145,7 +153,7 @@ body { |
145 | 153 | var canais = retorno.data.canais |
146 | 154 | var ncanais = canais.length |
147 | 155 | $i("RSSbt").innerHTML = retorno.data.rss; |
148 | - var ins = ""; | |
156 | + var i, ins = ""; | |
149 | 157 | ins += "<select size='5' onchange='registraws(this.value)' style='width:100%;' >"; |
150 | 158 | for (i = 0; i < ncanais; i++) { |
151 | 159 | var caso = canais[i]; | ... | ... |
js/guias.js
... | ... | @@ -150,114 +150,115 @@ i3GEO.guias = |
150 | 150 | //TODO retirar os estilos do codigo e incluir em arquivo css |
151 | 151 | var pegaMapas = |
152 | 152 | function(retorno) { |
153 | - var ins, mapa, ig1lt, ig1, nome, lkd, link, temp, combo, urlinterface; | |
154 | - ins = | |
155 | - "<br><div id='banners' style='overflow:auto;text-align:center'>" + "<a class='linkMapasEditor' href='" + i3GEO.configura.locaplic | |
156 | - + "/admin/html/mapas.html' target=_blank >" + $trad("x89") + "</a><br><br>"; | |
157 | - mapa = retorno.data.mapas; | |
158 | - ig1lt = mapa.length; | |
159 | - ig1 = 0; | |
160 | - urlinterface = window.location.origin + window.location.pathname; | |
161 | - if (ig1lt > 0) { | |
162 | - do { | |
163 | - temp = mapa[ig1]; | |
164 | - nome = temp.NOME; | |
165 | - if (temp.PUBLICADO) { | |
166 | - if (temp.PUBLICADO.toLowerCase() === "nao") { | |
167 | - nome = "<s>" + nome + "</s>"; | |
168 | - } | |
169 | - } | |
170 | - lkd = temp.LINK; | |
171 | - link = i3GEO.configura.locaplic + "/ms_criamapa.php?temasa=" + temp.TEMAS + "&layers=" + temp.LIGADOS; | |
172 | - if (temp.EXTENSAO !== "") { | |
173 | - link += "&mapext=" + temp.EXTENSAO; | |
174 | - } | |
175 | - if (temp.OUTROS !== "") { | |
176 | - link += "&" + temp.OUTROS; | |
177 | - } | |
178 | - if (lkd !== "") { | |
179 | - link = lkd; | |
153 | + var ins, mapa, ig1lt, ig1, nome, lkd, link, temp, combo, urlinterface; | |
154 | + ins = | |
155 | + "<br><div id='banners' style='overflow:auto;text-align:center'>"; | |
156 | + if(i3GEO.configura.verificaCookieLogin === true){ | |
157 | + ins += "<a class='linkMapasEditor' href='" + i3GEO.configura.locaplic | |
158 | + + "/admin/html/mapas.html' target=_blank >" + $trad("x89") + "</a><br>"; | |
159 | + } | |
160 | + ins += "<br>"; | |
161 | + mapa = retorno.data.mapas; | |
162 | + ig1lt = mapa.length; | |
163 | + ig1 = 0; | |
164 | + urlinterface = window.location.origin + window.location.pathname; | |
165 | + if (ig1lt > 0) { | |
166 | + do { | |
167 | + temp = mapa[ig1]; | |
168 | + nome = temp.NOME; | |
169 | + if (temp.PUBLICADO) { | |
170 | + if (temp.PUBLICADO.toLowerCase() === "nao") { | |
171 | + nome = "<s>" + nome + "</s>"; | |
180 | 172 | } |
173 | + } | |
174 | + lkd = temp.LINK; | |
175 | + link = i3GEO.configura.locaplic + "/ms_criamapa.php?temasa=" + temp.TEMAS + "&layers=" + temp.LIGADOS; | |
176 | + if (temp.EXTENSAO !== "") { | |
177 | + link += "&mapext=" + temp.EXTENSAO; | |
178 | + } | |
179 | + if (temp.OUTROS !== "") { | |
180 | + link += "&" + temp.OUTROS; | |
181 | + } | |
182 | + if (lkd !== "") { | |
183 | + link = lkd; | |
184 | + } | |
185 | + ins += | |
186 | + "<div style='cursor:pointer; height: 120px;float: left;width:45%;background-color:white;padding:5px;margin:5px;border: 1px solid #F0F0F0;border-radius: 5px;box-shadow: 1px 1px 1px 1px #D3D3D3;' >"; | |
187 | + | |
188 | + if (temp.IMAGEM && temp.IMAGEM != "") { | |
181 | 189 | ins += |
182 | - "<div style='float: left;width:170px;background-color:white;padding:5px;margin:5px;border: 1px solid #F0F0F0;border-radius: 5px;box-shadow: 1px 1px 1px 1px #D3D3D3;' >"; | |
190 | + "<div style='float:left;margin:2px' ><a href='" + link | |
191 | + + "' style=text-align:center;text-decoration:none; >" + "<img src='" + temp.IMAGEM | |
192 | + + "'></a></div>"; | |
193 | + } | |
194 | + // verifica se o mapfile esta salvo no banco | |
195 | + // diretamente | |
196 | + nome += " (" + temp.ID_MAPA + ")"; | |
197 | + if (temp.CONTEMMAPFILE == "nao") { | |
198 | + ins += | |
199 | + "<div class=paragrafo style='text-align:left;'>" + "<a href='" + link | |
200 | + + "' style=text-align:left;text-decoration:none; >" + nome | |
201 | + + "</a></div>"; | |
202 | + } else { | |
203 | + // combo de opcoes para abrir os mapas | |
204 | + // salvos | |
205 | + // como mapfiles | |
206 | + // esses links tambem sao colocados em | |
207 | + // admin/php/xml.php geraRSSmapas | |
208 | + combo = | |
209 | + "<select style='width:170px;' onchange='i3GEO.guias.CONFIGURA.mapas.mostraLink(" | |
210 | + + ig1 | |
211 | + + ",this.value)'>" | |
212 | + + "<option value=''>" | |
213 | + + $trad("x103") | |
214 | + + ":</option>" | |
215 | + + "<option value='" | |
216 | + + link | |
217 | + + "'>Como foi salvo</option>" | |
218 | + + "<option value='" | |
219 | + + link | |
220 | + + "&interface=" | |
221 | + + urlinterface | |
222 | + + "'>Com a interface atual</option>" | |
223 | + + "<option value='" | |
224 | + + i3GEO.configura.locaplic | |
225 | + + "/mashups/openlayers.php?numzoomlevels=18&restauramapa=" | |
226 | + + temp.ID_MAPA | |
227 | + + "&fundo=e_wsm'>Openlayers com todos os botoes</option>" | |
228 | + + "<option value='" | |
229 | + + i3GEO.configura.locaplic | |
230 | + + "/mashups/openlayers.php?numzoomlevels=18&restauramapa=" | |
231 | + + temp.ID_MAPA | |
232 | + + "&fundo=est_wms'>Sem o fundo</option>" | |
233 | + + "<option value='" | |
234 | + + i3GEO.configura.locaplic | |
235 | + + "/mashups/openlayers.php?numzoomlevels=18&restauramapa=" | |
236 | + + temp.ID_MAPA | |
237 | + + "&fundo=e_wsm&botoes=legenda pan zoombox zoomtot zoomin zoomout distancia area identifica'>Com botoes principais</option>" | |
238 | + + "<option value='" | |
239 | + + i3GEO.configura.locaplic | |
240 | + + "/mashups/osm.php?numzoomlevels=18&restauramapa=" | |
241 | + + temp.ID_MAPA | |
242 | + + "&fundo=e_wsm&botoes=legenda pan zoombox zoomtot zoomin zoomout distancia area identifica'>Com botoes principais e OSM</option>" | |
243 | + + "<option value='" + i3GEO.configura.locaplic + "/mashups/openlayers.php?numzoomlevels=18&restauramapa=" | |
244 | + + temp.ID_MAPA | |
245 | + + "&botoes=legenda pan zoombox zoomtot zoomin zoomout'>Botoes de navegacao</option>" | |
246 | + + "</select>"; | |
247 | + ins += | |
248 | + "<div style='float:left;margin:2px'>" | |
249 | + + "<img src='" + i3GEO.configura.locaplic | |
250 | + + "/ferramentas/salvamapa/geraminiatura.php?w=100&h=67&restauramapa=" + temp.ID_MAPA | |
251 | + + "'></div><div class=paragrafo style='text-align:left;'><a href='" + link + "' style=text-align:center;text-decoration:none; >" | |
252 | + + nome + "</a></div>" | |
253 | + + combo + "<br><div style='cursor:pointer;' id='i3geoMapasLink_" + ig1 + "' ></div>"; | |
183 | 254 | |
184 | - if (temp.IMAGEM && temp.IMAGEM != "") { | |
185 | - ins += | |
186 | - "<div style='text-align:center;' ><a href='" + link | |
187 | - + "' style=text-align:center;text-decoration:none; >" + "<img src='" + temp.IMAGEM | |
188 | - + "'></a></div>"; | |
189 | - } | |
190 | - // verifica se o mapfile esta salvo no banco | |
191 | - // diretamente | |
192 | - if (temp.CONTEMMAPFILE == "nao") { | |
193 | - ins += | |
194 | - "<div><p class=paragrafo style=text-align:center;cursor:pointer >" + "<a href='" + link | |
195 | - + "' style=text-align:center;text-decoration:none; >" + nome + " (" + temp.ID_MAPA | |
196 | - + ")</a></p></div>"; | |
197 | - } else { | |
198 | - // combo de opcoes para abrir os mapas | |
199 | - // salvos | |
200 | - // como mapfiles | |
201 | - // esses links tambem sao colocados em | |
202 | - // admin/php/xml.php geraRSSmapas | |
203 | - combo = | |
204 | - "<select style='width:170px;' onchange='i3GEO.guias.CONFIGURA.mapas.mostraLink(" | |
205 | - + ig1 | |
206 | - + ",this.value)'>" | |
207 | - + "<option value=''>" | |
208 | - + $trad("x103") | |
209 | - + ":</option>" | |
210 | - + "<option value='" | |
211 | - + link | |
212 | - + "'>Como foi salvo</option>" | |
213 | - + "<option value='" | |
214 | - + link | |
215 | - + "&interface=" | |
216 | - + urlinterface | |
217 | - + "'>Com a interface atual</option>" | |
218 | - + "<option value='" | |
219 | - + i3GEO.configura.locaplic | |
220 | - + "/mashups/openlayers.php?numzoomlevels=18&restauramapa=" | |
221 | - + temp.ID_MAPA | |
222 | - + "&fundo=e_wsm'>Openlayers com todos os botoes</option>" | |
223 | - + "<option value='" | |
224 | - + i3GEO.configura.locaplic | |
225 | - + "/mashups/openlayers.php?numzoomlevels=18&restauramapa=" | |
226 | - + temp.ID_MAPA | |
227 | - + "&fundo=est_wms'>Sem o fundo</option>" | |
228 | - + "<option value='" | |
229 | - + i3GEO.configura.locaplic | |
230 | - + "/mashups/openlayers.php?numzoomlevels=18&restauramapa=" | |
231 | - + temp.ID_MAPA | |
232 | - + "&fundo=e_wsm&botoes=legenda pan zoombox zoomtot zoomin zoomout distancia area identifica'>Com botoes principais</option>" | |
233 | - + "<option value='" | |
234 | - + i3GEO.configura.locaplic | |
235 | - + "/mashups/osm.php?numzoomlevels=18&restauramapa=" | |
236 | - + temp.ID_MAPA | |
237 | - + "&fundo=e_wsm&botoes=legenda pan zoombox zoomtot zoomin zoomout distancia area identifica'>Com botoes principais e OSM</option>" | |
238 | - + "<option value='" + i3GEO.configura.locaplic + "/mashups/openlayers.php?numzoomlevels=18&restauramapa=" | |
239 | - + temp.ID_MAPA | |
240 | - + "&botoes=legenda pan zoombox zoomtot zoomin zoomout'>Botoes de navegacao</option>" | |
241 | - + "</select>"; | |
242 | - ins += | |
243 | - "<div>" + "<p class=paragrafo style=text-align:center;cursor:pointer >" | |
244 | - + "<img style=text-align:center src='" + i3GEO.configura.locaplic | |
245 | - + "/ferramentas/salvamapa/geraminiatura.php?w=100&h=67&restauramapa=" + temp.ID_MAPA | |
246 | - + "'><br><br>" + "<a href='" + link + "' style=text-align:center;text-decoration:none; >" | |
247 | - + nome + " (" + temp.ID_MAPA + ")</a>" + | |
248 | - // "<br><a target=_blank | |
249 | - // href='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?"+temp.OUTROS+"&fundo=e_wsm' | |
250 | - // style=text-align:center;text-decoration:none;color:gray; | |
251 | - // >Preview</a>" + | |
252 | - "<br>" + combo + "<br><div style='cursor:pointer;' id='i3geoMapasLink_" + ig1 + "' ></div>" | |
253 | - + "</p></div>"; | |
254 | - } | |
255 | - ins += "</div>"; | |
256 | - ig1++; | |
257 | - } while (ig1 < ig1lt); | |
258 | - } | |
259 | - $i(onde).innerHTML = ins + "</div>"; | |
260 | - }; | |
255 | + } | |
256 | + ins += "</div>"; | |
257 | + ig1++; | |
258 | + } while (ig1 < ig1lt); | |
259 | + } | |
260 | + $i(onde).innerHTML = ins + "</div>"; | |
261 | + }; | |
261 | 262 | if ($i(i3GEO.guias.CONFIGURA.mapas.idconteudo)) { |
262 | 263 | $i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML = "Aguarde..."; |
263 | 264 | } | ... | ... |