Commit 53173340f50eefbe532f82189222686bba2ceb5d

Authored by Edmar Moretti
1 parent 65fba7cd

Corrige a inclusão do combo que permite selecionar um tema no editor de textos do editor de mapfiles

Showing 1 changed file with 10 additions and 8 deletions   Show diff stats
admin/js/core.js
... ... @@ -1611,7 +1611,7 @@ function core_ativaforms(lista){
1611 1611 }
1612 1612 }
1613 1613 function core_listaDeLetras(onde,nomeFuncao){
1614   - //letraAtual guarda a ltima letra clicada
  1614 + //letraAtual guarda a ultima letra clicada
1615 1615 var o,i,ins= "<p><b>",
1616 1616 letras = ["Todos","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","X","Y","Z","_","1","2","3","4","5","6","7","8","9"],
1617 1617 nletras = letras.length;
... ... @@ -1630,16 +1630,18 @@ function core_listaDeLetras(onde,nomeFuncao){
1630 1630 + letras[i] + "</span>&nbsp;";
1631 1631 }
1632 1632 ins += "</b></p>";
1633   - if(onde != ""){
  1633 + if(onde && onde != ""){
1634 1634 o = document.getElementById(onde);
1635 1635 if(o){
1636 1636 o.innerHTML = "<fieldset style=padding:2px; class=letras ><form id=forminiciais ><p><b>Iniciais: <input name='' onchange='' value='"+letraAtual+"' id=iniciaisLetras type=text style=width:40px;cursor:pointer /> ou </form><div style=position:relative;top:1px; id='_listaDeLetras' >"+ins+"</div></b></p></fieldset>";
1637   - document.getElementById("forminiciais").onsubmit = function(){
1638   - var v = document.getElementById("iniciaisLetras").value;
1639   - i3GEO.util.insereCookie("I3GEOletraAdmin", v);
1640   - eval(nomeFuncao+"('"+v+"');");
1641   - return false;
1642   - };
  1637 + if(document.getElementById("forminiciais")){
  1638 + document.getElementById("forminiciais").onsubmit = function(){
  1639 + var v = document.getElementById("iniciaisLetras").value;
  1640 + i3GEO.util.insereCookie("I3GEOletraAdmin", v);
  1641 + eval(nomeFuncao+"('"+v+"');");
  1642 + return false;
  1643 + };
  1644 + }
1643 1645 document.getElementById("_listaDeLetras").onclick = function(){
1644 1646 document.getElementById("iniciaisLetras").value = letraAtual;
1645 1647 };
... ...