Commit 6603b277606d4286dbe24392ee08d69c7e6cde0b
1 parent
8a65953c
Exists in
master
and in
7 other branches
--no commit message
Showing
4 changed files
with
41 additions
and
8 deletions
Show diff stats
classesjs/classe_util.js
| ... | ... | @@ -733,9 +733,11 @@ i3GEO.util = { |
| 733 | 733 | |
| 734 | 734 | valor {String} - valor do input |
| 735 | 735 | |
| 736 | - nome {String - name do input | |
| 736 | + nome {String} - name do input | |
| 737 | + | |
| 738 | + onch {String} - (opcional) string que será inserida no evento "onchange" | |
| 737 | 739 | */ |
| 738 | - $inputText: function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome) { | |
| 740 | + $inputText: function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch) { | |
| 739 | 741 | if(arguments.length === 6) |
| 740 | 742 | {nome = "";} |
| 741 | 743 | if(idPai !== ""){ |
| ... | ... | @@ -748,7 +750,9 @@ i3GEO.util = { |
| 748 | 750 | $i(idPai).onmouseout = function() |
| 749 | 751 | {this.className = "";}; |
| 750 | 752 | } |
| 751 | - return "<input tabindex='0' onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.select();this.className=\"digitarMouseclick\";' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' />"; | |
| 753 | + if(!onch) | |
| 754 | + {onch = "";} | |
| 755 | + return "<input onchange=\""+onch+"\" tabindex='0' onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.select();this.className=\"digitarMouseclick\";' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' />"; | |
| 752 | 756 | }, |
| 753 | 757 | $inputTextMudaCor: function(obj){ |
| 754 | 758 | var n = obj.value.split(" "); |
| ... | ... | @@ -2553,10 +2557,10 @@ catch(e){} |
| 2553 | 2557 | $im = function(g){ |
| 2554 | 2558 | return i3GEO.util.$im(g); |
| 2555 | 2559 | }; |
| 2556 | -$inputText = function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome){ | |
| 2560 | +$inputText = function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){ | |
| 2557 | 2561 | if(arguments.length === 6) |
| 2558 | 2562 | {nome = "";} |
| 2559 | - return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome); | |
| 2563 | + return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch); | |
| 2560 | 2564 | }; |
| 2561 | 2565 | $top = function(id,valor){ |
| 2562 | 2566 | i3GEO.util.$top(id,valor); | ... | ... |
ferramentas/legenda/index.js.php
| ... | ... | @@ -45,6 +45,15 @@ Classe: i3GEOF.legenda |
| 45 | 45 | */ |
| 46 | 46 | i3GEOF.legenda = { |
| 47 | 47 | /* |
| 48 | + Variavel: aviso | |
| 49 | + | |
| 50 | + Indica que uma alteração ainda não foi salva | |
| 51 | + | |
| 52 | + Type: | |
| 53 | + {boolean} | |
| 54 | + */ | |
| 55 | + aviso: false, | |
| 56 | + /* | |
| 48 | 57 | Variavel: tema |
| 49 | 58 | |
| 50 | 59 | Tema que será utilizado |
| ... | ... | @@ -385,6 +394,7 @@ i3GEOF.legenda = { |
| 385 | 394 | retorno - objeto contendo os dados para formatação da legenda |
| 386 | 395 | */ |
| 387 | 396 | montaLegenda: function(retorno){ |
| 397 | + i3GEOF.legenda.aviso = false; | |
| 388 | 398 | try{ |
| 389 | 399 | if (retorno.data != undefined){ |
| 390 | 400 | var ins = [], |
| ... | ... | @@ -402,9 +412,9 @@ i3GEOF.legenda = { |
| 402 | 412 | ins.push("<tr><td><img style='cursor:pointer' title='clique para excluir' onclick='i3GEOF.legenda.excluilinhaf(this)' src='" + i3GEO.configura.locaplic + "/imagens/x.gif' title='excluir' /></td><td><img style='cursor:pointer' title='clique para alterar' src='"+retorno.data[i].imagem+"' onclick=i3GEOF.legenda.editaSimbolo('i3GEOlegendaid_"+id+"') /></td>"); |
| 403 | 413 | ins.push("<td><img onclick=i3GEOF.legenda.modificaCor('"+retorno.data[i].idclasse+"') title='alterar a cor' style='cursor:pointer' src='" + i3GEO.configura.locaplic + "/imagens/aquarela.gif' /></td>"); |
| 404 | 414 | ins.push("<td>"); |
| 405 | - ins.push($inputText("","","i3GEOlegendaid_"+id,"digite o novo nome",30,retorno.data[i].nomeclasse,"nome")); | |
| 415 | + ins.push($inputText("","","i3GEOlegendaid_"+id,"digite o novo nome",30,retorno.data[i].nomeclasse,"nome","javascript:i3GEOF.legenda.aviso()")); | |
| 406 | 416 | ins.push("</td><td>"); |
| 407 | - ins.push($inputText("","","i3GEOlegendaid_"+id,"digite a nova expressão",30,exp,"expressao")); | |
| 417 | + ins.push($inputText("","","i3GEOlegendaid_"+id,"digite a nova expressão",30,exp,"expressao",,"javascript:i3GEOF.legenda.aviso()")); | |
| 408 | 418 | ins.push("</td></tr>"); |
| 409 | 419 | } |
| 410 | 420 | ins.push("</table><br>"); |
| ... | ... | @@ -449,6 +459,24 @@ i3GEOF.legenda = { |
| 449 | 459 | } |
| 450 | 460 | catch(e){alert("Não é possível editar a legenda desse tema");i3GEOF.legenda.aguarde.visibility = "hidden";} |
| 451 | 461 | }, |
| 462 | + /* | |
| 463 | + Function: aviso | |
| 464 | + | |
| 465 | + Mostra um alerta ao usuário quando um campo da tabela que contém os dados da legenda é alterado | |
| 466 | + | |
| 467 | + O aviso é mostrado apenas uma vez | |
| 468 | + */ | |
| 469 | + aviso: function(){ | |
| 470 | + if(i3GEOF.legenda.aviso == true){ | |
| 471 | + alert("Clique em 'Aplicar' para que as alteraçõpes sejam salvas"); | |
| 472 | + i3GEOF.legenda.aviso == false; | |
| 473 | + } | |
| 474 | + }, | |
| 475 | + /* | |
| 476 | + Function: aplicaColourRamp | |
| 477 | + | |
| 478 | + Aplica às classes da legenda as cores escolhidas no seletor de cores | |
| 479 | + */ | |
| 452 | 480 | aplicaColourRamp: function(){ |
| 453 | 481 | if($i("listaColourRamp").value != ""){ |
| 454 | 482 | if(i3GEOF.legenda.aguarde.visibility === "visible") |
| ... | ... | @@ -520,6 +548,7 @@ i3GEOF.legenda = { |
| 520 | 548 | <ALTERACLASSE> |
| 521 | 549 | */ |
| 522 | 550 | mudaLegenda: function(){ |
| 551 | + i3GEOF.legenda.aviso = false; | |
| 523 | 552 | if(i3GEOF.legenda.aguarde.visibility === "visible") |
| 524 | 553 | {return;} |
| 525 | 554 | i3GEOF.legenda.aguarde.visibility = "visible"; | ... | ... |
656 Bytes
interface/openlayers.htm
| ... | ... | @@ -147,7 +147,7 @@ |
| 147 | 147 | </tr> |
| 148 | 148 | </table> |
| 149 | 149 | |
| 150 | -<script src="../classesjs/i3geo.js"></script> | |
| 150 | +<script src="../classesjs/i3geonaocompacto.js"></script> | |
| 151 | 151 | <script src="../pacotes/openlayers/OpenLayers29.js.php"></script> |
| 152 | 152 | <!-- estilo necessário para a ferramenta de edição --> |
| 153 | 153 | <style> | ... | ... |