Commit d68ccc2c944916c1fe2e76a267c81a61f8b5147b
1 parent
9c94ca9b
Exists in
master
and in
7 other branches
Ticket #482
Showing
4 changed files
with
29 additions
and
20 deletions
Show diff stats
admin/admin.db
No preview for this file type
classesjs/classe_arvoredecamadas.js
@@ -1301,7 +1301,7 @@ i3GEO.arvoreDeCamadas = { | @@ -1301,7 +1301,7 @@ i3GEO.arvoreDeCamadas = { | ||
1301 | html += " <img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; | 1301 | html += " <img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"; |
1302 | } | 1302 | } |
1303 | //manter a lógica de exigir sim ao invés de vazio | 1303 | //manter a lógica de exigir sim ao invés de vazio |
1304 | - if (tema.download.toLowerCase() === "sim") | 1304 | + if (tema.download.toLowerCase() === "sim" || tema.download === "" && tema.features.toLowerCase() !== "sim") |
1305 | {html += " <img style='"+estilo+"' src="+iu.$im("down1.gif") +" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";} | 1305 | {html += " <img style='"+estilo+"' src="+iu.$im("down1.gif") +" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";} |
1306 | estilo = navm ? "cursor:move;vertical-align:35%;padding-top:0px;color:black;" : "cursor:move;vertical-align:20%;color:black;"; | 1306 | estilo = navm ? "cursor:move;vertical-align:35%;padding-top:0px;color:black;" : "cursor:move;vertical-align:20%;color:black;"; |
1307 | if(i3GEO.arvoreDeCamadas.AGUARDALEGENDA) | 1307 | if(i3GEO.arvoreDeCamadas.AGUARDALEGENDA) |
classesphp/funcoes_gerais.php
@@ -1360,7 +1360,7 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | @@ -1360,7 +1360,7 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) | ||
1360 | if ($layer->type == MS_LAYER_LINE){$tipol = MS_SHP_ARC;} | 1360 | if ($layer->type == MS_LAYER_LINE){$tipol = MS_SHP_ARC;} |
1361 | if ($layer->type == MS_LAYER_POLYGON){$tipol = MS_SHP_POLYGON;} | 1361 | if ($layer->type == MS_LAYER_POLYGON){$tipol = MS_SHP_POLYGON;} |
1362 | if ($nomeRand == true) | 1362 | if ($nomeRand == true) |
1363 | - {$novonomelayer = nomeRandomico(20);} | 1363 | + {$novonomelayer = $tema."_".nomeRandomico(5);} |
1364 | else | 1364 | else |
1365 | {$novonomelayer = $tema;} | 1365 | {$novonomelayer = $tema;} |
1366 | $nomeshp = $dir_tmp."/".$novonomelayer; | 1366 | $nomeshp = $dir_tmp."/".$novonomelayer; |
ferramentas/download/index.js
@@ -50,34 +50,43 @@ i3GEOF.download = { | @@ -50,34 +50,43 @@ i3GEOF.download = { | ||
50 | }, | 50 | }, |
51 | /* | 51 | /* |
52 | Function: iniciaDicionario | 52 | Function: iniciaDicionario |
53 | - | 53 | + |
54 | Carrega o dicionário e chama a função que inicia a ferramenta | 54 | Carrega o dicionário e chama a função que inicia a ferramenta |
55 | - | 55 | + |
56 | O Javascript é carregado com o id i3GEOF.nomedaferramenta.dicionario_script | 56 | O Javascript é carregado com o id i3GEOF.nomedaferramenta.dicionario_script |
57 | - */ | 57 | + */ |
58 | iniciaDicionario: function(tema){ | 58 | iniciaDicionario: function(tema){ |
59 | if(typeof(i3GEOF.download.dicionario) === 'undefined'){ | 59 | if(typeof(i3GEOF.download.dicionario) === 'undefined'){ |
60 | - i3GEO.util.scriptTag( | ||
61 | - i3GEO.configura.locaplic+"/ferramentas/download/dicionario.js", | ||
62 | - "i3GEOF.download.iniciaJanelaFlutuante('"+tema+"')", | ||
63 | - "i3GEOF.download.dicionario_script" | ||
64 | - ); | 60 | + if(!tema){ |
61 | + i3GEO.util.scriptTag( | ||
62 | + i3GEO.configura.locaplic+"/ferramentas/download/dicionario.js", | ||
63 | + "i3GEOF.download.iniciaJanelaFlutuante()", | ||
64 | + "i3GEOF.download.dicionario_script" | ||
65 | + ); | ||
66 | + } | ||
67 | + else{ | ||
68 | + i3GEO.util.scriptTag( | ||
69 | + i3GEO.configura.locaplic+"/ferramentas/download/dicionario.js", | ||
70 | + "i3GEOF.download.iniciaJanelaFlutuante('"+tema+"')", | ||
71 | + "i3GEOF.download.dicionario_script" | ||
72 | + ); | ||
73 | + } | ||
65 | } | 74 | } |
66 | else{ | 75 | else{ |
67 | i3GEOF.download.iniciaJanelaFlutuante(tema); | 76 | i3GEOF.download.iniciaJanelaFlutuante(tema); |
68 | } | 77 | } |
69 | - }, | 78 | + }, |
70 | /* | 79 | /* |
71 | Function: html | 80 | Function: html |
72 | - | 81 | + |
73 | Gera o código html para apresentação das opções da ferramenta | 82 | Gera o código html para apresentação das opções da ferramenta |
74 | - | 83 | + |
75 | Veja: | 84 | Veja: |
76 | - | 85 | + |
77 | <DOWNLOAD2> | 86 | <DOWNLOAD2> |
78 | 87 | ||
79 | Parametros: | 88 | Parametros: |
80 | - | 89 | + |
81 | divid {String} - id do div que receberá o conteudo HTML da ferramenta | 90 | divid {String} - id do div que receberá o conteudo HTML da ferramenta |
82 | 91 | ||
83 | tema {String} - código do tema | 92 | tema {String} - código do tema |
@@ -112,17 +121,17 @@ i3GEOF.download = { | @@ -112,17 +121,17 @@ i3GEOF.download = { | ||
112 | p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=download2&tema="+tema; | 121 | p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=download2&tema="+tema; |
113 | cp = new cpaint(); | 122 | cp = new cpaint(); |
114 | cp.set_response_type("JSON"); | 123 | cp.set_response_type("JSON"); |
115 | - cp.call(p,"downloadTema",mostraDownload); | 124 | + cp.call(p,"downloadTema",mostraDownload); |
116 | }, | 125 | }, |
117 | /* | 126 | /* |
118 | Function: iniciaJanelaFlutuante | 127 | Function: iniciaJanelaFlutuante |
119 | - | 128 | + |
120 | Cria a janela flutuante para controle da ferramenta. | 129 | Cria a janela flutuante para controle da ferramenta. |
121 | - | 130 | + |
122 | Parametros: | 131 | Parametros: |
123 | - | 132 | + |
124 | tema {String} - código do tema | 133 | tema {String} - código do tema |
125 | - */ | 134 | + */ |
126 | iniciaJanelaFlutuante: function(tema){ | 135 | iniciaJanelaFlutuante: function(tema){ |
127 | var janela,divid,titulo; | 136 | var janela,divid,titulo; |
128 | if(arguments.length == 0) | 137 | if(arguments.length == 0) |