Commit 7ef009ffcc9b84fdcc571df39027f8333046382e
1 parent
77a4ef23
Exists in
master
and in
7 other branches
--no commit message
Showing
3 changed files
with
49 additions
and
2 deletions
Show diff stats
classesphp/classe_toponimia.php
| ... | ... | @@ -301,6 +301,27 @@ $item Lista de Itens separados por vírgula que serão utilizados. |
| 301 | 301 | $this->layer->setmetadata("TIP",$item); |
| 302 | 302 | return("ok"); |
| 303 | 303 | } |
| 304 | + /* | |
| 305 | + function: pegaDadosEtiquetas | |
| 306 | + | |
| 307 | + ativa a inclusão de etiquetas em um tema | |
| 308 | + | |
| 309 | + parameter: | |
| 310 | + $item Lista de Itens separados por vírgula que serão utilizados. | |
| 311 | + */ | |
| 312 | + function pegaDadosEtiquetas() | |
| 313 | + { | |
| 314 | + if(!$this->layer){return "erro";} | |
| 315 | + $itens = $this->layer->getmetadata("ITENS"); | |
| 316 | + $itensdesc = $this->layer->getmetadata("ITENSDESC"); | |
| 317 | + $tips = $this->layer->getmetadata("TIP"); | |
| 318 | + $res = array( | |
| 319 | + "itens"=>explode(",",$itens), | |
| 320 | + "itensdesc"=>explode(",",$itensdesc), | |
| 321 | + "tips"=>explode(",",$tips) | |
| 322 | + ); | |
| 323 | + return($res); | |
| 324 | + } | |
| 304 | 325 | /* |
| 305 | 326 | function: removeEtiquetas |
| 306 | 327 | ... | ... |
ferramentas/etiqueta/exec.php
| ... | ... | @@ -36,7 +36,18 @@ Desativa as etiquetas de um tema. |
| 36 | 36 | $m->salva(); |
| 37 | 37 | $_SESSION["contadorsalva"]++; |
| 38 | 38 | break; |
| 39 | - | |
| 39 | +/* | |
| 40 | + Valor: PEGADADOSETIQUETAS | |
| 41 | + | |
| 42 | +Obtém os dados sobre itens, itensdesc, etc | |
| 43 | + | |
| 44 | +<Toponimia->pegaDadosEtiquetas> | |
| 45 | +*/ | |
| 46 | + case "PEGADADOSETIQUETAS": | |
| 47 | + include_once(dirname(__FILE__)."/../../classesphp/classe_toponimia.php"); | |
| 48 | + $m = new Toponimia($map_file,$tema); | |
| 49 | + $retorno = $m->pegaDadosEtiquetas(); | |
| 50 | + break; | |
| 40 | 51 | } |
| 41 | 52 | if (!connection_aborted()){ |
| 42 | 53 | if(isset($map_file) && isset($postgis_mapa) && $map_file != "") | ... | ... |
ferramentas/etiqueta/index.js
| ... | ... | @@ -143,7 +143,7 @@ i3GEOF.etiqueta = { |
| 143 | 143 | //cria a janela flutuante |
| 144 | 144 | titulo = "<div id='i3GEOFetiquetaComboCabeca' class='comboTemasCabecalho'> ------</div><span style=margin-left:60px>"+$trad("d7at")+"</span><a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=5&idajuda=37' > </a>"; |
| 145 | 145 | janela = i3GEO.janela.cria( |
| 146 | - "380px", | |
| 146 | + "450px", | |
| 147 | 147 | "175px", |
| 148 | 148 | "", |
| 149 | 149 | "", |
| ... | ... | @@ -178,6 +178,21 @@ i3GEOF.etiqueta = { |
| 178 | 178 | i3GEO.php.listaItensTema(i3GEOF.etiqueta.montaListaItens,i3GEO.temaAtivo); |
| 179 | 179 | } |
| 180 | 180 | }, |
| 181 | + pegaDadosEtiquetas: function(){ | |
| 182 | + if(i3GEOF.etiqueta.aguarde.visibility === "visible") | |
| 183 | + {return;} | |
| 184 | + var cp = new cpaint(), | |
| 185 | + temp, | |
| 186 | + p; | |
| 187 | + i3GEOF.etiqueta.aguarde.visibility = "visible"; | |
| 188 | + temp = function(retorno){ | |
| 189 | + i3GEOF.etiqueta.aguarde.visibility = "hidden"; | |
| 190 | + | |
| 191 | + }; | |
| 192 | + p = i3GEO.configura.locaplic+"/ferramentas/etiqueta/exec.php?g_sid="+i3GEO.configura.sid+"&funcao=pegaDadosEtiquetas&tema="+i3GEO.temaAtivo; | |
| 193 | + cp.set_response_type("JSON"); | |
| 194 | + cp.call(p,"etiqueta",temp); | |
| 195 | + }, | |
| 181 | 196 | /* |
| 182 | 197 | Function: montaListaItens |
| 183 | 198 | ... | ... |