Commit c74820e3e99cc79b9918d1f614caf707a720db85

Authored by Edmar Moretti
1 parent 6c7a0801

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,7 +88,7 @@ i3GEOF.legenda =
88 * 88 *
89 * Ultimo estilo selecionado 89 * Ultimo estilo selecionado
90 */ 90 */
91 - estilo : "", 91 + estilo : 0,
92 /* 92 /*
93 * Variavel: classe 93 * Variavel: classe
94 * 94 *
@@ -1017,7 +1017,6 @@ i3GEOF.legenda = @@ -1017,7 +1017,6 @@ i3GEOF.legenda =
1017 $i("i3GEOlegendaguia3obj").style.display = "block"; 1017 $i("i3GEOlegendaguia3obj").style.display = "block";
1018 id = id.split("-"); 1018 id = id.split("-");
1019 i3GEOF.legenda.classe = id[1]; 1019 i3GEOF.legenda.classe = id[1];
1020 - i3GEOF.legenda.estilo = 0;  
1021 i3GEOF.legenda.formEditorSimbolo(); 1020 i3GEOF.legenda.formEditorSimbolo();
1022 i3GEOF.legenda.aguarde.visibility = "hidden"; 1021 i3GEOF.legenda.aguarde.visibility = "hidden";
1023 } catch (e) { 1022 } catch (e) {
@@ -1455,7 +1454,7 @@ i3GEOF.legenda = @@ -1455,7 +1454,7 @@ i3GEOF.legenda =
1455 retorno = retorno.data; 1454 retorno = retorno.data;
1456 i3GEOF.legenda.estilos = retorno.split("|"); 1455 i3GEOF.legenda.estilos = retorno.split("|");
1457 combo = 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 n = i3GEOF.legenda.estilos.length; 1458 n = i3GEOF.legenda.estilos.length;
1460 for (i = 0; i < n; i++) { 1459 for (i = 0; i < n; i++) {
1461 l = i3GEOF.legenda.estilos[i].split("#"); 1460 l = i3GEOF.legenda.estilos[i].split("#");
@@ -1464,6 +1463,7 @@ i3GEOF.legenda = @@ -1464,6 +1463,7 @@ i3GEOF.legenda =
1464 } 1463 }
1465 combo += "</select></div>"; 1464 combo += "</select></div>";
1466 $i("i3GEOlegendacomboestilos").innerHTML = combo; 1465 $i("i3GEOlegendacomboestilos").innerHTML = combo;
  1466 + $i("i3GEOlegendaestilos").value = i3GEOF.legenda.estilo;
1467 1467
1468 1468
1469 i3GEOF.legenda.aguarde.visibility = "hidden"; 1469 i3GEOF.legenda.aguarde.visibility = "hidden";
@@ -1537,6 +1537,7 @@ i3GEOF.legenda = @@ -1537,6 +1537,7 @@ i3GEOF.legenda =
1537 + "&estilo=" 1537 + "&estilo="
1538 + i3GEOF.legenda.estilo, cp = new cpaint(); 1538 + i3GEOF.legenda.estilo, cp = new cpaint();
1539 cp.set_response_type("JSON"); 1539 cp.set_response_type("JSON");
  1540 + i3GEOF.legenda.estilo = i3GEOF.legenda.estilo + 1;
1540 cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor); 1541 cp.call(p, "editasimbolo", i3GEOF.legenda.reMontaEditor);
1541 } catch (e) { 1542 } catch (e) {
1542 i3GEO.janela.tempoMsg("Erro: " + e); 1543 i3GEO.janela.tempoMsg("Erro: " + e);
@@ -1549,6 +1550,7 @@ i3GEOF.legenda = @@ -1549,6 +1550,7 @@ i3GEOF.legenda =
1549 return; 1550 return;
1550 } 1551 }
1551 i3GEOF.legenda.aguarde.visibility = "visible"; 1552 i3GEOF.legenda.aguarde.visibility = "visible";
  1553 + i3GEOF.legenda.estilo = 0;
1552 var p = 1554 var p =
1553 i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid=" 1555 i3GEO.configura.locaplic + "/classesphp/mapa_controle.php?g_sid="
1554 + i3GEO.configura.sid 1556 + i3GEO.configura.sid
@@ -1570,11 +1572,11 @@ i3GEOF.legenda = @@ -1570,11 +1572,11 @@ i3GEOF.legenda =
1570 * 1572 *
1571 * Mostra as propriedades de um estilo de um s&iacute;mbolo 1573 * Mostra as propriedades de um estilo de um s&iacute;mbolo
1572 */ 1574 */
1573 - mostraEstilo : function(e) { 1575 + mostraEstilo : function() {
1574 i3GEOF.legenda.aguarde.visibility = "visible"; 1576 i3GEOF.legenda.aguarde.visibility = "visible";
1575 try { 1577 try {
1576 var linha, tipoLayer, d, p, cp, mustache = {}; 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 linha = i3GEOF.legenda.estilos[i3GEOF.legenda.estilo]; 1580 linha = i3GEOF.legenda.estilos[i3GEOF.legenda.estilo];
1579 linha = linha.split("#"); 1581 linha = linha.split("#");
1580 tipoLayer = linha[0]; 1582 tipoLayer = linha[0];
@@ -1634,7 +1636,7 @@ i3GEOF.legenda = @@ -1634,7 +1636,7 @@ i3GEOF.legenda =
1634 cp.call(p, "editasimbolo", i3GEOF.legenda.listaSimbolos); 1636 cp.call(p, "editasimbolo", i3GEOF.legenda.listaSimbolos);
1635 i3GEOF.legenda.aguarde.visibility = "hidden"; 1637 i3GEOF.legenda.aguarde.visibility = "hidden";
1636 } catch (e) { 1638 } catch (e) {
1637 - i3GEO.janela.tempoMsg("Erro: " + e); 1639 + i3GEO.janela.tempoMsg("Erro: " + i3GEOF.legenda.estilo);
1638 i3GEOF.legenda.aguarde.visibility = "hidden"; 1640 i3GEOF.legenda.aguarde.visibility = "hidden";
1639 } 1641 }
1640 }, 1642 },