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 | 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 | 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 | 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 | 1306 | estilo = navm ? "cursor:move;vertical-align:35%;padding-top:0px;color:black;" : "cursor:move;vertical-align:20%;color:black;"; |
| 1307 | 1307 | if(i3GEO.arvoreDeCamadas.AGUARDALEGENDA) | ... | ... |
classesphp/funcoes_gerais.php
| ... | ... | @@ -1360,7 +1360,7 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) |
| 1360 | 1360 | if ($layer->type == MS_LAYER_LINE){$tipol = MS_SHP_ARC;} |
| 1361 | 1361 | if ($layer->type == MS_LAYER_POLYGON){$tipol = MS_SHP_POLYGON;} |
| 1362 | 1362 | if ($nomeRand == true) |
| 1363 | - {$novonomelayer = nomeRandomico(20);} | |
| 1363 | + {$novonomelayer = $tema."_".nomeRandomico(5);} | |
| 1364 | 1364 | else |
| 1365 | 1365 | {$novonomelayer = $tema;} |
| 1366 | 1366 | $nomeshp = $dir_tmp."/".$novonomelayer; | ... | ... |
ferramentas/download/index.js
| ... | ... | @@ -50,34 +50,43 @@ i3GEOF.download = { |
| 50 | 50 | }, |
| 51 | 51 | /* |
| 52 | 52 | Function: iniciaDicionario |
| 53 | - | |
| 53 | + | |
| 54 | 54 | Carrega o dicionário e chama a função que inicia a ferramenta |
| 55 | - | |
| 55 | + | |
| 56 | 56 | O Javascript é carregado com o id i3GEOF.nomedaferramenta.dicionario_script |
| 57 | - */ | |
| 57 | + */ | |
| 58 | 58 | iniciaDicionario: function(tema){ |
| 59 | 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 | 75 | else{ |
| 67 | 76 | i3GEOF.download.iniciaJanelaFlutuante(tema); |
| 68 | 77 | } |
| 69 | - }, | |
| 78 | + }, | |
| 70 | 79 | /* |
| 71 | 80 | Function: html |
| 72 | - | |
| 81 | + | |
| 73 | 82 | Gera o código html para apresentação das opções da ferramenta |
| 74 | - | |
| 83 | + | |
| 75 | 84 | Veja: |
| 76 | - | |
| 85 | + | |
| 77 | 86 | <DOWNLOAD2> |
| 78 | 87 | |
| 79 | 88 | Parametros: |
| 80 | - | |
| 89 | + | |
| 81 | 90 | divid {String} - id do div que receberá o conteudo HTML da ferramenta |
| 82 | 91 | |
| 83 | 92 | tema {String} - código do tema |
| ... | ... | @@ -112,17 +121,17 @@ i3GEOF.download = { |
| 112 | 121 | p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=download2&tema="+tema; |
| 113 | 122 | cp = new cpaint(); |
| 114 | 123 | cp.set_response_type("JSON"); |
| 115 | - cp.call(p,"downloadTema",mostraDownload); | |
| 124 | + cp.call(p,"downloadTema",mostraDownload); | |
| 116 | 125 | }, |
| 117 | 126 | /* |
| 118 | 127 | Function: iniciaJanelaFlutuante |
| 119 | - | |
| 128 | + | |
| 120 | 129 | Cria a janela flutuante para controle da ferramenta. |
| 121 | - | |
| 130 | + | |
| 122 | 131 | Parametros: |
| 123 | - | |
| 132 | + | |
| 124 | 133 | tema {String} - código do tema |
| 125 | - */ | |
| 134 | + */ | |
| 126 | 135 | iniciaJanelaFlutuante: function(tema){ |
| 127 | 136 | var janela,divid,titulo; |
| 128 | 137 | if(arguments.length == 0) | ... | ... |