Commit 44ba0fb82232362f4d700746a38aca83a8a2dbf6
1 parent
238ca3be
Exists in
master
i3geo/i3geo#93 No editor da legenda, as opções não respeitam o estilo escohido
Showing
1 changed file
with
8 additions
and
6 deletions
Show diff stats
ferramentas/legenda/index.js
| ... | ... | @@ -88,7 +88,7 @@ i3GEOF.legenda = |
| 88 | 88 | * |
| 89 | 89 | * Ultimo estilo selecionado |
| 90 | 90 | */ |
| 91 | - estilo : "", | |
| 91 | + estilo : 0, | |
| 92 | 92 | /* |
| 93 | 93 | * Variavel: classe |
| 94 | 94 | * |
| ... | ... | @@ -1017,7 +1017,6 @@ i3GEOF.legenda = |
| 1017 | 1017 | $i("i3GEOlegendaguia3obj").style.display = "block"; |
| 1018 | 1018 | id = id.split("-"); |
| 1019 | 1019 | i3GEOF.legenda.classe = id[1]; |
| 1020 | - i3GEOF.legenda.estilo = 0; | |
| 1021 | 1020 | i3GEOF.legenda.formEditorSimbolo(); |
| 1022 | 1021 | i3GEOF.legenda.aguarde.visibility = "hidden"; |
| 1023 | 1022 | } catch (e) { |
| ... | ... | @@ -1455,7 +1454,7 @@ i3GEOF.legenda = |
| 1455 | 1454 | retorno = retorno.data; |
| 1456 | 1455 | i3GEOF.legenda.estilos = retorno.split("|"); |
| 1457 | 1456 | combo = |
| 1458 | - "<select id='i3GEOlegendaestilos' class='form-control' onchange=i3GEOF.legenda.mostraEstilo(this.value)>"; | |
| 1457 | + "<select id='i3GEOlegendaestilos' class='form-control' onchange=i3GEOF.legenda.estilo=this.value;i3GEOF.legenda.mostraEstilo(this.value)>"; | |
| 1459 | 1458 | n = i3GEOF.legenda.estilos.length; |
| 1460 | 1459 | for (i = 0; i < n; i++) { |
| 1461 | 1460 | l = i3GEOF.legenda.estilos[i].split("#"); |
| ... | ... | @@ -1464,6 +1463,7 @@ i3GEOF.legenda = |
| 1464 | 1463 | } |
| 1465 | 1464 | combo += "</select></div>"; |
| 1466 | 1465 | $i("i3GEOlegendacomboestilos").innerHTML = combo; |
| 1466 | + $i("i3GEOlegendaestilos").value = i3GEOF.legenda.estilo; | |
| 1467 | 1467 | |
| 1468 | 1468 | |
| 1469 | 1469 | i3GEOF.legenda.aguarde.visibility = "hidden"; |
| ... | ... | @@ -1537,6 +1537,7 @@ i3GEOF.legenda = |
| 1537 | 1537 | + "&estilo=" |
| 1538 | 1538 | + i3GEOF.legenda.estilo, cp = new cpaint(); |
| 1539 | 1539 | cp.set_response_type("JSON"); |
| 1540 | + i3GEOF.legenda.estilo = i3GEOF.legenda.estilo + 1; | |
| 1540 | 1541 | cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor); |
| 1541 | 1542 | } catch (e) { |
| 1542 | 1543 | i3GEO.janela.tempoMsg("Erro: " + e); |
| ... | ... | @@ -1549,6 +1550,7 @@ i3GEOF.legenda = |
| 1549 | 1550 | return; |
| 1550 | 1551 | } |
| 1551 | 1552 | i3GEOF.legenda.aguarde.visibility = "visible"; |
| 1553 | + i3GEOF.legenda.estilo = 0; | |
| 1552 | 1554 | var p = |
| 1553 | 1555 | i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" |
| 1554 | 1556 | + i3GEO.configura.sid |
| ... | ... | @@ -1570,11 +1572,11 @@ i3GEOF.legenda = |
| 1570 | 1572 | * |
| 1571 | 1573 | * Mostra as propriedades de um estilo de um símbolo |
| 1572 | 1574 | */ |
| 1573 | - mostraEstilo : function(e) { | |
| 1575 | + mostraEstilo : function() { | |
| 1574 | 1576 | i3GEOF.legenda.aguarde.visibility = "visible"; |
| 1575 | 1577 | try { |
| 1576 | 1578 | var linha, tipoLayer, d, p, cp, mustache = {}; |
| 1577 | - i3GEOF.legenda.estilo = e; // esta e uma variavel global | |
| 1579 | + //i3GEOF.legenda.estilo = e; // esta e uma variavel global | |
| 1578 | 1580 | linha = i3GEOF.legenda.estilos[i3GEOF.legenda.estilo]; |
| 1579 | 1581 | linha = linha.split("#"); |
| 1580 | 1582 | tipoLayer = linha[0]; |
| ... | ... | @@ -1634,7 +1636,7 @@ i3GEOF.legenda = |
| 1634 | 1636 | cp.call(p, "editasimbolo", i3GEOF.legenda.listaSimbolos); |
| 1635 | 1637 | i3GEOF.legenda.aguarde.visibility = "hidden"; |
| 1636 | 1638 | } catch (e) { |
| 1637 | - i3GEO.janela.tempoMsg("Erro: " + e); | |
| 1639 | + i3GEO.janela.tempoMsg("Erro: " + i3GEOF.legenda.estilo); | |
| 1638 | 1640 | i3GEOF.legenda.aguarde.visibility = "hidden"; |
| 1639 | 1641 | } |
| 1640 | 1642 | }, | ... | ... |