Commit f11347ffd402426d16e77289ca5f3e4a769a54b4
1 parent
9ef4c9ee
Exists in
master
and in
7 other branches
Inclui opção para escolha das iniciais e não apenas de uma letra, nas listagens …
…dos formulários do sistema de administração. Rotina para evitar mensagens de erro no mashup openlayers.
Showing
5 changed files
with
28 additions
and
28 deletions
Show diff stats
admin/js/core.js
@@ -1543,7 +1543,16 @@ function core_listaDeLetras(onde,nomeFuncao){ | @@ -1543,7 +1543,16 @@ function core_listaDeLetras(onde,nomeFuncao){ | ||
1543 | if(onde != ""){ | 1543 | if(onde != ""){ |
1544 | o = document.getElementById(onde); | 1544 | o = document.getElementById(onde); |
1545 | if(o){ | 1545 | if(o){ |
1546 | - o.innerHTML = ins; | 1546 | + o.innerHTML = "<form id=forminiciais >Iniciais: <input name='' onchange='' value='"+letraAtual+"' id=iniciaisLetras type=text style=width:40px;cursor:pointer /> ou </form><div style=position:relative;top:5px; id='_listaDeLetras' >"+ins+"</div>"; |
1547 | + document.getElementById("forminiciais").onsubmit = function(){ | ||
1548 | + var v = document.getElementById("iniciaisLetras").value; | ||
1549 | + i3GEO.util.insereCookie("I3GEOletraAdmin", v); | ||
1550 | + eval(nomeFuncao+"('"+v+"');"); | ||
1551 | + return false; | ||
1552 | + }; | ||
1553 | + document.getElementById("_listaDeLetras").onclick = function(){ | ||
1554 | + document.getElementById("iniciaisLetras").value = letraAtual; | ||
1555 | + }; | ||
1547 | } | 1556 | } |
1548 | } | 1557 | } |
1549 | else{ | 1558 | else{ |
admin/php/editortexto.php
@@ -93,7 +93,7 @@ function filtraLetra(letra) { | @@ -93,7 +93,7 @@ function filtraLetra(letra) { | ||
93 | function comboMapfiles(){ | 93 | function comboMapfiles(){ |
94 | var n = $mapfiles.length, | 94 | var n = $mapfiles.length, |
95 | i,ins; | 95 | i,ins; |
96 | - ins = "<select onchange='mudaMapfile(this)'><option value=''>Edite outro mapfile</option>"; | 96 | + ins = "<select id='selectComboMapfile' onchange='mudaMapfile(this)'><option value=''>Edite outro mapfile</option>"; |
97 | for(i=0;i<n;i++){ | 97 | for(i=0;i<n;i++){ |
98 | if($mapfiles[i].extensao === "map"){ | 98 | if($mapfiles[i].extensao === "map"){ |
99 | ins += "<option value='"+$mapfiles[i].codigo+"'>"+$mapfiles[i].codigo+" - "+$mapfiles[i].nome+"</optiona>"; | 99 | ins += "<option value='"+$mapfiles[i].codigo+"'>"+$mapfiles[i].codigo+" - "+$mapfiles[i].nome+"</optiona>"; |
@@ -101,6 +101,7 @@ function comboMapfiles(){ | @@ -101,6 +101,7 @@ function comboMapfiles(){ | ||
101 | } | 101 | } |
102 | ins += "</select>"; | 102 | ins += "</select>"; |
103 | $i("comboMapfiles").innerHTML = ins; | 103 | $i("comboMapfiles").innerHTML = ins; |
104 | + $i("selectComboMapfile").value = "<?php echo $_GET["mapfile"];?>"; | ||
104 | }; | 105 | }; |
105 | core_pegaMapfiles("comboMapfiles()",letraAtual,""); | 106 | core_pegaMapfiles("comboMapfiles()",letraAtual,""); |
106 | function mudaMapfile(obj){ | 107 | function mudaMapfile(obj){ |
admin/php/menutemas.php
@@ -1230,8 +1230,7 @@ function listaMapsTemas() | @@ -1230,8 +1230,7 @@ function listaMapsTemas() | ||
1230 | $file = str_replace(".".$extensao,"",$file); | 1230 | $file = str_replace(".".$extensao,"",$file); |
1231 | if(isset($letra) && $letra != "") | 1231 | if(isset($letra) && $letra != "") |
1232 | { | 1232 | { |
1233 | - if(strtolower(substr(basename($file),0,1)) == strtolower($letra)) | ||
1234 | - { | 1233 | + if(strtolower(substr(basename($file),0,strlen($letra))) == strtolower($letra)){ |
1235 | $arquivos[] = array("nome"=>$file,"extensao"=>$extensao); | 1234 | $arquivos[] = array("nome"=>$file,"extensao"=>$extensao); |
1236 | } | 1235 | } |
1237 | } | 1236 | } |
mashups/openlayers.php
@@ -151,35 +151,26 @@ if($temas != ""){ | @@ -151,35 +151,26 @@ if($temas != ""){ | ||
151 | } | 151 | } |
152 | } | 152 | } |
153 | if($nomeMap != ""){ | 153 | if($nomeMap != ""){ |
154 | - | ||
155 | - if(empty($layers)){ | ||
156 | - $layers = array(); | ||
157 | - $maptemp = @ms_newMapObj($nomeMap); | 154 | + $layers = array(); |
155 | + $maptemp = @ms_newMapObj($nomeMap); | ||
156 | + if($maptemp){ | ||
158 | for($i=0;$i<($maptemp->numlayers);++$i) { | 157 | for($i=0;$i<($maptemp->numlayers);++$i) { |
159 | $layern = $maptemp->getLayer($i); | 158 | $layern = $maptemp->getLayer($i); |
160 | $layers[] = $layern->name; | 159 | $layers[] = $layern->name; |
161 | } | 160 | } |
162 | $nomeLayer = implode(",",$layers); | 161 | $nomeLayer = implode(",",$layers); |
163 | $tituloLayer = $layern->getmetadata("tema"); | 162 | $tituloLayer = $layern->getmetadata("tema"); |
164 | - } | ||
165 | - else{ | ||
166 | - $nomeLayer = str_replace(" ",",",$layers); | ||
167 | - $layers = explode(",",$layers); | ||
168 | - $maptemp = @ms_newMapObj($nomeMap); | ||
169 | - //$temp = explode(",",$layers); | ||
170 | - $layern = $maptemp->getLayerByName($layers[0]); | ||
171 | - $tituloLayer = $layern->getmetadata("tema"); | ||
172 | - } | ||
173 | - $ebase = "false"; | ||
174 | - if(isset($fundo) && $fundo != ""){ | ||
175 | - if(in_array($tema,$fundo)){ | ||
176 | - $ebase = "true"; | 163 | + $ebase = "false"; |
164 | + if(isset($fundo) && $fundo != ""){ | ||
165 | + if(in_array($tema,$fundo)){ | ||
166 | + $ebase = "true"; | ||
167 | + } | ||
177 | } | 168 | } |
169 | + $visivel = "false"; | ||
170 | + if(in_array($tema,$visiveis)) | ||
171 | + {$visivel = "true";} | ||
172 | + $objOpenLayers[] = 'new OpenLayers.Layer.WMS( "'.$tituloLayer.'", "../ogc.php?tema='.$tema.'&",{layers:"'.$nomeLayer.'",transparent: "true", format: "image/png"},{singleTile:true,visibility:'.$visivel.',isBaseLayer:'.$ebase.'})'; | ||
178 | } | 173 | } |
179 | - $visivel = "false"; | ||
180 | - if(in_array($tema,$visiveis)) | ||
181 | - {$visivel = "true";} | ||
182 | - $objOpenLayers[] = 'new OpenLayers.Layer.WMS( "'.$tituloLayer.'", "../ogc.php?tema='.$tema.'&",{layers:"'.$nomeLayer.'",transparent: "true", format: "image/png"},{singleTile:true,visibility:'.$visivel.',isBaseLayer:'.$ebase.'})'; | ||
183 | } | 174 | } |
184 | else | 175 | else |
185 | {echo $tema." não foi encontrado.<br>";} | 176 | {echo $tema." não foi encontrado.<br>";} |
temas/_wbiomashp.map
1 | -MAP | ||
2 | - FONTSET "../symbols/fontes.txt" | ||
3 | - SYMBOLSET "../symbols/simbolos.sym" | 1 | +MAP |
2 | + FONTSET "../symbols/fontes.txt" | ||
3 | + SYMBOLSET "../symbols/simbolos.sym" | ||
4 | LAYER | 4 | LAYER |
5 | CONNECTION "" | 5 | CONNECTION "" |
6 | DATA "c:\ms4w\apache\htdocs\i3geo\aplicmap\dados\biomas.shp" | 6 | DATA "c:\ms4w\apache\htdocs\i3geo\aplicmap\dados\biomas.shp" |